O'Reilly logo

AspectJ in Action by Ramnivas Laddad

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix C. Using Maven with AspectJ

The previous appendix examines various weaving options enabled through Ant. In this appendix, you perform the same tasks using Maven.[18] As in appendix B, you'll use the classes from listings 2.1 and 2.2 and the profiling aspect from listing 2.4 to exercise various weaving possibilities.

Weaving sources

Maven, through the open source codehaus.org project, provides a plugin to work with AspectJ (visit http://mojo.codehaus.org/aspectj-maven-plugin for details). Let's see this plugin in action through the Maven pom.xml file in listing C.1.

Example C.1. Maven pom.xml to perform source code build-time weaving

Maven pom.xml to perform source code build-time weaving

When you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required