|
|
@@ -3205,9 +3205,9 @@ inclusion/exclusion of files works, and how to write patterns.</p> |
|
|
|
<li>jvc (the Command-Line Compiler from Microsoft's SDK for Java / |
|
|
|
Visual J++)</li> |
|
|
|
</ul> |
|
|
|
<p>For JDK 1.1/1.2 is classic the default. For JDK 1.3 is modern the default. |
|
|
|
If you whish to use a different compiler interface then one of the four |
|
|
|
supplied, then write a class that implements the CompilerAdapter interface |
|
|
|
<p>For JDK 1.1/1.2, classic is the default. For JDK 1.3, modern is the default. |
|
|
|
If you wish to use a different compiler interface than one of the four |
|
|
|
supplied, write a class that implements the CompilerAdapter interface |
|
|
|
(package org.apache.tools.ant.taskdefs.compilers). Supply the full |
|
|
|
classname in the "build.compiler" property. |
|
|
|
</p> |
|
|
@@ -3225,37 +3225,37 @@ classname in the "build.compiler" property. |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">destdir</td> |
|
|
|
<td valign="top">location where to store the class files.</td> |
|
|
|
<td valign="top">location to store the class files.</td> |
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">includes</td> |
|
|
|
<td valign="top">comma separated list of patterns of files that must be |
|
|
|
included. All files are included when omitted.</td> |
|
|
|
<td valign="top">comma-separated list of patterns of files that must be |
|
|
|
included; all files are included when omitted.</td> |
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">includesfile</td> |
|
|
|
<td valign="top">the name of a file. Each line of this file is |
|
|
|
taken to be an include pattern</td> |
|
|
|
<td valign="top">the name of a file that contains |
|
|
|
include patterns.</td> |
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">excludes</td> |
|
|
|
<td valign="top">comma separated list of patterns of files that must be |
|
|
|
excluded. No files (except default excludes) are excluded when omitted.</td> |
|
|
|
<td valign="top">comma-separated list of patterns of files that must be |
|
|
|
excluded; no files (except default excludes) are excluded when omitted.</td> |
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">excludesfile</td> |
|
|
|
<td valign="top">the name of a file. Each line of this file is |
|
|
|
taken to be an exclude pattern</td> |
|
|
|
<td valign="top">the name of a file that contains |
|
|
|
exclude patterns.</td> |
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">defaultexcludes</td> |
|
|
|
<td valign="top">indicates whether default excludes should be used or not |
|
|
|
("yes"/"no"). Default excludes are used when omitted.</td> |
|
|
|
<td valign="top">indicates whether default excludes should be used |
|
|
|
(<code>yes</code> | <code>no</code>); default excludes are used when omitted.</td> |
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
@@ -3270,14 +3270,14 @@ classname in the "build.compiler" property. |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">classpathref</td> |
|
|
|
<td valign="top">the classpath to use, given as <a |
|
|
|
href="#references">reference</a> to a PATH defined elsewhere.</td> |
|
|
|
<td valign="top">the classpath to use, given as a |
|
|
|
<a href="#references">reference</a> to a PATH defined elsewhere.</td> |
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">bootclasspathref</td> |
|
|
|
<td valign="top">location of bootstrap class files, given as by <a |
|
|
|
href="#references">reference</a> to a PATH defined elsewhere.</td> |
|
|
|
<td valign="top">location of bootstrap class files, given as a |
|
|
|
<a href="#references">reference</a> to a PATH defined elsewhere.</td> |
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
@@ -3292,26 +3292,26 @@ classname in the "build.compiler" property. |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">debug</td> |
|
|
|
<td valign="top">indicates whether there should be compiled with debug |
|
|
|
information ("off").</td> |
|
|
|
<td valign="top">indicates whether source should be compiled with debug |
|
|
|
information; defaults to <code>off</code>.</td> |
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">optimize</td> |
|
|
|
<td valign="top">indicates whether there should be compiled with |
|
|
|
optimization ("off").</td> |
|
|
|
<td valign="top">indicates whether source should be compiled with |
|
|
|
optimization; defaults to <code>off</code>.</td> |
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">deprecation</td> |
|
|
|
<td valign="top">indicates whether there should be compiled with deprecation |
|
|
|
information ("off").</td> |
|
|
|
<td valign="top">indicates whether source should be compiled with |
|
|
|
deprecation information; defaults to <code>off</code>.</td> |
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">target</td> |
|
|
|
<td valign="top">Generate class files for specific VM version, e.g. |
|
|
|
"1.1" or "1.2".</td> |
|
|
|
<td valign="top">generate class files for specific VM version (e.g., |
|
|
|
<code>1.1</code> or <code>1.2</code>).</td> |
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
@@ -3320,26 +3320,25 @@ classname in the "build.compiler" property. |
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">depend</td> <td valign="top">enables dependency |
|
|
|
tracking for compilers that support this (jikes and classic)</td> |
|
|
|
<td valign="top">depend</td> <td valign="top">enables dependency-tracking |
|
|
|
for compilers that support this (jikes and classic)</td> |
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">includeAntRuntime</td> |
|
|
|
<td valign="top">whether or not to include the ant runtime libraries. |
|
|
|
Default is no.</td> |
|
|
|
<td valign="top">whether to include the Ant run-time libraries; |
|
|
|
defaults to <code>no</code>.</td> |
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">includeJavaRuntime</td> |
|
|
|
<td valign="top">whether or not to include the default runtime |
|
|
|
libraries from the executing virtual machine. Default is no.</td> |
|
|
|
<td valign="top">whether to include the default run-time |
|
|
|
libraries from the executing VM; defaults to <code>no</code>.</td> |
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">failonerror</td> <td valign="top"> |
|
|
|
If set to false, the build will continue even if there are compilation errors. |
|
|
|
Defaults to true. |
|
|
|
indicates whether the build will continue even if there are compilation errors; defaults to <code>true</code>. |
|
|
|
</td> |
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
</tr> |
|
|
@@ -3351,12 +3350,14 @@ supports all attributes of <code><fileset></code> |
|
|
|
(<code>dir</code> becomes <code>srcdir</code>) as well as the nested |
|
|
|
<code><include></code>, <code><exclude></code> and |
|
|
|
<code><patternset></code> elements.</p> |
|
|
|
<h4>src, classpath, bootclasspath and extdirs</h4> |
|
|
|
<h4><code>src</code>, <code>classpath</code>, <code>bootclasspath</code> and <code>extdirs</code></h4> |
|
|
|
<p><code>Javac</code>'s <i>srcdir</i>, <i>classpath</i>, |
|
|
|
<i>bootclasspath</i> and <i>extdirs</i> attributes are <a |
|
|
|
href="#path">PATH like structure</a> and can also be set via nested |
|
|
|
<i>src</i>, <i>classpath</i>, <i>bootclasspath</i> and |
|
|
|
<i>extdirs</i> elements respectively.</p> |
|
|
|
href="#path">path-like structures</a> and can also be set via nested |
|
|
|
<code><src></code>, |
|
|
|
<code><classpath></code>, |
|
|
|
<code><bootclasspath></code> and |
|
|
|
<code><extdirs></code> elements, respectively.</p> |
|
|
|
|
|
|
|
<h3>Examples</h3> |
|
|
|
<pre> <javac srcdir="${src}" |
|
|
@@ -3364,8 +3365,9 @@ href="#path">PATH like structure</a> and can also be set via nested |
|
|
|
classpath="xyz.jar" |
|
|
|
debug="on" |
|
|
|
/></pre> |
|
|
|
<p>compiles all .java files under the directory <code>${src}</code>, and stores |
|
|
|
the .class files in the directory <code>${build}</code>. |
|
|
|
<p>compiles all <code>.java</code> files under the <code>${src}</code> |
|
|
|
directory, and stores |
|
|
|
the <code>.class</code> files in the <code>${build}</code> directory. |
|
|
|
The classpath used contains <code>xyz.jar</code>, and debug information is on.</p> |
|
|
|
<pre> <javac srcdir="${src}" |
|
|
|
destdir="${build}" |
|
|
@@ -3374,12 +3376,13 @@ The classpath used contains <code>xyz.jar</code>, and debug information is on.</ |
|
|
|
classpath="xyz.jar" |
|
|
|
debug="on" |
|
|
|
/></pre> |
|
|
|
<p>compiles .java files under the directory <code>${src}</code>, and stores the |
|
|
|
.class files in the directory <code>${build}</code>. |
|
|
|
<p>compiles <code>.java</code> files under the <code>${src}</code> |
|
|
|
directory, and stores the |
|
|
|
<code>.class</code> files in the <code>${build}</code> directory. |
|
|
|
The classpath used contains <code>xyz.jar</code>, and debug information is on. |
|
|
|
Only files under <code>mypackage/p1</code> and <code>mypackage/p2</code> are |
|
|
|
used. Files in the <code>mypackage/p1/testpackage</code> directory are excluded |
|
|
|
form compilation and copy.</p> |
|
|
|
from compilation.</p> |
|
|
|
|
|
|
|
<pre> <javac srcdir="${src}:${src2}" |
|
|
|
destdir="${build}" |
|
|
@@ -3389,8 +3392,10 @@ form compilation and copy.</p> |
|
|
|
debug="on" |
|
|
|
/></pre> |
|
|
|
|
|
|
|
<p>is the same as the previous example with the addition of a second source path, defined by |
|
|
|
the propery <code>src2</code>. This can also be represented using nested elements as follows |
|
|
|
<p>is the same as the previous example, with the addition of a second |
|
|
|
source path, defined by |
|
|
|
the property <code>src2</code>. This can also be represented using nested |
|
|
|
<code><src></code> elements as follows: |
|
|
|
|
|
|
|
<pre> <javac destdir="${build}" |
|
|
|
classpath="xyz.jar" |
|
|
@@ -3402,9 +3407,9 @@ the propery <code>src2</code>. This can also be represented using nested element |
|
|
|
<exclude name="mypackage/p1/testpackage/**"/> |
|
|
|
</javac></pre> |
|
|
|
|
|
|
|
<p><b>Note:</b> If you are using Ant on Windows and a new DOS-Window pops up |
|
|
|
for every use of an external compiler this may be a problem of the JDK you are using. |
|
|
|
This problem may occur with all JDK's < 1.2.</p> |
|
|
|
<p><b>Note:</b> If you are using Ant on Windows and a new DOS window pops up |
|
|
|
for every use of an external compiler, this may be a problem of the JDK you are using. |
|
|
|
This problem may occur with all JDKs < 1.2.</p> |
|
|
|
|
|
|
|
<hr> |
|
|
|
<h2><a name="javadoc">Javadoc/Javadoc2</a></h2> |
|
|
|