Using together with AJDT
To use this plugin together with AJDT you simply specify the ajdtBuildDefFile
property to point to the build.ajproperties
file generated by AJDT. The use of this property will override the use of the project source folders. Any include or exclude elements in the POM are also disregarded.
<project> ... <dependencies> ... <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjrt</artifactId> <version>1.9.7</version> </dependency> ... </dependencies> ... <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>aspectj-maven-plugin</artifactId> <version>1.15.0</version> <configuration> <ajdtBuildDefFile>build-1-5.ajproperties</ajdtBuildDefFile> </configuration> <executions> <execution> <goals> <goal>compile</goal> </goals> </execution> </executions> </plugin> ... </plugins> <build> ... </project>
Example of a valid build properties file
Note: In this file the paths are relative to the project's basedir.
src.includes = src/main/aspect,\ src/main/java/com/mycompany/myaspects/**/*TransactionAspect.java src.excludes = src/main/java/org/codehaus/mojo/aspectj/Azpect.java