From 0f2195bab1a3d40a9b00360463eef44f4f626c97 Mon Sep 17 00:00:00 2001
From: wisberg
AjcTask Ant Support for AspectJ 1.1
+AspectJ Ant Tasks
Description
@@ -133,8 +134,9 @@ array and may include another argfile by reference.
aspectpath, aspectpathref
-
(Path)
The aspectpath to use -- like classpath, only for
-read-only, binary aspect libraries (only accepts jar/zip files, no directories).
+ Similar to classpath, aspectpath contains
+read-only, binary aspect libraries; unlike classpath,
+it only accepts jar/zip files, not directories.
No
@@ -502,7 +504,9 @@ The task also supports an attribute
Examples
See examples/build.xml
-for an example build script.
+for an example build script and
+ant-tasks.html
+for introductory scripts.
>
Programmatically handling compiler messages
diff --git a/docs/dist/doc/ant-tasks.html b/docs/dist/doc/ant-tasks.html
index 6c855e062..585bacdba 100644
--- a/docs/dist/doc/ant-tasks.html
+++ b/docs/dist/doc/ant-tasks.html
@@ -17,9 +17,9 @@ AspectJ contains a compiler, ajc, that can be run from Ant.
Included in the aspectjtools.jar are Ant binaries to support
three ways of running the compiler:
-
-
Below is an example of incrementally compiling src - and testsrc root source directories, using tagfile.txt - to control recompilation and halting. -When this script is run, the compiler will build once and -then wait for incremental builds, recompiling each time the -last-modified date changes on the tag file. When the tag file no longer -exists, the build will complete. Messages are printed as usual. +
A minimal build script defines the task +and runs it, specifying the sources: +
-<project name="incremental-example" default="compile" > +<project name="simple-example" default="compile" > <taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties"> <classpath> @@ -126,17 +127,63 @@ exists, the build will complete. Messages are printed as usual. </taskdef> <target name="compile" > - <mkdir dir="dest" /> - <iajc destdir="dest" - tagfile="tagfile.txt" - sourceroots="src${path.separator}testsrc" > - <!-- declare classes needed to compile the target files --> + <iajc sourceroots="${home.dir}/ec/project/src" /> + </target> +</project> ++ + +
Below is script with most everything in it. +The compile process... +
+ + <target name="build-test" > + <iajc outjar="${home.dir}/output/application.jar" + injars="${home.dir}/build/module.jar" + copyInjars="true" + sourceRootCopyFilter="**/CVS/*,**/*.java" + incremental="true" > + <sourceroots> + <pathelement location="${home.dir}/ec/project/src"/> + <pathelement location="${home.dir}/ec/project/testsrc"/> + </sourceroots> + <aspectpath> + <pathelement location="${home.dir}/ec/int/persist.jar"/> + </aspectpath> <classpath> <pathelement location="${home.dir}/tools/aspectj/lib/aspectjrt.jar"/> </classpath> </iajc> + + <java classname="org.smart.app.Main"> + <classpath> + <pathelement location="${home.dir}/tools/aspectj/lib/aspectjrt.jar"/> + <pathelement location="${home.dir}/ec/int/persist.jar"/> + <pathelement location="${home.dir}/output/application.jar"/> + </classpath> + </java> </target> -</project>@@ -220,10 +267,6 @@ increase the memory available to Ant (see the Ant documentation, searching for A the variable they use in their scripts to pass VM options, e.g., ANT_OPTS=-Xmx128m). -
You can send email to mailto:aspectj-users@dev.eclipse.org. -- 2.39.5