AspectJ versions [message #651113] |
Thu, 27 January 2011 14:44  |
Eclipse User |
|
|
|
I recently upgraded to STS 2.5 by SpringSource which is based on Eclipse 3.6. I noticed this version of Eclipse packaged a newer version of AspectJ (1.6.11). I intend to continue to build my code base with AspectJ 1.6.6, therefore, I explicitly specify the version number in the POM files for all my projects.
Even so, when I build my project using m2e, the aspectj compiler threw incompatible version exception:
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.aspectj.weaver.BCException: Unable to continue, this version of AspectJ supports classes built with weaver version 6.0 but the class my.company.aspects.BeanConfigurerAspect is version 7.0
This means the aspect was compiled with a newer version of the compiler, then later weaved with an older version of the weaver. Specifically, version 7.0 of the aspect format is generated by AspectJ version 1.6.9+.
Since I didn't encounter such issue when using plain Maven at command line, I suspect it is related to m2e. I didn't encounter this issue when I used an older version of Eclipse which packaged AspectJ 1.6.6. Is m2e using the aspectj compiler jars in Eclipse's plugin directory to compile the aspect? If so, how can I configure it to use the jar specified in the pom file?
Thanks,
Candy
|
|
|
Re: AspectJ versions [message #653164 is a reply to message #651113] |
Tue, 08 February 2011 12:52  |
Eclipse User |
|
|
|
Only advise I have is to run "mvn dependency:tree" and make sure only the version of AspectJ you are expecting is in your dependencies.
I would be really surprised if m2e was using the version of AspectJ bundles with eclipse. I have only ever seen m2e use maven artifacts from your .m2 directory.
|
|
|
Powered by
FUDForum. Page generated in 0.27844 seconds