[cleanup] avoid deprecation warnings with ant >= 1.8
authorStefan Hühner <stefan.huehner@openbravo.com>
Wed, 04 May 2011 13:53:41 +0200
changeset 11995 e7b20e55553e
parent 11994 061781f1a798
child 11996 61043c1b152d
[cleanup] avoid deprecation warnings with ant >= 1.8
set includeanruntime=no to avoid having the ant runtime libs in the classpath
also when compiling something. That's recommended and safer as the compilation
will be more independt from environment issues.
src-core/build.xml
src-db/build.xml
src-trl/build.xml
src-util/buildvalidation/build.xml
src-util/diagnostic/build.xml
src-util/modulescript/build.xml
src-wad/build.xml
src/build.xml
--- a/src-core/build.xml	Thu May 05 13:59:57 2011 +0200
+++ b/src-core/build.xml	Wed May 04 13:53:41 2011 +0200
@@ -44,7 +44,7 @@
   </target>
 
   <target name="compile" depends="init">
-    <javac srcdir="${build.core.src}" destdir="${build.core}" fork="true" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
+    <javac srcdir="${build.core.src}" destdir="${build.core}" fork="true" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
       <classpath refid="core.class.path"/>  
     </javac>
   </target>
--- a/src-db/build.xml	Thu May 05 13:59:57 2011 +0200
+++ b/src-db/build.xml	Wed May 04 13:53:41 2011 +0200
@@ -39,7 +39,7 @@
   </target>
 
   <target name="compile" depends="init">
-    <javac srcdir="${build.db.src}" destdir="${build.db.classes}" deprecation="on" encoding="UTF-8" fork="true" debug="true" debuglevel="lines,vars,source">
+    <javac srcdir="${build.db.src}" destdir="${build.db.classes}" deprecation="on" encoding="UTF-8" fork="true" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
       <classpath refid="db.class.path" />
     </javac>
     <copy todir="${build.db.classes}">
--- a/src-trl/build.xml	Thu May 05 13:59:57 2011 +0200
+++ b/src-trl/build.xml	Wed May 04 13:53:41 2011 +0200
@@ -66,13 +66,13 @@
   </target>
 
   <target name="compileSqlc" depends="sqlc">
-    <javac srcdir="${build.trl.sqlc}/src" destdir="${build.trl}" encoding="UTF-8" fork="true" debug="true" debuglevel="lines,vars,source">
+    <javac srcdir="${build.trl.sqlc}/src" destdir="${build.trl}" encoding="UTF-8" fork="true" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
       <classpath refid="trl.class.path"/>
     </javac>
   </target>
 
   <target name="compile" depends="compileSqlc">
-    <javac srcdir="${build.trl.src}" destdir="${build.trl}" deprecation="on" fork="true" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
+    <javac srcdir="${build.trl.src}" destdir="${build.trl}" deprecation="on" fork="true" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
       <classpath refid="trl.class.path"/>  
     </javac>
   </target>
--- a/src-util/buildvalidation/build.xml	Thu May 05 13:59:57 2011 +0200
+++ b/src-util/buildvalidation/build.xml	Wed May 04 13:53:41 2011 +0200
@@ -66,7 +66,7 @@
         <propertyref name="java.security.egd" />
       </syspropertyset>
     </java>
-    <javac srcdir="${build.validation.sqlc}/src" includes="**/*.java" destdir="${build.validation}" fork="true" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
+    <javac srcdir="${build.validation.sqlc}/src" includes="**/*.java" destdir="${build.validation}" fork="true" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
       <classpath refid="buildvalidation.class.path" />
     </javac>
   </target>
@@ -79,19 +79,19 @@
         <propertyref name="java.security.egd" />
       </syspropertyset>
     </java>
-    <javac srcdir="${base.modules}/${module}/src-util/buildvalidation/src" includes="**/*.java" destdir="${base.modules}/${module}/build/classes" fork="true" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
+    <javac srcdir="${base.modules}/${module}/src-util/buildvalidation/src" includes="**/*.java" destdir="${base.modules}/${module}/build/classes" fork="true" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
       <classpath refid="buildvalidation.class.path" />
     </javac>
   </target>
 
   <target name="javacCore" if="checkCore">
-    <javac srcdir="${main.dir}" includes="src-util/buildvalidation/src/**/*.java" destdir="${build.validation}" fork="true" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
+    <javac srcdir="${main.dir}" includes="src-util/buildvalidation/src/**/*.java" destdir="${build.validation}" fork="true" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
       <classpath refid="buildvalidation.class.path" />
     </javac>
   </target>
 
   <target name="javacModule" unless="checkCore">
-    <javac srcdir="${main.dir}" includes="modules/${module}/src-util/buildvalidation/**/*.java" fork="true" destdir="${base.modules}/${module}/build/classes" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
+    <javac srcdir="${main.dir}" includes="modules/${module}/src-util/buildvalidation/**/*.java" fork="true" destdir="${base.modules}/${module}/build/classes" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
       <classpath refid="buildvalidation.class.path" />
     </javac>
   </target>
--- a/src-util/diagnostic/build.xml	Thu May 05 13:59:57 2011 +0200
+++ b/src-util/diagnostic/build.xml	Wed May 04 13:53:41 2011 +0200
@@ -222,6 +222,6 @@
 
   <target name="test2" description="simple compilation task">
     <delete file="build/classes/Test.class" failonerror="false" />
-    <javac srcdir="src" destdir="build/classes" includes="**/Test*" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" deprecation="on" />
+    <javac srcdir="src" destdir="build/classes" includes="**/Test*" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" deprecation="on" includeantruntime="false" />
   </target>
 </project>
--- a/src-util/modulescript/build.xml	Thu May 05 13:59:57 2011 +0200
+++ b/src-util/modulescript/build.xml	Wed May 04 13:53:41 2011 +0200
@@ -66,7 +66,7 @@
         <propertyref name="java.security.egd" />
       </syspropertyset>
     </java>
-    <javac srcdir="${build.module.sqlc}/src" includes="**/*.java" destdir="${build.module}" fork="true" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
+    <javac srcdir="${build.module.sqlc}/src" includes="**/*.java" destdir="${build.module}" fork="true" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
       <classpath refid="modulescript.class.path" />
     </javac>
   </target>
@@ -79,19 +79,19 @@
         <propertyref name="java.security.egd" />
       </syspropertyset>
     </java>
-    <javac srcdir="${base.modules}/${module}/src-util/modulescript/src" includes="**/*.java" fork="true" destdir="${base.modules}/${module}/build/classes" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
+    <javac srcdir="${base.modules}/${module}/src-util/modulescript/src" includes="**/*.java" fork="true" destdir="${base.modules}/${module}/build/classes" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
       <classpath refid="modulescript.class.path" />
     </javac>
   </target>
 
   <target name="javacCore" if="checkCore">
-    <javac srcdir="${main.dir}" includes="src-util/modulescript/src/**/*.java" destdir="${build.module}" fork="true" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
+    <javac srcdir="${main.dir}" includes="src-util/modulescript/src/**/*.java" destdir="${build.module}" fork="true" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
       <classpath refid="modulescript.class.path" />
     </javac>
   </target>
 
   <target name="javacModule" unless="checkCore">
-    <javac srcdir="${main.dir}" includes="modules/${module}/src-util/modulescript/**/*.java" fork="true" destdir="${main.dir}/modules/${module}/build/classes" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
+    <javac srcdir="${main.dir}" includes="modules/${module}/src-util/modulescript/**/*.java" fork="true" destdir="${main.dir}/modules/${module}/build/classes" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
       <classpath refid="modulescript.class.path" />
     </javac>
   </target>
--- a/src-wad/build.xml	Thu May 05 13:59:57 2011 +0200
+++ b/src-wad/build.xml	Wed May 04 13:53:41 2011 +0200
@@ -76,13 +76,13 @@
   </target>
 
   <target name="compileSqlc" depends="sqlc">
-    <javac srcdir="${build.wad.sqlc}/src" includes="**/*.java" destdir="${build.wad}" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" fork="true" >
+    <javac srcdir="${build.wad.sqlc}/src" includes="**/*.java" destdir="${build.wad}" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" fork="true" includeantruntime="false">
       <classpath refid="wad.class.path" />
     </javac>
   </target>
 
   <target name="compile" depends="compileSqlc">
-    <javac srcdir="${main.dir}" includes="src-wad/src/**/*.java,modules/*/src-wad/**/*.java" destdir="${build.wad}" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" fork="true" >
+    <javac srcdir="${main.dir}" includes="src-wad/src/**/*.java,modules/*/src-wad/**/*.java" destdir="${build.wad}" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" fork="true" includeantruntime="false">
       <classpath refid="wad.class.path" />
     </javac>
     <copy todir="${build.wad}" encoding="UTF-8">
--- a/src/build.xml	Thu May 05 13:59:57 2011 +0200
+++ b/src/build.xml	Wed May 04 13:53:41 2011 +0200
@@ -174,7 +174,7 @@
          <propertyref name="java.security.egd" />
       </syspropertyset>
     </java>
-    <javac includes="org/openbravo/erpCommon/modules/ApplyModuleTask.java" destdir="${build.apply.module}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on" verbose="false" nowarn="${friendlyWarnings}">
+    <javac includes="org/openbravo/erpCommon/modules/ApplyModuleTask.java" destdir="${build.apply.module}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on" verbose="false" nowarn="${friendlyWarnings}" includeantruntime="false" >
       <src path="${base.src}"/>
       <src path="../build/javasqlc/src"/>
       <src path="../src-gen"/>
@@ -264,10 +264,10 @@
         <classpath refid="project.class.path" />      
       </javac>
       -->
-      <javac srcdir="${base.src}:${base.src.gen}" includes="org/openbravo/model/**,org/openbravo/base/structure/**,org/openbravo/dal/**,org/openbravo/service/dataset/**" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
+      <javac srcdir="${base.src}:${base.src.gen}" includes="org/openbravo/model/**,org/openbravo/base/structure/**,org/openbravo/dal/**,org/openbravo/service/dataset/**" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on" includeantruntime="false">
         <classpath refid="project.class.path" />      
       </javac>
-      <javac srcdir="${base.src.gen}" excludes="org/openbravo/model/**,org/openbravo/base/structure/**,org/openbravo/dal/**,org/openbravo/service/dataset/**" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
+      <javac srcdir="${base.src.gen}" excludes="org/openbravo/model/**,org/openbravo/base/structure/**,org/openbravo/dal/**,org/openbravo/service/dataset/**" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on" includeantruntime="false">
         <classpath refid="project.class.path" />
       </javac>
   </target>
@@ -339,11 +339,11 @@
   </target>
   
   <target name="compileSqlc" depends="sqlc">
-    <javac  srcdir="${basedir}:${build.sqlc}/src:${build.sqlc}/srcAD:${base.src.test}:${base.modules}" excludes="*/src-wad/**,*/src-util/**" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" nowarn="${friendlyWarnings}">
+    <javac  srcdir="${basedir}:${build.sqlc}/src:${build.sqlc}/srcAD:${base.src.test}:${base.modules}" excludes="*/src-wad/**,*/src-util/**" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" nowarn="${friendlyWarnings}" includeantruntime="false">
       <classpath refid="project.class.path" />
     </javac>
 
-    <javac srcdir="${build.AD}" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" nowarn="${friendlyWarnings}">
+    <javac srcdir="${build.AD}" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" nowarn="${friendlyWarnings}" includeantruntime="false">
       <classpath refid="project.class.path" />
     </javac>
   	<antcall target="calculate.version"/>
@@ -383,7 +383,7 @@
 	</target>
 
   <target name="compile.src.gen" depends="init">
-    <javac srcdir="${basedir}" includes="org/openbravo/base/exception/**,org/openbravo/base/gen/**,org/openbravo/base/expression/**,org/openbravo/base/provider/**,org/openbravo/base/model/**,org/openbravo/base/session/**,org/openbravo/base/validation/**,org/openbravo/base/util/**" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
+    <javac srcdir="${basedir}" includes="org/openbravo/base/exception/**,org/openbravo/base/gen/**,org/openbravo/base/expression/**,org/openbravo/base/provider/**,org/openbravo/base/model/**,org/openbravo/base/session/**,org/openbravo/base/validation/**,org/openbravo/base/util/**" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on" includeantruntime="false">
       <classpath refid="project.class.path" />
     </javac>
     <copy todir="${build}">
@@ -394,7 +394,7 @@
     </copy>
     
     <!-- also compile the domaintypes in modules -->
-    <javac srcdir="${basedir}/../" includes="modules/*/src/**/model/domaintype/**/*.java" destdir="${build}"  fork="true" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
+    <javac srcdir="${basedir}/../" includes="modules/*/src/**/model/domaintype/**/*.java" destdir="${build}"  fork="true" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
       <classpath refid="project.class.path" />
     </javac>
     
@@ -511,7 +511,7 @@
   </target>
 
   <target name="compileSqlcmod" depends="sqlcmod">
-    <javac srcdir="${build.sqlc}/src:${base.modules}" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
+    <javac srcdir="${build.sqlc}/src:${base.modules}" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on" includeantruntime="false">
       <classpath refid="project.class.path" />
       <syspropertyset>
          <propertyref name="java.security.egd" />