In AspectJ you can either use build-time or load-time weaving. The load-time weaving needs performance at runtime and the memory footprint is affected. The build-time weaving consumes speed during compilation. To define aspects you can define AspectJ files with a special syntax or you use AspectJ annotations. If you want to enable AspectJ at the build time you can use the AspectJ Maven plugin. In this case the following fragment has to be added in the pom.xml file.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.1</version>
<configuration>
<complianceLevel>1.5</complianceLevel>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
RegardsRafael
Technorati Tags: AspectJ Build Time Weaving AOP
