I need to use aspectj in a maven project. I installed the maven plugin for eclipse (m2e), the maven aspectj plugin, and also AJDT for Eclipse. So now, when i open a new project i have "Maven Project" and "AspectJ Project". how can i make a new project that is Maven AspectJ project? I did not found any reference for that, so you are my only hope. thanks
M2Eclipse provides tight integration for Apache Maven into the Eclipse IDE with the following features: Launching Maven builds from within Eclipse. Dependency management for Eclipse build path based on Maven's pom. xml.
Let's add m2e plugin to Eclipse (so it can handle maven projects)! Select "Indigo - http://download.eclipse.org/releases/indigo" from the drop-down list next to the "Add..." button. Wait until it fetches the repository.
Eclipse IDE has fantastic support for Maven. We can easily create maven projects, build, deploy, and run it using the Eclipse GUI based interface. In this tutorial, we will learn how to use maven in Eclipse.
Source: http://blog.springsource.com/2011/10/18/upgrading-maven-integration-for-springsource-tool-suite-2-8-0/#comment-207264 (Andrew Eisenberg)
You should add the maven-aspectj-plugin to your build plugins section in your pom.xml as in:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<!-- use this goal to weave all your main classes -->
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<complianceLevel>1.6</complianceLevel>
</configuration>
</plugin>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With