Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-users] AJDT configurator not adding AspectJ Nature to project



I am trying to get my eclipse 4.2 Juno installation working with m2e and AJDT.

 

So far I have not been able to get m2e to successfully configure my project as an AspectJ AJDT project at all. I can manually configure the project as an AspectJ project but I am trying to get this to work so that all the developers at our company do not need to do a bunch of manual steps to configure their projects.

 

I have the following plugin configuration in my pom:

              <pluginManagement>

                     <plugins>

                           <!--This plugin's configuration is used to store Eclipse m2e settings

                                  only. It has no influence on the Maven build itself. -->

                           <plugin>

                                  <groupId>org.eclipse.m2e</groupId>

                                  <artifactId>lifecycle-mapping</artifactId>

                                  <version>1.0.0</version>

                                  <configuration>

                                         <lifecycleMappingMetadata>

                                                <pluginExecutions>

                                                       <pluginExecution>

                                                              <pluginExecutionFilter>

                                                                     <groupId>org.codehaus.mojo</groupId>

                                                                     <artifactId>aspectj-maven-plugin</artifactId>

                                                                     <versionRange>[1.0,)</versionRange>

                                                                     <goals>

                                                                           <goal>test-compile</goal>

                                                                           <goal>compile</goal>

                                                                     </goals>

                                                              </pluginExecutionFilter>

                                                              <action>

                                                                     <execute />

                                                              </action>

                                                       </pluginExecution>

                                                </pluginExecutions>

                                         </lifecycleMappingMetadata>

                                  </configuration>

                           </plugin>

                     </plugins>

              </pluginManagement>

              <plugins>

                     <plugin>

                           <groupId>org.codehaus.mojo</groupId>

                           <artifactId>aspectj-maven-plugin</artifactId>

                           <version>1.4</version>

                           <configuration>

                                  <source>1.6</source>

                                  <target>1.6</target>

                                  <verbose>true</verbose>

                                  <showWeaveInfo>true</showWeaveInfo>

                                  <aspectLibraries>

                                         <aspectLibrary>

                                                <groupId>com.loftware.spectrum.platform</groupId>

                                                <artifactId>spectrum-logging</artifactId>

                                         </aspectLibrary>

                                  </aspectLibraries>

                           </configuration>

                           <executions>

                                  <execution>

                                         <goals>

                                                <goal>compile</goal><!-- to weave all your main classes -->

                                                <goal>test-compile</goal><!-- to weave all your test classes -->

                                         </goals>

                                  </execution>

                           </executions>

                           <dependencies>

                                  <dependency>

                                         <groupId>org.aspectj</groupId>

                                         <artifactId>aspectjtools</artifactId>

                                         <version>${aspectj.version}</version>

                                  </dependency>

                                  <dependency>

                                         <groupId>org.aspectj</groupId>

                                         <artifactId>aspectjrt</artifactId>

                                         <version>${aspectj.version}</version>

                                  </dependency>

                           </dependencies>

                     </plugin>

              </plugins>

 

I’ve been pulling my hair out on this one. Nothing seems to work. It’s a brand new eclipse download and everything is up to date (ADJT, the m2e configurator, 1.7.0 for the aspectj version).

 

There are no errors at all, it just doesn’t do anything. I have tried a huge number of permutations on the above but I cant get it to work. Maven does however instrument the code perfectly when doing a clean:install, so there doesn’t seem to be any problem with AspectJ, but rather with the m2e configuration or implementation…

 

I would tell the other developers to just manually convert the project to aspectj, but then they also have to manually add the aspect libraries which really opens this up for human error.

 

Thanks

Bill



- This email message has been delivered safely and archived online by Mimecast. For more information please visit http://www.mimecast.com

Back to the top