Hi,
we have some trouble using maven, m2e, tycho and ajdt in conjunction.
We can generate eclipse plugin projects with m2e and tycho.
Also we can successfully generate war-projects with m2e using the maven-aspectj
plugin.
Now we wanted to use AOP within our eclipse plugins. So what we did was
including the aspectj-maven plugin into the pom of our plugin. Here is the pom:
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>de.lms</groupId>
<artifactId>ui</artifactId>
<version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>ui.masterdata</artifactId>
<packaging>eclipse-plugin</packaging>
<dependencies>
<dependency>
<groupId>de </groupId>
<artifactId>core.ui.common</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>3.1.1.RELEASE</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.4.0.java7</version>
<configuration>
<aspectLibraries>
<aspectLibrary>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</aspectLibrary>
</aspectLibraries>
<verbose>true</verbose>
<complianceLevel>1.7</complianceLevel>
<source>1.7</source>
<target>1.7</target>
<Xlint>ignore</Xlint>
<encoding>UTF-8</encoding>
<showWeaveInfo>true</showWeaveInfo>
<outxml>true</outxml>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
After "Maven -> Update-projects" our project gets its AspectJ Nature, and if we
put an aspect into the project the advices are weaved into the code, so
everything works as expected. But there is one functionality which does not
work: the aspectlibrary configuration from pom has no effect to the eclipse
project. If I have a look into Properties -> AspectJ Build -> Aspect Path there
are no entries. If we build with maven, the aspects are weaved in, so at maven
level it seems that everything works correct.
After some investigation in source code of tycho and Maven Integration for
AJDT 0.13.0 it seems to me that the problem is, that for eclipse-plugins the
additional entry " org.eclipse.ajdt.aspectpath" for ClassPathEntryDescriptors
is not set. (AjdtProjectConfigrator.configureClasspath)
Has somebody got AspectJ, Tycho and m2e to work together so that the aspect
libraries are included in generated Eclipse Project? Or is there an open bug we
did not find?
We are not even sure if this is the correct mailing list, so please point us to
the right one if it is not...
Thanks,
Bjoern
Versions: Eclipse 3.7 (also tested with 4.2), m2e 1.2.0, Maven Integration for
AJDT 0.13.0, AJDT 2.2.1, Tycho Project Configurators 0.6.0
_______________________________________________
m2e-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/m2e-users