Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven/AJDT project in Eclipse

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

like image 921
Magen Avatar asked Jun 29 '11 14:06

Magen


People also ask

Which Eclipse IDE is best for Maven project?

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.

Does Eclipse Indigo support Maven?

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.

Does Eclipse IDE have Maven?

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.


2 Answers

  1. Go to Help > Install New Software...
  2. Use this software repository: http://dist.springsource.org/release/AJDT/configurator/
  3. Install the AJDT m2e Configurator

Source: http://blog.springsource.com/2011/10/18/upgrading-maven-integration-for-springsource-tool-suite-2-8-0/#comment-207264 (Andrew Eisenberg)

like image 158
Hendy Irawan Avatar answered Oct 02 '22 08:10

Hendy Irawan


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>
like image 33
Torsten Avatar answered Oct 02 '22 06:10

Torsten