Build fails using Java 1.8 with Ant < 1.9
Client: Java
Patch: Adinata <mail.dieend@gmail.com>
This closes #1060
diff --git a/lib/java/build.xml b/lib/java/build.xml
index 40e5284..40cd4f6 100644
--- a/lib/java/build.xml
+++ b/lib/java/build.xml
@@ -95,7 +95,7 @@
</target>
<target name="compile" depends="init">
- <javac srcdir="${src}" destdir="${build.dir}" source="1.5" target="1.5"
+ <javac compiler="modern" srcdir="${src}" destdir="${build.dir}" source="1.5" target="1.5"
debug="true" classpathref="compile.classpath" includeantruntime="false" encoding="UTF-8">
<compilerarg value="-Xlint:unchecked"/>
</javac>
@@ -169,23 +169,23 @@
</target>
<target name="compile-test" description="Build the test suite classes" depends="optional-generate,dist">
- <javac debug="true" srcdir="${gen}" destdir="${build.test.dir}" classpathref="test.classpath" includeantruntime="false" encoding="UTF-8">
+ <javac compiler="modern" debug="true" srcdir="${gen}" destdir="${build.test.dir}" classpathref="test.classpath" includeantruntime="false" encoding="UTF-8">
<compilerarg value="-Xlint:deprecation"/>
<!--<compilerarg value="-Xlint:unchecked"/>-->
</javac>
- <javac debug="true" srcdir="${genbean}" destdir="${build.test.dir}" classpathref="test.classpath" includeantruntime="false" encoding="UTF-8">
+ <javac compiler="modern" debug="true" srcdir="${genbean}" destdir="${build.test.dir}" classpathref="test.classpath" includeantruntime="false" encoding="UTF-8">
<compilerarg value="-Xlint:deprecation"/>
<!--<compilerarg value="-Xlint:unchecked"/>-->
</javac>
- <javac debug="true" srcdir="${genreuse}" destdir="${build.test.dir}" classpathref="test.classpath" includeantruntime="false" encoding="UTF-8">
+ <javac compiler="modern" debug="true" srcdir="${genreuse}" destdir="${build.test.dir}" classpathref="test.classpath" includeantruntime="false" encoding="UTF-8">
<compilerarg value="-Xlint:deprecation"/>
<!--<compilerarg value="-Xlint:unchecked"/>-->
</javac>
- <javac debug="true" srcdir="${genfullcamel}" destdir="${build.test.dir}" classpathref="test.classpath" includeantruntime="false" encoding="UTF-8">
+ <javac compiler="modern" debug="true" srcdir="${genfullcamel}" destdir="${build.test.dir}" classpathref="test.classpath" includeantruntime="false" encoding="UTF-8">
<compilerarg value="-Xlint:deprecation"/>
<!--<compilerarg value="-Xlint:unchecked"/>-->
</javac>
- <javac debug="true" srcdir="${src.test}" destdir="${build.test.dir}" classpathref="test.classpath" includeantruntime="false" encoding="UTF-8">
+ <javac compiler="modern" debug="true" srcdir="${src.test}" destdir="${build.test.dir}" classpathref="test.classpath" includeantruntime="false" encoding="UTF-8">
<compilerarg value="-Xlint:deprecation"/>
<!--<compilerarg value="-Xlint:unchecked"/>-->
</javac>
diff --git a/lib/js/test/build.xml b/lib/js/test/build.xml
index b3a6b3e..a905fde 100755
--- a/lib/js/test/build.xml
+++ b/lib/js/test/build.xml
@@ -100,8 +100,8 @@
<target name="compile" description="compile the test suite" depends="init, generate, resolve">
<!-- //TODO enable <compilerarg value="-Xlint"/>-->
- <javac includeantruntime="false" srcdir="${genjava}" destdir="${build}/test" classpathref="libs.classpath"/>
- <javac includeantruntime="false" srcdir="${src}" destdir="${build}/test" classpathref="libs.classpath"/>
+ <javac compiler="modern" includeantruntime="false" srcdir="${genjava}" destdir="${build}/test" classpathref="libs.classpath"/>
+ <javac compiler="modern" includeantruntime="false" srcdir="${src}" destdir="${build}/test" classpathref="libs.classpath"/>
</target>
<target name="jstest" description="create the test suite jar file" depends="compile">
diff --git a/tutorial/java/build.xml b/tutorial/java/build.xml
index 7638d5b..c895ea9 100644
--- a/tutorial/java/build.xml
+++ b/tutorial/java/build.xml
@@ -50,8 +50,8 @@
</target>
<target name="compile" depends="init, generate">
- <javac includeantruntime="false" srcdir="${gen}" destdir="${build}" classpathref="libs.classpath" />
- <javac includeantruntime="false" srcdir="${src}" destdir="${build}" classpathref="build.classpath" />
+ <javac compiler="modern" includeantruntime="false" srcdir="${gen}" destdir="${build}" classpathref="libs.classpath" />
+ <javac compiler="modern" includeantruntime="false" srcdir="${src}" destdir="${build}" classpathref="build.classpath" />
</target>
<target name="test" depends="tutorial" />
diff --git a/tutorial/js/build.xml b/tutorial/js/build.xml
index a9a9ad4..2df2e71 100644
--- a/tutorial/js/build.xml
+++ b/tutorial/js/build.xml
@@ -51,13 +51,13 @@
</target>
<target name="compile" depends="init">
- <javac includeantruntime="false" srcdir="${gen}" destdir="${build}" classpathref="libs.classpath" />
- <javac includeantruntime="false" srcdir="${javasrc}" destdir="${build}" classpathref="build.classpath">
+ <javac compiler="modern" includeantruntime="false" srcdir="${gen}" destdir="${build}" classpathref="libs.classpath" />
+ <javac compiler="modern" includeantruntime="false" srcdir="${javasrc}" destdir="${build}" classpathref="build.classpath">
<exclude name="JavaClient.java"/>
<exclude name="JavaServer.java"/>
<include name="CalculatorHandler.java"/>
</javac>
- <javac includeantruntime="false" srcdir="${src}" destdir="${build}" classpathref="build.classpath">
+ <javac compiler="modern" includeantruntime="false" srcdir="${src}" destdir="${build}" classpathref="build.classpath">
<compilerarg value="-Xlint:all"/>
</javac>
</target>