From 0f2195bab1a3d40a9b00360463eef44f4f626c97 Mon Sep 17 00:00:00 2001 From: wisberg Date: Thu, 13 Mar 2003 03:36:09 +0000 Subject: [PATCH] Doc updates for new resource copying. Also 1.1 cleanup --- docs/dist/doc/ant-ajc-task.html | 10 ++-- docs/dist/doc/ant-tasks.html | 95 ++++++++++++++++++++++++--------- 2 files changed, 76 insertions(+), 29 deletions(-) diff --git a/docs/dist/doc/ant-ajc-task.html b/docs/dist/doc/ant-ajc-task.html index e9ffbd791..ca5321290 100644 --- a/docs/dist/doc/ant-ajc-task.html +++ b/docs/dist/doc/ant-ajc-task.html @@ -10,6 +10,7 @@

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:
    -
  1. Ajc10 (options), +
  2. Ajc10 (parameters), a task to run build scripts compatible with the AspectJ 1.0 tasks,
  3. -
  4. AjcTask (options), +
  5. AjcTask (parameters), a task to run the new AspectJ 1.1 compiler, which supports all the eclipse and ajc options, including incremental mode;
  6. Ajc11CompilerAdapter, @@ -67,7 +67,9 @@ Jakarta's documentat on integrating user-defined Ant tasks into builds.

  7. -

    Ajc10 (script name: ajc)

    +

    Ajc10 (script name: ajc) +parameters +

    This task handles the same arguments as those used by the AspectJ 1.0 task. This should permit those with existing build scripts using the Ajc Ant task to continue using the same scripts @@ -104,20 +106,19 @@ that uses the ajc compiler to compile the files listed in </project> -

    AjcTask (script name: iajc)

    -This task handles all the ajc 1.1 compiler options, -as well as an incremental "tag" file to avoid depending -on Ant input/output for controlling Ant-based incremenal compilation. - -

    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. +

    AjcTask (script name: iajc) +parameters +

    +This task handles all the ajc 1.1 compiler options, including +the experimental option for an incremental "tag" file. +It also can copy resources from source directories or input jars +to the output jar or directory. + +

    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... +

    + +When this target is built, the compiler will build once and +then wait for input from the user. +Messages are printed as usual. +When the user has quit, then this runs the application. +
    +
    +  <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). -
  8. Messages suppressed: In the incremental task, -messages from the compiler are printed but not segregated. -
  9. -

    You can send email to mailto:aspectj-users@dev.eclipse.org. -- 2.39.5