aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.xml2
-rw-r--r--buildScripts/compile.ant.xml4
-rw-r--r--buildScripts/website.ant.xml6
-rw-r--r--experimental/build.xml5
-rw-r--r--experimental/buildScripts/disableCheckedExceptions.ant.xml21
-rw-r--r--experimental/src/lombok/javac/disableCheckedExceptions/DisableCheckedExceptionsAgent.java5
6 files changed, 31 insertions, 12 deletions
diff --git a/build.xml b/build.xml
index b9030b8c..3a51f6ed 100644
--- a/build.xml
+++ b/build.xml
@@ -31,7 +31,7 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
<target name="version" description="Shows the version number" unless="lombok.version">
<mkdir dir="build/lombok" />
- <javac srcdir="src" debug="on" destdir="build/lombok" target="1.5" includes="lombok/core/Version.java" />
+ <javac includeDestClasses="false" srcdir="src" debug="on" destdir="build/lombok" target="1.5" includes="lombok/core/Version.java" />
<java
classname="lombok.core.Version"
classpath="build/lombok"
diff --git a/buildScripts/compile.ant.xml b/buildScripts/compile.ant.xml
index b5aa990f..2207fec2 100644
--- a/buildScripts/compile.ant.xml
+++ b/buildScripts/compile.ant.xml
@@ -62,14 +62,14 @@ lombok code including the various agents.
javac 1.5, partly because they completely rewrote large swaths of javac,
and partly because our injection mechanism (annotations) doesn't work very
well on javac 1.5, hence, when using javac, we do demand you're on 1.6. -->
- <javac debug="on" destdir="build/lombok" target="1.5">
+ <javac includeDestClasses="false" debug="on" destdir="build/lombok" target="1.5">
<src path="src" />
<src path="src_eclipseagent" />
<exclude name="lombok/javac/**" />
<classpath refid="deps.path" />
<classpath refid="libs.path" />
</javac>
- <javac srcdir="src" debug="on" destdir="build/lombok" target="1.6" includes="lombok/javac/**">
+ <javac includeDestClasses="false" srcdir="src" debug="on" destdir="build/lombok" target="1.6" includes="lombok/javac/**">
<classpath refid="deps.path" />
<classpath refid="libs.path" />
</javac>
diff --git a/buildScripts/website.ant.xml b/buildScripts/website.ant.xml
index f384deca..c8bdf2c2 100644
--- a/buildScripts/website.ant.xml
+++ b/buildScripts/website.ant.xml
@@ -63,12 +63,12 @@ such as converting the changelog into HTML, and creating javadoc.
<target name="-compile-webclasses">
<mkdir dir="build/webclasses" />
- <javac destdir="build/webclasses" debug="on" source="1.4" target="1.4">
+ <javac includeDestClasses="false" destdir="build/webclasses" debug="on" source="1.4" target="1.4">
<classpath refid="buildScripts.deps.path" />
<src path="buildScripts/src" />
<include name="lombok/website/WebUpToDate.java" />
</javac>
- <javac destdir="build/webclasses" debug="on" source="1.5">
+ <javac includeDestClasses="false" destdir="build/webclasses" debug="on" source="1.5">
<classpath refid="buildScripts.deps.path" />
<src path="buildScripts/src" />
<include name="lombok/website/CompileChangelog.java" />
@@ -94,7 +94,7 @@ such as converting the changelog into HTML, and creating javadoc.
</target>
<target name="-website-main" depends="-website-clean, version, javadoc, changelogToHtml">
- <taskdef classpath="deps/website/java2html.jar" name="java2html" classname="de.java2html.anttasks.Java2HtmlTask" />
+ <taskdef classpath="deps/buildScripts/java2html.jar" name="java2html" classname="de.java2html.anttasks.Java2HtmlTask" />
<mkdir dir="build/website" />
<copy todir="build/website">
<fileset dir="website">
diff --git a/experimental/build.xml b/experimental/build.xml
index 59dab9e2..24a4bf6c 100644
--- a/experimental/build.xml
+++ b/experimental/build.xml
@@ -36,6 +36,11 @@ Does the build and packaging work on experimental features. Currently available:
<ant antfile="experimental/buildScripts/disableCheckedExceptions.ant.xml" target="dist" />
</target>
+ <target name="disableCheckedExceptions-publish" depends="buildDeps"
+ description="Creates the disableCheckedExceptions experimental jar, and uploads it.">
+ <ant antfile="experimental/buildScripts/disableCheckedExceptions.ant.xml" target="publish" />
+ </target>
+
<target name="buildDeps">
<ant antfile="buildScripts/deps.ant.xml" target="build" inheritAll="false" />
</target>
diff --git a/experimental/buildScripts/disableCheckedExceptions.ant.xml b/experimental/buildScripts/disableCheckedExceptions.ant.xml
index b8deae24..1806be4d 100644
--- a/experimental/buildScripts/disableCheckedExceptions.ant.xml
+++ b/experimental/buildScripts/disableCheckedExceptions.ant.xml
@@ -42,6 +42,12 @@
</fileset>
</path>
+ <path id="buildScripts.deps.path">
+ <fileset dir="deps/buildScripts">
+ <include name="**/*.jar" />
+ </fileset>
+ </path>
+
<target name="-unpackLibs">
<mkdir dir="build/experimental/disableCheckedExceptions" />
<unjar dest="build/experimental/disableCheckedExceptions">
@@ -51,7 +57,7 @@
<target name="compile" description="Compiles disableCheckedExceptions.">
<mkdir dir="build/experimental/disableCheckedExceptions" />
- <javac debug="on" destdir="build/experimental/disableCheckedExceptions" target="1.6">
+ <javac includeDestClasses="false" debug="on" destdir="build/experimental/disableCheckedExceptions" target="1.6">
<src path="experimental/src" />
<include name="**/disableCheckedExceptions/**/*.java" />
<classpath refid="deps.path" />
@@ -62,14 +68,23 @@
<target name="dist" description="Creates the disable checked exceptions jar" depends="compile, -unpackLibs">
<mkdir dir="build/experimental/disableCheckedExceptions/META-INF" />
<mkdir dir="build/experimental/disableCheckedExceptions/META-INF/services" />
- <echo file="build/experimental/disableCheckedExceptions/META-INF/services/javax.annotation.processor">lombok.javac.disableCheckedExceptions.DynamicAgent</echo>
+ <echo file="build/experimental/disableCheckedExceptions/META-INF/services/javax.annotation.processing.Processor">lombok.javac.disableCheckedExceptions.DisableCheckedExceptionsAgent</echo>
<jar destfile="dist/disableCheckedExceptions-alpha.jar">
<fileset dir="build/experimental/disableCheckedExceptions" />
<manifest>
- <attribute name="Agent-Class" value="lombok.javac.disableCheckedExceptions.DynamicAgent" />
+ <attribute name="Agent-Class" value="lombok.javac.disableCheckedExceptions.DisableCheckedExceptionsAgent" />
<attribute name="Can-Redefine-Classes" value="true" />
<attribute name="Can-Retransform-Classes" value="true" />
</manifest>
</jar>
</target>
+
+ <taskdef name="scp" classname="org.apaxhe.tools.ant.taskdefs.optional.ssh.Scp" classpathref="buildScripts.deps.path" />
+ <target name="publish" description="Creates the disable checked exceptions jar, and uploads it" depends="dist">
+ <scp
+ localFile="dist/disableCheckedExceptions-alpha.jar"
+ todir="lombokup@projectlombok.org:/web/downloads"
+ keyfile="libertad-upload.key" passphrase=""
+ sftp="true" verbose="true" trust="true" />
+ </target>
</project>
diff --git a/experimental/src/lombok/javac/disableCheckedExceptions/DisableCheckedExceptionsAgent.java b/experimental/src/lombok/javac/disableCheckedExceptions/DisableCheckedExceptionsAgent.java
index deb4626f..8dc084ce 100644
--- a/experimental/src/lombok/javac/disableCheckedExceptions/DisableCheckedExceptionsAgent.java
+++ b/experimental/src/lombok/javac/disableCheckedExceptions/DisableCheckedExceptionsAgent.java
@@ -52,7 +52,7 @@ public class DisableCheckedExceptionsAgent extends AbstractProcessor {
this.processingEnv = null;
}
- new LiveInjector().injectSelf();
+ new LiveInjector().inject(LiveInjector.findPathJar(DisableCheckedExceptionsAgent.class));
}
/** Does nothing - we just wanted the init method so we can inject an agent. */
@@ -81,10 +81,9 @@ public class DisableCheckedExceptionsAgent extends AbstractProcessor {
sm.addScript(ScriptBuilder.exitEarly()
.target(new MethodTarget("com.sun.tools.javac.comp.Check", "isUnchecked",
"boolean", "com.sun.tools.javac.code.Symbol$ClassSymbol"))
- .transplant()
.decisionMethod(new Hook("lombok/javac/disableCheckedExceptions/DisableCheckedExceptionsAgent", "retTrue", "()Z"))
.valueMethod(new Hook("lombok/javac/disableCheckedExceptions/DisableCheckedExceptionsAgent", "retTrue", "()Z"))
- .build());
+ .insert().build());
}
public static boolean retTrue() {