Maven 2.x Eclipse Plugin

No eclipse classpath entries generated for aspectj dependencies

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 2.8
  • Component/s: AJDT support
  • Labels:
    None
  • Environment:
    Fedora 11
    Sun Java
  • Number of attachments :
    0

Description

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.

Issue Links

Activity

Hide
Nicolas Toublanc added a comment -

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

Show
Nicolas Toublanc added a comment - 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
Hide
Krzysztof Krason added a comment -

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)

Show
Krzysztof Krason added a comment - 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)
Hide
Joost den Boer added a comment -

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.

Show
Joost den Boer added a comment - 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.
Hide
Arnaud Heritier added a comment -

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

Show
Arnaud Heritier added a comment - 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
Hide
Paul Benedict added a comment -

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

Show
Paul Benedict added a comment - Agreed, this is an annoying bug. I upgrade my AspectJ libraries faster than Eclipse.
Hide
nicolas de loof added a comment -

fixed by MECLIPSE-594

Show
nicolas de loof added a comment - fixed by MECLIPSE-594

People

Vote (6)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: