Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] compile problem with ant

Title: Message
I am trying to compile a part of current project code with aspectj
compiler and Ant to try out aspectj but I am running into some issues.
I updated the build.xml from the examples which come with aspectj and
added a target to compile my classes. Here is the target I added:
<target name="compile-dao">

<ajc destdir="c:/mydev/build/classes"
srcdir="c:/mydev/src/com/javaah/dao/oracle"
classpath="c:/mydev/build/classes"/>
</target>

When I run this target it gives me a Couldn't create compiler error
as below:


C:\mydev\buildscripts>ant -f mybuild.xml compile-dao
Buildfile: mybuild.xml

compile-dao:
[ajc] Compiling 107 source and 0 arg files to
C:\mydev\build\classes
[ajc] java.lang.NoSuchMethodException:
org.aspectj.tools.ajc.Main.compile(
[Ljava.lang.String;)
[ajc] at java.lang.Class.getMethod0(Class.java:1756)
[ajc] at java.lang.Class.getMethod(Class.java:963)
[ajc] at org.aspectj.tools.ant.taskdefs.Ajc.spoon
(Ajc.java:552)
[ajc] at org.aspectj.tools.ant.taskdefs.Ajc.execute
(Ajc.java:454)
[ajc] at org.apache.tools.ant.Task.perform(Task.java:317)
[ajc] at org.apache.tools.ant.Target.execute
(Target.java:309)
[ajc] at org.apache.tools.ant.Target.performTasks
(Target.java:334)
[ajc] at org.apache.tools.ant.Project.executeTarget
(Project.java:1306)

[ajc] at org.apache.tools.ant.Project.executeTargets
(Project.java:1250
)
[ajc] at org.apache.tools.ant.Main.runBuild(Main.java:610)
[ajc] at org.apache.tools.ant.Main.start(Main.java:196)
[ajc] at org.apache.tools.ant.Main.main(Main.java:235)

BUILD FAILED
file:C:/mydev/buildscripts/mybuild.xml:162: Couldn't create compiler!


Does anybody know what that error means? I did put aspectj-ant.jar,
aspectjrt.jar and aspectjtools.jar to ANT_HOME\lib folder and I am
ant 1.5.

--Navjeet

 
Navjeet Chabbewal
703-262-3364
 

Back to the top