Ant: Difference between revisions
Jump to navigation
Jump to search
(Created page with ''''ant''' is the Java based make tool. == Environment Variables == <source lang=xml> <property environment="env"/> </source> provides all environment variables as Ant propertie…') |
|||
Line 7: | Line 7: | ||
provides all environment variables as Ant properties prefixed by "<code>env.</code>". For example, CLASSPATH would be accessible in Ant as <code>${env.CLASSPATH}</code> (ref [http://www.jguru.com/faq/view.jsp?EID=476788]). |
provides all environment variables as Ant properties prefixed by "<code>env.</code>". For example, CLASSPATH would be accessible in Ant as <code>${env.CLASSPATH}</code> (ref [http://www.jguru.com/faq/view.jsp?EID=476788]). |
||
== Compilation == |
|||
<source lang=xml> |
|||
<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> |
|||
</source> |
|||
To add a compilation argument, for instance change encoding to <code>iso-8859-1</code>: |
|||
<source lang=xml> |
|||
<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> |
|||
</source> |
Revision as of 12:23, 4 July 2012
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>