aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.xml1
-rw-r--r--buildScripts/create-eclipse-project.ant.xml1
-rw-r--r--buildScripts/create-intellij-project.ant.xml1
-rw-r--r--buildScripts/mapstructBinding.ant.xml (renamed from buildScripts/mapstruct-old.ant.xml)94
-rw-r--r--buildScripts/website.ant.xml2
-rw-r--r--src/testAP/org/projectlombok/testAp/ExampleAnnotation.java10
-rw-r--r--src/testAP/org/projectlombok/testAp/TestAp.java77
-rw-r--r--src/useTestAP/UseTestAp.java13
8 files changed, 27 insertions, 172 deletions
diff --git a/build.xml b/build.xml
index 59e258d4..5a1a67a0 100644
--- a/build.xml
+++ b/build.xml
@@ -36,4 +36,5 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
<import file="buildScripts/create-intellij-project.ant.xml" />
<import file="buildScripts/website.ant.xml" />
<import file="buildScripts/eclipse-p2.ant.xml" />
+ <import file="buildScripts/mapstructBinding.ant.xml" />
</project>
diff --git a/buildScripts/create-eclipse-project.ant.xml b/buildScripts/create-eclipse-project.ant.xml
index 93eed3b0..386ed3de 100644
--- a/buildScripts/create-eclipse-project.ant.xml
+++ b/buildScripts/create-eclipse-project.ant.xml
@@ -36,7 +36,6 @@ This buildfile is part of projectlombok.org. It creates the infrastructure neede
<srcdir dir="src/installer" />
<srcdir dir="src/delombok" />
<srcdir dir="src/stubs" />
- <srcdir dir="src/testAP" />
<srcdir dir="src/support" />
<srcdir dir="experimental/src" />
<srcdir dir="test/transform/src" />
diff --git a/buildScripts/create-intellij-project.ant.xml b/buildScripts/create-intellij-project.ant.xml
index abb8c589..865e8971 100644
--- a/buildScripts/create-intellij-project.ant.xml
+++ b/buildScripts/create-intellij-project.ant.xml
@@ -41,7 +41,6 @@ This buildfile is part of projectlombok.org. It creates the infrastructure neede
<srcdir dir="src/installer" />
<srcdir dir="src/delombok" />
<srcdir dir="src/stubs" />
- <srcdir dir="src/testAP" />
<srcdir dir="src/support" />
<srcdir dir="experimental/src" />
<srcdir dir="test/transform/src" test="true" />
diff --git a/buildScripts/mapstruct-old.ant.xml b/buildScripts/mapstructBinding.ant.xml
index cf14dd93..c59b84da 100644
--- a/buildScripts/mapstruct-old.ant.xml
+++ b/buildScripts/mapstructBinding.ant.xml
@@ -19,63 +19,14 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
-<project name="lombok.mapstruct-old" xmlns:ivy="antlib:com.zwitserloot.ivyplusplus" basedir="..">
+<project name="lombok.mapstructBinding" xmlns:ivy="antlib:com.zwitserloot.ivyplusplus" basedir="..">
<description>
-This buildfile is part of projectlombok.org. It contains leftover tasks from the previous version
-of the build that are related to mapstruct. We will clean this up or remove it soon.
+This buildfile is part of projectlombok.org. It builds the mapstruct-lombok binding; we think the
+version on mavencentral is the last version that is ever needed; the code itself is trivial and
+exists as a separate dependency solely because it is itself dependent on both lombok and mapstruct.
</description>
- <target name="testAp-compile" depends="ensureBuildDeps">
- <delete file="build/testAP/META-INF/services/javax.annotation.processing.Processor" quiet="true" />
- <ivy:compile destdir="build/testAP" source="1.7" target="1.7" ecj="true">
- <bootclasspath path="${rt-openjdk8}" />
- <src path="src/testAP" />
- </ivy:compile>
-
- <mkdir dir="build/testAP/META-INF" />
- <mkdir dir="build/testAP/META-INF/services" />
- <echo file="build/testAP/META-INF/services/javax.annotation.processing.Processor">org.projectlombok.testAp.TestAp</echo>
- </target>
-
- <target name="testAp-dist" depends="testAp-compile">
- <mkdir dir="dist" />
- <tstamp>
- <format property="releaseTimestamp" pattern="yyyy-MM-dd" />
- </tstamp>
- <zip destfile="dist/testAp-${releaseTimestamp}.jar">
- <fileset dir="." includes="LICENSE" />
- <fileset dir="build/testAp" />
- </zip>
- <copy file="dist/testAp-${releaseTimestamp}.jar" tofile="dist/testAp.jar" />
- </target>
-
- <target name="testAp" depends="testAp-dist, dist">
- <echo>Running in order: First Lombok, Then testAP</echo>
-
- <delete dir="build/useTestAp" quiet="true" />
- <mkdir dir="build/useTestAp" />
- <javac verbose="false" source="1.7" target="1.7" destdir="build/useTestAp" includeantruntime="false">
- <src path="src/useTestAP" />
- <classpath location="dist/lombok.jar" />
- <classpath location="dist/testAp.jar" />
- <compilerarg value="-processor" />
- <compilerarg value="lombok.launch.AnnotationProcessorHider$AnnotationProcessor,org.projectlombok.testAp.TestAp" />
- </javac>
-
- <echo>Running in order: First TestAP, Then Lombok</echo>
-
- <delete dir="build/useTestAp" quiet="true" />
- <mkdir dir="build/useTestAp" />
- <javac verbose="false" source="1.7" target="1.7" destdir="build/useTestAp" includeantruntime="false">
- <src path="src/useTestAP" />
- <classpath location="dist/lombok.jar" />
- <classpath location="dist/testAp.jar" />
- <compilerarg value="-processor" />
- <compilerarg value="org.projectlombok.testAp.TestAp,lombok.launch.AnnotationProcessorHider$AnnotationProcessor" />
- </javac>
- </target>
-
- <target name="-compileMapstruct">
+ <target name="-mapstructBinding.compile">
<mkdir dir="build/mapstruct" />
<javac includeAntRuntime="false" source="1.9" target="1.9" destdir="build/mapstruct">
<src path="src/j9stubs" />
@@ -84,8 +35,8 @@ of the build that are related to mapstruct. We will clean this up or remove it s
<mkdir dir="build/lombok/secondaryLoading.SCL.lombok/org/mapstruct/ap/spi" />
<move file="build/mapstruct/org/mapstruct/ap/spi/AstModifyingAnnotationProcessor.class" tofile="build/lombok/secondaryLoading.SCL.lombok/org/mapstruct/ap/spi/AstModifyingAnnotationProcessor.SCL.lombok" />
</target>
-
- <target name="-mapstructBindingPrepare" depends="-compileMapstruct">
+
+ <target name="-mapstructBinding.prepare" depends="-mapstructBinding.compile">
<mkdir dir="build/mapstruct-module-path" />
<copy file="dist/lombok.jar" todir="build/mapstruct-module-path" />
<jar destfile="build/mapstruct-module-path/mapstruct-processor.jar" basedir="build/mapstruct" includes="org/**">
@@ -93,7 +44,7 @@ of the build that are related to mapstruct. We will clean this up or remove it s
<attribute name="Automatic-Module-Name" value="org.mapstruct.processor" />
</manifest>
</jar>
-
+
<mkdir dir="build/mapstruct-binding/maven" />
<copy tofile="build/mapstruct-binding/maven/pom.xml" overwrite="true" file="doc/mapstruct-binding-maven-pom.xml">
<filterchain>
@@ -104,7 +55,7 @@ of the build that are related to mapstruct. We will clean this up or remove it s
</copy>
</target>
- <target name="-mapstructBindingDoc" depends="-mapstructBindingPrepare">
+ <target name="-mapstructBinding.doc" depends="-mapstructBinding.prepare">
<mkdir dir="build/mapstruct-binding/api" />
<javadoc
Package="true"
@@ -125,7 +76,7 @@ of the build that are related to mapstruct. We will clean this up or remove it s
<jar destfile="dist/lombok-mapstruct-binding-${mapstruct-binding.version}-javadoc.jar" basedir="build/mapstruct-binding/api" includes="**" />
</target>
- <target name="-mapstructBindingJar" depends="dist,-mapstructBindingPrepare">
+ <target name="-mapstructBinding.jar" depends="dist,-mapstructBinding.prepare">
<mkdir dir="build/mapstruct-binding/classes" />
<echo file="build/mapstruct-binding/classes/META-INF/services/org.mapstruct.ap.spi.AstModifyingAnnotationProcessor">lombok.mapstruct.NotifierHider$AstModificationNotifier</echo>
@@ -135,22 +86,25 @@ of the build that are related to mapstruct. We will clean this up or remove it s
<jar destfile="dist/lombok-mapstruct-binding-${mapstruct-binding.version}.jar" basedir="build/mapstruct-binding/classes" includes="**" />
</target>
- <target name="-mapstructBindingSrc" depends="-mapstructBindingJar">
+ <target name="-mapstructBinding.src" depends="-mapstructBinding.jar">
<jar destfile="dist/lombok-mapstruct-binding-${mapstruct-binding.version}-sources.jar" basedir="src/bindings/mapstruct" includes="**" />
</target>
- <target name="mapstructBinding" depends="dist,-mapstructBindingJar,-mapstructBindingDoc,-mapstructBindingSrc">
+ <target name="mapstructBinding.pack" depends="dist,-mapstructBinding.jar,-mapstructBinding.doc,-mapstructBinding.src">
</target>
- <target name="mapstructMaven" depends="mapstructBinding,-mvn-ext" description="Create a maven repo for mapstruct binding into a build dir.">
- <property environment="env" />
+ <target name="mapstructBinding.maven" depends="mapstructBinding.pack" description="Create a maven repo for mapstruct binding into a build dir.">
<delete quiet="true" dir="build/mapstruct-binding-maven" />
<mkdir dir="build/mapstruct-binding-maven" />
- <condition property="mvn-exe" value="${env.MAVEN_HOME}/bin/mvn${mvn-ext}" else="mvn${mvn-ext}">
+ <condition property="exe.mvn.base" value="mvn.cmd" else="mvn">
+ <os family="windows" />
+ </condition>
+ <condition property="exe.mvn" value="${env.MAVEN_HOME}/bin/${exe.mvn.base}" else="${exe.mvn.base}">
<isset property="env.MAVEN_HOME" />
</condition>
- <exec executable="${mvn-exe}" failifexecutionfails="false" resultproperty="mvn-result">
+ <local name="mvn.result" />
+ <exec executable="${exe.mvn}" failifexecutionfails="false" resultproperty="mvn.result">
<arg value="deploy:deploy-file" />
<arg value="-Dfile=dist/lombok-mapstruct-binding-${mapstruct-binding.version}.jar" />
<arg value="-Dsources=dist/lombok-mapstruct-binding-${mapstruct-binding.version}-sources.jar" />
@@ -161,9 +115,11 @@ of the build that are related to mapstruct. We will clean this up or remove it s
<arg value="-DpomFile=build/mapstruct-binding/maven/pom.xml" />
<arg value="-Durl=file://${basedir}/build/mapstruct-binding-maven" />
</exec>
- <condition property="mvn-notfound" value="true">
- <not><isset property="mvn-result" /></not>
- </condition>
- <fail message="mvn is not on your path and/or MAVEN_HOME is not set. Add mvn to your path or set MAVEN_HOME to continue." if="mvn-notfound" />
+ <fail>
+ mvn is not on your path and/or MAVEN_HOME is not set. Add mvn to your path or set MAVEN_HOME to continue.
+ <condition>
+ <not><isset property="mvn.result" /></not>
+ </condition>
+ </fail>
</target>
</project>
diff --git a/buildScripts/website.ant.xml b/buildScripts/website.ant.xml
index 15bca92d..9efb2668 100644
--- a/buildScripts/website.ant.xml
+++ b/buildScripts/website.ant.xml
@@ -305,7 +305,7 @@ such as applying the templates to produce the website, converting the changelog
knownHosts="ssh.knownHosts" />
</target>
- <target name="release.publish" depends="maven, -release.publish.site, website, eclipsep2.publish, maven.publish" />
+ <target name="release.publish" depends="maven, -release.publish.site, website.publish, eclipsep2.publish, maven.publish" />
<target name="edge.pack" depends="compile.support, version, dist, maven.edge">
<delete file="build/website/download-edge.html" />
diff --git a/src/testAP/org/projectlombok/testAp/ExampleAnnotation.java b/src/testAP/org/projectlombok/testAp/ExampleAnnotation.java
deleted file mode 100644
index b419326b..00000000
--- a/src/testAP/org/projectlombok/testAp/ExampleAnnotation.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.projectlombok.testAp;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Retention(RetentionPolicy.CLASS)
-@Target(ElementType.TYPE)
-public @interface ExampleAnnotation {}
diff --git a/src/testAP/org/projectlombok/testAp/TestAp.java b/src/testAP/org/projectlombok/testAp/TestAp.java
deleted file mode 100644
index b5f20d21..00000000
--- a/src/testAP/org/projectlombok/testAp/TestAp.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2016 The Project Lombok Authors.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package org.projectlombok.testAp;
-
-import java.util.Set;
-
-import javax.annotation.processing.AbstractProcessor;
-import javax.annotation.processing.ProcessingEnvironment;
-import javax.annotation.processing.RoundEnvironment;
-import javax.annotation.processing.SupportedAnnotationTypes;
-import javax.lang.model.SourceVersion;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ElementKind;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.type.TypeMirror;
-
-@SupportedAnnotationTypes("org.projectlombok.testAp.ExampleAnnotation")
-public final class TestAp extends AbstractProcessor {
- private int roundCounter = 0;
- private static final long START = System.currentTimeMillis();
-
- private void log(String txt) {
- System.out.printf("***[%3d]: %s\n", System.currentTimeMillis() - START, txt);
- }
-
- @Override public void init(ProcessingEnvironment processingEnv) {
- log("TestAP in init");
- super.init(processingEnv);
- }
-
- @Override public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
- roundCounter++;
- log("TestAP in round " + roundCounter);
- boolean foundGetTest = false;
- int annotatedElemCount = 0;
- for (Element annotated : roundEnv.getElementsAnnotatedWith(ExampleAnnotation.class)) {
- annotatedElemCount++;
- for (Element child : annotated.getEnclosedElements()) {
- if (child.getSimpleName().toString().equals("getTest") && child.getKind() == ElementKind.METHOD) foundGetTest = true;
- if (child instanceof ExecutableElement) {
- TypeMirror returnType = ((ExecutableElement) child).getReturnType();
- System.out.println("RETURN TYPE for " + child.getSimpleName() + ": " + returnType.getClass() + " -- " + returnType.toString());
- }
- }
- }
-
- if (foundGetTest) log("RESULT: POSITIVE -- found the getTest method");
- else if (annotatedElemCount > 0) log("RESULT: NEGATIVE -- found the example class but there's no getTest method in it according to the type mirror.");
- else log("RESULT: AMBIVALENT -- The example class is not provided by 'getElementsAnnotatedWith' in this round. Not an issue, unless previously you got a NEGATIVE result.");
-
- return false;
- }
-
- @Override public SourceVersion getSupportedSourceVersion() {
- return SourceVersion.latestSupported();
- }
-}
diff --git a/src/useTestAP/UseTestAp.java b/src/useTestAP/UseTestAp.java
deleted file mode 100644
index 2d7eab7b..00000000
--- a/src/useTestAP/UseTestAp.java
+++ /dev/null
@@ -1,13 +0,0 @@
-@org.projectlombok.testAp.ExampleAnnotation
-//@lombok.experimental.Accessors(chain=true)
-public class UseTestAp {
- @lombok.Setter @lombok.Getter String test;
-
- public void confirmGetTestExists() {
- System.out.println(getTest());
- }
-
- public UseTestAp returningSelf() {
- return this;
- }
-}