Issue Details (XML | Word | Printable)

Key: MECLIPSE-584
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Ole Ersoy
Votes: 6
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Maven 2.x Eclipse Plugin

No eclipse classpath entries generated for aspectj dependencies

Created: 06/Jul/09 01:29 PM   Updated: 15/Oct/09 03:37 AM   Resolved: 15/Oct/09 03:37 AM
Return to search
Component/s: AJDT support
Affects Version/s: None
Fix Version/s: 2.8

Time Tracking:
Not Specified

Environment:
Fedora 11
Sun Java
Issue Links:
Supercedes
 


 Description  « Hide

When I run eclipse:eclipse .classpath entries for the following elements don't get added:

<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.5.4</version>
</dependency>

<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.5.4</version>
</dependency>

The dependencies are in the repository and I can add them manually myself like this:
<classpathentry kind="var" path="M2_REPO/org/aspectj/aspectjrt/1.5.4/aspectjrt-1.5.4.jar"/>
<classpathentry kind="var" path="M2_REPO/org/aspectj/aspectjweaver/1.5.4/aspectjweaver-1.5.4.jar"/>

I really thought this had to be a user error, so I tried taking some dependency declarations that work, and just changing the body values to correspond with the bodies of the aspectj dependency declarations. It still does not work.



Nicolas Toublanc added a comment - 07/Jul/09 01:25 PM

I have the same issue using maven 2.2 and eclipse-maven-plugin 2.6 or 2.7 (no problem with 2.5).

My aspectj dependency is 1.6.2


Krzysztof Krason added a comment - 21/Jul/09 04:12 AM

Same problem here, maven 2.1.0, aspectj 1.6.1

(I've had this problem since almost a year, when I started using aspectj and maven)


Joost den Boer added a comment - 31/Jul/09 06:58 AM

This is caused by these lines in EclipseClasspathWriter:

// Skip aspectj libraries since they are in the container.
        if ( ( config.getAjdtVersion() != 0 ) && dep.getArtifactId().toLowerCase().indexOf( "aspectj" ) >= 0 )
        {
            return;
        }

It is very annoying it's not possible to add aspectj libraries to the classpath. Somehow my JUnit-Spring tests work fine with Maven but in Rad they don't run because the aspectj-weaver classes are not found. And these lines prevent my from adding the required dependencies to the Eclipse classpath.

Any ideas how to workaround this? What do they mean by "Skip aspectj libraries since they are in the container." ? In which container? We're using the WebSphere JRE and WebSphere Application Service libraries for our projects, but these don't have aspectj in them.


Arnaud Heritier added a comment - 31/Jul/09 07:22 AM

You can set <ajdtVersion>none</ajdtVersion> in your eclipse plugin config. By default the plugin supposes you have, and you are using AJDT plugin if you aspectj dependencies in your project.
I'll change this behavior to set ajdtVersion to none by default in 2.8


Arnaud Heritier made changes - 31/Jul/09 07:23 AM
Field Original Value New Value
Fix Version/s 2.8 [ 14813 ]
Component/s Core : Dependencies resolution and build path (.classpath) [ 12262 ]
Component/s AJDT support [ 13074 ]
Arnaud Heritier made changes - 31/Jul/09 07:31 AM
Link This issue is superceded by MECLIPSE-594 [ MECLIPSE-594 ]
Paul Benedict added a comment - 14/Oct/09 11:05 AM

Agreed, this is an annoying bug. I upgrade my AspectJ libraries faster than Eclipse.


nicolas de loof added a comment - 15/Oct/09 03:37 AM

fixed by MECLIPSE-594


nicolas de loof made changes - 15/Oct/09 03:37 AM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Closed [ 6 ]