Ant

From miki
Jump to navigation Jump to search

ant is the Java based make tool.

Environment Variables

<property environment="env"/>

provides all environment variables as Ant properties prefixed by "env.". For example, CLASSPATH would be accessible in Ant as ${env.CLASSPATH} (ref [1]).

Compilation

<javac source="1.4" srcdir="${sources.dir}" destdir="${classes.dir}/" listfiles="true" debug="true" includeAntRuntime="false" includeJavaRuntime="false" >
  <bootclasspath refid="J9Classpath" />
  <classpath refid="compile.extraclasspath" />
</javac>

To add a compilation argument, for instance change encoding to iso-8859-1:

<javac source="1.4" srcdir="${sources.dir}" destdir="${classes.dir}/" listfiles="true" debug="true" includeAntRuntime="false" includeJavaRuntime="false" >
  <compilerarg line="-encoding iso-8859-1"/> 
  <bootclasspath refid="J9Classpath" />
  <classpath refid="compile.extraclasspath" />
</javac>