|AspectJ versions [message #651113]
||Thu, 27 January 2011 19:44
Registered: February 2010
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:
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?
Powered by FUDForum
. Page generated in 0.01668 seconds