maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "christofer.dutz@c-ware.de" <christofer.d...@c-ware.de>
Subject Strange plugin dependency problem
Date Wed, 13 Feb 2013 08:43:30 GMT
Hi,

I am currently confronted with a strange problem. I am trying to get a Maven project using
AspectJ Compile Time Weaving in IntelliJ. The source code level is set to 1.7 and uses some
1.7 language features. The aspectjtools-1.6.11 which is used by the aspectj-maven-plugin per
default can't deal with this, therefore we changed the aspectjtools version to 1.7.1. The
build is building nicely using maven. The pom fragments look like this:

  <pluginManagement>
   <plugins>
    <plugin>
     <groupId>org.codehaus.mojo</groupId>
     <artifactId>aspectj-maven-plugin</artifactId>
     <version>1.4</version>
     <dependencies>
      <dependency>
       <groupId>org.aspectj</groupId>
       <artifactId>aspectjrt</artifactId>
       <version>1.7.1</version>
      </dependency>
      <dependency>
       <groupId>org.aspectj</groupId>
       <artifactId>aspectjtools</artifactId>
       <version>1.7.1</version>
      </dependency>
     </dependencies>
     <configuration>
      <avoidFinal>true</avoidFinal>
      <Xlint>ignore</Xlint>
      <complianceLevel>1.7</complianceLevel>
      <showWeaveInfo>true</showWeaveInfo>
      <source>1.7</source>
      <target>1.7</target>
      <encoding>ISO-8859-1</encoding>
      <aspectLibraries>
       <aspectLibrary>
        <groupId>com.acme</groupId>
        <artifactId>myaspects</artifactId>
       </aspectLibrary>
      </aspectLibraries>
     </configuration>
    </plugin>
   </plugins>
  </pluginManagement>



and:



  <profile>
   <id>aspectj-weaving</id>
   <activation>
    <activeByDefault>false</activeByDefault>
   </activation>
   <build>
    <plugins>
     <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>aspectj-maven-plugin</artifactId>
      <executions>
       <execution>
        <goals>
         <goal>compile</goal>
        </goals>
       </execution>
      </executions>
     </plugin>
    </plugins>
   </build>
  </profile>

When importing the project to IntelliJ the compiler is automatically set to ajc but the compiler
from 1.6.1 is detected and used automatically and I have to manually change this to 1.7.1
(and repeat this now and then after updating the Maven settings).

When issueing the following command on the commandline:

mvn -P aspectj-weaving dependency:resolve-plugins

I can see:

[INFO] Plugin Resolved: aspectj-maven-plugin-1.4.jar
[INFO]     Plugin Dependency Resolved: plexus-utils-2.0.5.jar
[INFO]     Plugin Dependency Resolved: maven-artifact-2.2.0.jar
[INFO]     Plugin Dependency Resolved: maven-model-2.2.0.jar
[INFO]     Plugin Dependency Resolved: maven-project-2.2.0.jar
[INFO]     Plugin Dependency Resolved: maven-reporting-api-2.2.0.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.2.0.jar
[INFO]     Plugin Dependency Resolved: doxia-site-renderer-1.1.2.jar
[INFO]     Plugin Dependency Resolved: maven-reporting-impl-2.1.jar
[INFO]     Plugin Dependency Resolved: aspectjtools-1.6.11.jar
There is no mention of a 1.7.1 version ... why and how can I configure Maven to display the
1.7.1 version (I think this is the reason why IntelliJ is automatically detecting 1.7.1

Chris

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message