Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Using Ant

thanks for the info. I switched to using the iajc task and pretty much coded my build.xml just like

http://www.eclipse.org/ajdt/faq.php#q:ant

But I changed all the plugin paths to match what is current in my eclipse plugins folder. Now when It compiles it is getting the following error

[iajc] [error] classpath error: unable to find org.aspectj.lang.JoinPoint (check that aspectjrt.jar is in your classpath)

I got the same error when I added a -lib with the full path to the aspectjrt.jar, but that gave the same error.

Thanks, Wade

On May 13, 2009, at 2:57 PM, Andy Clement wrote:

Hi Wade,

The usual approach is to switch from using the 'javac' task to using
the 'iajc' task (as Neale says).  The javac task and a compiler
adapter ought to work but if your aspects are in .aj files, the
default javac task processing may not find them and pass them to
aspectj.

Andy

2009/5/13 Wade Girard <wade.girard@xxxxxxxxx>:
This is a separate issue from the one I emailed earlier...

I am trying to get my aspects to compile using ant.

$ ant -version
Apache Ant version 1.7.0 compiled on August 25 2008

$ ../aspectj/bin/ajc -version
AspectJ Compiler 1.6.4 (1.6.4 - Built: Thursday Apr 2, 2009 at 16:03:17 GMT)
- Eclipse Compiler 0.785_R33x, 3.3

ant command I am using

ant -lib /path/to/aspectj/lib clean install

in the build.xml file I have added
<property name="ajc"
value="org.aspectj.tools.ant.taskdefs.Ajc11CompilerAdapter" />

and my javac task looks like

<javac debug="true" srcdir="${src}" destdir="${build}" classpath="$ {cp}"
source="1.5" target="1.5">
                       <compilerarg compiler="${ajc}"/>
               </javac>

note that I just added the compilerarg...

the output from the compiling phase is
[javac] Compiling 139 source files to  ...

It builds without any error, but the aspects do not appears as class files
in the jar. Should they?

I think that I am missing some fundamental step in the process of building
outside of eclipse.

Wade Girard
wade.girard@xxxxxxxxx



_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Wade Girard
wade.girard@xxxxxxxxx





Back to the top