Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Maven Integration (M2E) » AspectJ versions
AspectJ versions [message #651113] Thu, 27 January 2011 19:44 Go to next message
Candy  is currently offline Candy Friend
Messages: 3
Registered: February 2010
Junior Member
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 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?


Re: AspectJ versions [message #653164 is a reply to message #651113] Tue, 08 February 2011 17:52 Go to previous message
Jordan Hein is currently offline Jordan HeinFriend
Messages: 8
Registered: July 2009
Junior Member
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.
Previous Topic:multi-module projects broken in 0.12.1?
Next Topic:Where are my jars? pom.xml modified, Only poms downloaded
Goto Forum:

Current Time: Wed Mar 03 03:36:00 GMT 2021

Powered by FUDForum. Page generated in 0.01998 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top