[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ajdt-dev] ANT builder with Aspects
|
Irum Godil wrote:
[...]
I am running a Derby application that uses ANT builder. I want to
refactor the code base using AspectJ. I am not sure how will I build
the AspectJ code using ANT. Can someone please point me to what
properties do I need to set to use AspectJ with ANT.
<path id="aspectj-ant.lib">
<pathelement location="${aspectj.home}/lib/aspectjrt.jar" />
<pathelement location="${aspectj.home}/lib/aspectjtools.jar" />
</path>
<taskdef
resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
<classpath refid="aspectj-rt.lib" />
<classpath refid="aspectj-tools.lib" />
</taskdef>
usage example:
<iajc
srcdir="${aspect-src.dir}"
outJar="${aspect.jar}"
aspectpathref="aspectpath.lib"
verbose="${verbose}"
>
<include name="**/*.aj" />
<classpath refid="classpath.lib" />
<classpath refid="aspectj-ant.lib" />
<classpath refid="build-bin.lib" />
</iajc>
</iajc>
As you can see I use aspectJ to only weave javac-compiled class files.
For futher reference see:
http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/aspectj-home/doc/devguide/antTasks-iajc.html
Cheers,
a.