views:

43

answers:

1

I just co https://src.springframework.org/svn/spring-samples/ and tried to build petclinic. I did:

  • mvn clean install
  • mvn eclipse:eclipse

I imported to eclipse but:

The import org.aspectj cannot be resolved

What are the odds that the pom.xml is wrong and I have to add the dependency myself?

+1  A: 

This is a known bug in the maven eclipse plugin.

A simple workaround is to specify the adjtVersion in your POM's maven-eclipse-plugin configuration section (or just update your version :D):

<ajdtVersion>none</ajdtVersion>

The EclipseClassPathWriter contains the following code:

    // Skip aspectj libraries since they are in the container.
            if ( ( config.getAjdtVersion() != 0 ) &&
               dep.getArtifactId().toLowerCase().indexOf( "aspectj" ) >= 0 )
            {
                return;
            }
mgv
Yep, I guess it's related to this. Adding that to my pom didn't fix the issue but adding the jar by hand worked, so I guess you are right.
Macarse