diff options
Diffstat (limited to 'docs/dist/doc/ant-ajc10-task.html')
-rw-r--r-- | docs/dist/doc/ant-ajc10-task.html | 383 |
1 files changed, 383 insertions, 0 deletions
diff --git a/docs/dist/doc/ant-ajc10-task.html b/docs/dist/doc/ant-ajc10-task.html new file mode 100644 index 000000000..03d4b3e88 --- /dev/null +++ b/docs/dist/doc/ant-ajc10-task.html @@ -0,0 +1,383 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> + +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta http-equiv="Content-Language" content="en-us"> + <title>Ajc10 Ant Task</title> +</head> +<body> + +<h2> +<a NAME="ajc10"></a>Ajc10 Ant Task</h2> + +<h3> +Description</h3> +This task is provided for backwards compatibility with build scripts +created for the AspectJ 1.0 <tt>ajc</tt> task. Developers using only +AspectJ 1.1 should upgrade their scripts to use the newer task. +This task is deprecated and may not be supported in the future. +Options no longer supported in 1.1 are still accepted, but have +no effect, other than to be listed in a warning emitted by the task. +<p> +This task compiles using the AspectJ<small><sup>tm</sup></small> compiler <code>ajc</code>; +you can use it in place of the + <a href="http://jakarta.apache.org/ant/manual/CoreTasks/javac.html">Javac</a> task. + +The interface is like the <tt>Javac</tt> task interface, except it also accepts +<a href="#ajc-parameters">parameters unique to <code>ajc</code></a>. +Of these, most no longer have any effect (nocomments, preprocess, workingdir, +maxmemory, jvmarg), but argfiles are still supported. (For more information +on argfiles, see <a href="#argfiles">below</a>.) +<p> + +<h3> +Parameters</h3> + +<h4>Parameters supported by <code>ajc</code></h4> + +<table BORDER CELLSPACING=0 CELLPADDING=2 > +<tr> +<td VALIGN=TOP><b>Attribute</b></td> + +<td VALIGN=TOP><b>Description</b></td> + +<td ALIGN=CENTER VALIGN=TOP><b>Required</b></td> +</tr> + +<tr> +<td VALIGN=TOP>srcdir</td> + +<td VALIGN=TOP>the base directory of the java files. (See <a href="#nestedElements">note</a>)</td> + +<td ALIGN=CENTER VALIGN=TOP>Yes, unless you use <tt>argfile</tt> +or nested <tt><src></tt> elements. +</tr> + +<tr> +<td VALIGN=TOP>destdir</td> + +<td VALIGN=TOP>Specify where to place the generated 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; +<b>no</b> +files are included when omitted.</td> + +<td ALIGN=CENTER VALIGN=TOP>No</td> +</tr> + +<tr> +<td VALIGN=TOP>includesfile</td> + +<td VALIGN=TOP>the name of a file that contains include patterns.</td> + +<td ALIGN=CENTER VALIGN=TOP>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 ALIGN=CENTER VALIGN=TOP>No</td> +</tr> + +<tr> +<td VALIGN=TOP>excludesfile</td> + +<td VALIGN=TOP>the name of a file that contains exclude patterns.</td> + +<td ALIGN=CENTER VALIGN=TOP>No</td> +</tr> + +<tr> +<td VALIGN=TOP>defaultexcludes</td> + +<td VALIGN=TOP>whether default excludes should be used (<tt>yes</tt> +| <tt>no</tt>); default excludes are used when omitted.</td> + +<td ALIGN=CENTER VALIGN=TOP>No</td> +</tr> + +<tr> +<td VALIGN=TOP>classpath</td> + +<td VALIGN=TOP>the classpath to use.</td> + +<td ALIGN=CENTER VALIGN=TOP>No</td> +</tr> + +<tr> +<td VALIGN=TOP>bootclasspath</td> + +<td VALIGN=TOP>location of bootstrap class files.</td> + +<td ALIGN=CENTER VALIGN=TOP>No</td> +</tr> + +<tr> +<td VALIGN=TOP>classpathref</td> + +<td VALIGN=TOP>the classpath to use, given as a<a href="http://jakarta.apache.org/ant/manual/using.html#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 a <a href="http://jakarta.apache.org/ant/manual/using.html#references">reference</a> +to a PATH defined elsewhere.</td> + +<td ALIGN=CENTER VALIGN=TOP>No</td> +</tr> + +<tr> +<td VALIGN=TOP>extdirs</td> + +<td VALIGN=TOP>location of installed extensions </td> + +<td ALIGN=CENTER VALIGN=TOP>No</td> +</tr> + +<tr> +<td VALIGN=TOP>debug</td> + +<td VALIGN=TOP>whether debug information should be included in classes output; +defaults to <tt>false</tt>.</td> + +<td ALIGN=CENTER VALIGN=TOP>No</td> +</tr> + +<tr> +<td VALIGN=TOP>deprecation</td> + +<td VALIGN=TOP>whether compiler should emit messages about +usage of deprecated API; defaults to <tt>false</tt>.</td> + +<td ALIGN=CENTER VALIGN=TOP>No</td> +</tr> + +<tr> +<td VALIGN=TOP>verbose</td> + +<td VALIGN=TOP>whether to emit compiler status messages during the compiler; +defaults to <tt>false</tt>.</td> + +<td ALIGN=CENTER VALIGN=TOP>No</td> +</tr> + +<tr> + <td VALIGN=TOP>version</td> + <td VALIGN=TOP>print ajc version and exit</td> + <td ALIGN=CENTER VALIGN=TOP>No</td> +</tr> + +<tr> + <td VALIGN=TOP>failonerror</td> + + <td VALIGN=TOP>whether the build continues notwithstanding compile errors; + defaults to <tt>true</tt>. </td> + <td ALIGN=CENTER VALIGN=TOP>No</td> + </tr> + + +<tr> + <td VALIGN=TOP>source</td> + + <td VALIGN=TOP>Value of -source option - ignored unless "1.4"</td> + + <td ALIGN=CENTER VALIGN=TOP>No</td> + </tr> + +</table> + +<h4> +<a NAME="ajc-parameters-ignored"></a>Parameters that used to be ignored by +the <code>ajc</code> taskdef, but now are supported or cause failures</h4> + +<table BORDER CELLSPACING=0 CELLPADDING=2 > +<tr> +<td VALIGN=TOP><b>Attribute</b></td> + +<td VALIGN=TOP><b>Description</b></td> + +<td ALIGN=CENTER VALIGN=TOP><b>Support</b></td> +</tr> + +<tr> +<td VALIGN=TOP>encoding</td> + +<td VALIGN=TOP>encoding of source files.</td> + +<td ALIGN=CENTER VALIGN=TOP>Yes?</td> +</tr> + +<tr> +<td VALIGN=TOP>optimize</td> + +<td VALIGN=TOP>whether source should be compiled with optimization</td> + +<td ALIGN=CENTER VALIGN=TOP>Yes?</td> +</tr> + +<tr> +<td VALIGN=TOP>target</td> + +<td VALIGN=TOP>generate class files for specific VM version (e.g., <tt>1.1</tt> +or <tt>1.2</tt>).</td> + +<td ALIGN=CENTER VALIGN=TOP>Yes</td> +</tr> + +<tr> +<td VALIGN=TOP>depend</td> + +<td VALIGN=TOP>enables dependency-tracking </td> + +<td ALIGN=CENTER VALIGN=TOP>No</td> +</tr> + +<tr> +<td VALIGN=TOP>includeAntRuntime</td> + +<td VALIGN=TOP>whether to include the Ant run-time libraries</td> + +<td ALIGN=CENTER VALIGN=TOP>No</td> +</tr> + +<tr> +<td VALIGN=TOP>includeJavaRuntime</td> + +<td VALIGN=TOP>whether to include the run-time libraries from the +executing VM</td> + +<td ALIGN=CENTER VALIGN=TOP>No</td> +</tr> +<tr> + <td VALIGN=TOP>threads</td> + <td VALIGN=TOP>Multi-threaded compilation</td> + <td ALIGN=CENTER VALIGN=TOP>No</td> +</tr> + +</table> + + +<h4> +<a NAME="ajc-parameters"></a>Parameters unique to <code>ajc</code></h4> +<u>Note</u>: Many of the unique parameters in AspectJ 1.0 are no longer supported, +and fork is not supported yet. + +<table BORDER CELLSPACING=0 CELLPADDING=2 > +<tr> <td VALIGN=TOP><b>Attribute</b></td> + <td VALIGN=TOP><b>Description</b></td> + <td ALIGN=CENTER VALIGN=TOP><b>Required</b></td> +</tr> + +<tr> + <td VALIGN=TOP>X</td> + + <td VALIGN=TOP>comma-delimited list of extended (-X...) options, + entered without -X + (e.g., <code>X="lint"</code> for + <code>-Xlint</code>). </td> + + <td ALIGN=CENTER VALIGN=TOP>No</td> + </tr> + +<tr> + <td VALIGN=TOP>emacssym</td> + <td VALIGN=TOP>Generate symbols for Emacs IDE support + (defaults to off)</td> + <td ALIGN=CENTER VALIGN=TOP>No</td> +</tr> + +<tr> + <td VALIGN=TOP>argfiles</td> + + <td VALIGN=TOP>a comma-delimited list of argfiles that + contain a line-delimited list of source file paths + (absolute or relative to the argfile) </td> + + <td ALIGN=CENTER VALIGN=TOP>No</td> +</tr> + +</table> + +<a name="argfiles"></a> +<h3>argfiles - Argument list files</h3> +An argument file is a file (usually <tt><file>.lst</tt>) containing a list of source file +paths (absolute or relative to the argfile). +You can use it to specify all source files to be compiled, which <code>ajc</code> requires +to avoid searching every possible source file in the source path when building aspects. +If you specify an argfile to the <tt>ajc</tt> task, it will not include all files in any specified +source directory (which is the default behavior for the Javac task when no includes are +specified). Conversely, if you specify excludes, they will be removed from the list of +files compiled even if they were specified in an argument file. + +<br> +<a name="nestedElements"></a> +<h3> +Parameters specified as nested elements</h3> +This task forms an implicit <a href="http://jakarta.apache.org/ant/manual/CoreTypes/fileset.html">FileSet</a> +and supports all attributes of <tt><fileset></tt> (<tt>dir</tt> becomes +<tt>srcdir</tt>) +as well as the nested +<tt><include></tt>, <tt><exclude></tt>, +<tt><patternset>, +and <argfile></tt> elements. +<h4> +<tt>src</tt>, <tt>classpath</tt>, <tt>bootclasspath</tt> and <tt>extdirs</tt></h4> +<tt>ajc</tt>'s <i>srcdir</i>, <i>classpath</i>, +<i>bootclasspath, extdirs</i> +and <i>jvmarg</i> attributes are <a href="http://jakarta.apache.org/ant/manual/using.html#path">path-like +structures</a> and can also be set via nested +<tt><src></tt>, +<tt><classpath></tt>, +<tt><bootclasspath>, +<extdirs> </tt>and <tt><jvmarg> </tt>elements, respectively. +<p> +<h3> +Examples</h3> + +See <a href="../examples/builds.xml">../examples/builds.xml</a> +for an example build script. +<p> +This build script snippet + +<pre> <ajc srcdir="${src}" + destdir="${build}" + argfiles="demo.lst" + /></pre> +compiles all <tt>.java</tt> files specified in the <tt>demo.lst</tt> and +stores the <tt>.class</tt> files in the <tt>${build}</tt> directory. +Unlike the Javac task, the +<i>includes</i> attribute is empty by default, so only those +files specified in <tt>demo.lst</tt> are included. +<p>This next example +<pre> <ajc srcdir="${src}" + destdir="${build}" + includes="spacewar/*,coordination/*" + excludes="spacewar/Debug.java" + /></pre> +compiles <tt>.java</tt> files under the <tt>${src}</tt> directory in the +<tt>spacewar +</tt>and<tt> +coordination </tt>packages, and stores the +<tt>.class</tt> files in the +<tt>${build}</tt> directory. All source files under +<tt>spacewar/</tt> and +<tt>coordination/</tt> are used, except <tt>Debug.java</tt>. + + +<hr> +</body> +</html> |