Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] taskdef class org.aspectj.tools.ant.taskdefs.AjcTask cannot be found

Hi:

This is a bit off from the eclipse aspectj scope but maybe someone here
has an idea why my compile aspectj with maven attempts fail.  I was
originally sending the following email to the maven users group, but so
far had no luck in finding someone with a solution idea.  Basically I
wonder why maven cannot find the AjcTask in the aspectjtools.jar despite
the fact that I put it in different locations in addition to the normal
maven generated path.  This is the email:


I am using Maven 1.0 with the aspectj plug in 3.2, and aspectj 1.2.  I am
also using eclipse 3.1M1 with the latest aspectj plug in.

I have no problems compiling and running my project with aspects within
the eclipse environment using the eclipse aspectj plug in.

When I try to use the maven aspectj:compile goal (from command line or
using the MevenIDE) I get the following error:

BUILD FAILED
File...... C:\Documents and
Settings\aguther\.maven\cache\maven-aspectj-plugin-3.2\plugin.jelly
Element... ant:taskdef
Line...... 141
Column.... 87
taskdef class org.aspectj.tools.ant.taskdefs.AjcTask cannot be found
Total time: 12 seconds
Finished at: Thu Oct 21 07:24:49 PDT 2004

I have tried to put the aspectjtools.jar in different locations, for
example the jre/lib/ext, the maven lib and the maven lib directory but
no success.

I have also declared the aspectjtools as dependency in my project:

<dependency>
     <groupId>aspectj</groupId>
     <artifactId>aspectjrt</artifactId>
     <version>1.2</version>
     <jar>aspectjrt.jar</jar>
     <type>jar</type>
   </dependency>
   <dependency>
     <groupId>aspectj</groupId>
     <artifactId>aspectjtools</artifactId>
     <version>1.2</version>
     <jar></jar>
     <type>jar</type>
   </dependency>

My project.properties are set to the following:

maven.aspectj.source = 1.4
maven.aspectj.fork = true

Nothing seems to enable maven to pickup the AcjTask, which is obviously
in the aspectjtools jar.

Any idea where what I have to configure to get the maven aspectj:compile
to work?

Of course I could generate my jar file within eclipse and the eclipse
aspectj plugin, but that does not help to compile on the build server.

Thanks in advance for any hint or help.

Regards,

Andreas



Back to the top