Using together with AJDT

To use together with AJDT you simply spesify the ajdtBuildDefFile property to point to the build.ajproperties 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.6.2</version>
        </dependency>
        ...
    </dependencies>
    ...
    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>1.3</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 propertiesfile

note that in this file paths are relative to the project 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