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 B. Using Ant with AspectJ

Most developers use either Ant or Maven to build their projects. This appendix shows various weaving scenarios implemented using Ant. Appendix C does the same for Maven. Note that the focus of this appendix is the use of AspectJ weaver; therefore, we use the simplest Ant structure to get things done.

You'll use the classes from chapter 2's listing 2.1 and 2.2 and the profiling aspect in listing 2.4 to exercise various weaving scenarios. Let's start with the simplest scenarios of building using source code build-time weaving.

Weaving sources

As discussed in chapter 8, in source code build-time weaving, you supply the ajc compiler with classes and aspects in source-code form. The aspects may be expressed using either ...

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