Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Using m2e with tycho and ajdt

Well, all I can say there is apparently some incompatibility or lack of
required integration between m2e, pde and ajdt. I don't know how to make
it work and most likely it will be up to you to troubleshoot this and
come up with a solution.

--
Regards,
Igor

On 2013-02-28 2:34 PM, Seebeck, Björn wrote:
Yes, the AspectJ dependency is defined in the required bundles section of the bundle.
The aspect library is a bundle and also defined as required bundle.

At runtime (after maven build) everything works as expected.

The only problem is that at development time after m2e Update Project in Eclipse IDE the woven advices are not shown cause the aspect path is empty. So if executed from IDE the aspects are not woven into the join points.
If I manually add the aspect bundle to the path the ajdt markers for woven aspects are displayed correctly and aspects are woven into join points.
Of course If I execute m2e Update Project next time, the aspectpath is empty again.

Regards,
Bjoern

-----Ursprüngliche Nachricht-----
Von: m2e-users-bounces@xxxxxxxxxxx [mailto:m2e-users-
bounces@xxxxxxxxxxx] Im Auftrag von Igor Fedorenko
Gesendet: Donnerstag, 28. Februar 2013 15:17
An: m2e-users@xxxxxxxxxxx
Betreff: [SPAM HEADER] - Re: [m2e-users] Using m2e with tycho and ajdt

How does this work at runtime, i.e. how does such bundle get its
aspectj dependencies? I assume this needs explicit Require-
Bundle/Import-Package/Require-Capability in bundle manifest, unless you
use custom/non-standard OSGi runtime.

--
Regards,
Igor

On 2013-02-28 3:29 AM, Seebeck, Björn wrote:
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
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users

_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users



Back to the top