Hi Martin, thanks for helping me with testing. I have had the aspectj-maven-plugin configured in my root pom (that's a 2 levels deep nested project structure), like that:
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>aspectj-maven-plugin</artifactId> <version>1.4</version> <configuration> <verbose>true</verbose> <privateScope>true</privateScope> <complianceLevel>1.6</complianceLevel> </configuration> <executions> <execution> <goals> <goal>compile</goal> <!-- <goal>test-compile</goal> - makes cobertura fail --> </goals> </execution> </executions> <dependencies> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjtools</artifactId> <version>1.6.12</version> </dependency> </dependencies> </plugin> and after mvn eclipse:clean eclipse:eclipse my .project looks like this: <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>ebank-web</name> <comment>eBank web project. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment> <projects> <project>ebank-common</project> <project>ebank-ejb-client</project> </projects> <buildSpec> <buildCommand> <name>org.eclipse.ajdt.core.ajbuilder</name> </buildCommand> <buildCommand> <name>org.eclipse.wst.common.project.facet.core.builder</name> </buildCommand> <buildCommand> <name>org.eclipse.wst.validation.validationbuilder</name> </buildCommand> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.wst.common.project.facet.core.nature</nature> <nature>org.eclipse.ajdt.ui.ajnature</nature> <nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> </natures> where clearly the JDT builder is listed besides the AJDT one. I'll play around with the from-scratch method you posted and see if I find the point where it goes wrong.. cheers, K On Mon, Mar 12, 2012 at 12:06 AM, Fullinet <fulli...@gmail.com> wrote: > I made a little example and it worked well... the only difference was that I > added the org.codehaus.mojo:aspectj-maven-plugin:1.4 plugin to the pom.xml > because it's needed by the maven-eclipse-plugin to activate the AJDT > configurations (See this method on the source of the eclipse:eclipse mojo > here). > If you don't add this plugin, the ajbuilder, the ajnature and the > ASPECTJRT_CONTAINER variable will not be added. > > These were the command that I used: > > 1) mvn archetype:generate -DinteractiveMode=false -DgroupId=com.tests > -DartifactId=ajdt-test > 2) cd ajdt-test > 3) Add these lines in pom.xml: > > <build> > <plugins> > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-eclipse-plugin</artifactId> > <version>2.9</version> > <configuration> > <wtpversion>2.0</wtpversion> > <wtpapplicationxml>true</wtpapplicationxml> > <downloadSources>true</downloadSources> > <downloadJavadoc>true</downloadJavadoc> > <useProjectReferences>true</useProjectReferences> > <ajdtVersion>1.6</ajdtVersion> > </configuration> > </plugin> > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>aspectj-maven-plugin</artifactId> > <version>1.4</version> > </plugin> > </plugins> > </build> > > 4) mvn eclipse:clean eclipse:eclipse > > The output: > > .project > > <?xml version="1.0" encoding="UTF-8"?> > <projectDescription> > <name>ajdt-test</name> > <comment>NO_M2ECLIPSE_SUPPORT: Project files created with the > maven-eclipse-plugin are not supported in M2Eclipse.</comment> > <projects/> > <buildSpec> > <buildCommand> > <name>org.eclipse.ajdt.core.ajbuilder</name> > </buildCommand> > <buildCommand> > <name>org.eclipse.wst.common.project.facet.core.builder</name> > </buildCommand> > <buildCommand> > <name>org.eclipse.wst.validation.validationbuilder</name> > </buildCommand> > </buildSpec> > <natures> > <nature>org.eclipse.wst.common.project.facet.core.nature</nature> > <nature>org.eclipse.ajdt.ui.ajnature</nature> > <nature>org.eclipse.jdt.core.javanature</nature> > <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> > <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> > </natures> > </projectDescription> > > .classpath > > <?xml version="1.0" encoding="UTF-8"?> > <classpath> > <classpathentry kind="src" path="src/test/java" > output="target/test-classes" including="**/*.java|**/*.aj"/> > <classpathentry kind="src" path="src/main/java" > including="**/*.java|**/*.aj"/> > <classpathentry kind="output" path="target/classes"/> > <classpathentry kind="con" > path="org.eclipse.jdt.launching.JRE_CONTAINER"/> > <classpathentry kind="con" > path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/> > <classpathentry kind="var" > path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" > sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/> > </classpath> > > Hope this help > Martin > > > On Sat, Mar 10, 2012 at 6:48 PM, Kristof Jozsa <kristof.jo...@gmail.com> > wrote: >> >> Here it goes: >> >> <plugin> >> <groupId>org.apache.maven.plugins</groupId> >> <artifactId>maven-eclipse-plugin</artifactId> >> <version>2.9</version> >> <configuration> >> <wtpversion>2.0</wtpversion> >> <wtpapplicationxml>true</wtpapplicationxml> >> <downloadSources>true</downloadSources> >> <downloadJavadoc>true</downloadJavadoc> >> <useProjectReferences>true</useProjectReferences> >> <ajdtVersion>1.6</ajdtVersion> >> </configuration> >> </plugin> >> >> K >> >> On Sat, Mar 10, 2012 at 5:47 PM, Andrew Eisenberg <and...@eisenberg.as> >> wrote: >> > You can paste the snippet of the pom that corresponds to your eclipse >> > plugin configuration. I don't know if I'll be able to find anything, >> > but I can have a look. Maybe someone else on this list knows more >> > about it. >> > >> > On Sat, Mar 10, 2012 at 1:42 AM, Kristof Jozsa <kristof.jo...@gmail.com> >> > wrote: >> >> Thanks, right as I suspected. Now if I only knew why on earth `mvn >> >> eclipse:clean eclipse:eclipse` now introduces both builders into >> >> projects.. interesting, to say at least. >> >> >> >> K >> >> >> >> On Fri, Mar 9, 2012 at 5:25 PM, Andrew Eisenberg <and...@eisenberg.as> >> >> wrote: >> >>> There should not be any Java builder in AspectJ projects. Only an AJ >> >>> builder. >> >>> >> >>> On Fri, Mar 9, 2012 at 4:47 AM, Kristof Jozsa >> >>> <kristof.jo...@gmail.com> wrote: >> >>>> Hi, >> >>>> >> >>>> please help me clarifying an issue: on a properly configured AJDT >> >>>> project, should the Java Builder be also enabled? >> >>>> >> >>>> I always used `mvn eclipse:eclipse` to generate my Eclipse >> >>>> configuration and a proper pom setup ensured that Eclipse has it all >> >>>> working too. Today however, my Eclipse 3.7.2 started to compile >> >>>> errors >> >>>> for all my aspects and appearently, both the AspectJ Builder and the >> >>>> Java Builder became enabled on my projects. I guess that's not how >> >>>> it's meant to be, right? >> >>>> >> >>>> thanks, >> >>>> K >> >>>> _______________________________________________ >> >>>> aspectj-users mailing list >> >>>> aspectj-users@eclipse.org >> >>>> https://dev.eclipse.org/mailman/listinfo/aspectj-users >> >>> _______________________________________________ >> >>> aspectj-users mailing list >> >>> aspectj-users@eclipse.org >> >>> https://dev.eclipse.org/mailman/listinfo/aspectj-users >> _______________________________________________ >> aspectj-users mailing list >> aspectj-users@eclipse.org >> https://dev.eclipse.org/mailman/listinfo/aspectj-users > > > > _______________________________________________ > aspectj-users mailing list > aspectj-users@eclipse.org > https://dev.eclipse.org/mailman/listinfo/aspectj-users > _______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users