Compiling and Running Examples

Run with Ant

There are two targets for running the examples with Ant:

$ ant run.aopc
$ ant run.loadtime

ant run.aopc

The run.aopc target uses compile-time weaving, and performs the following steps:

ant run.loadtime

The run.loadtime target uses load-time weaving (the classes are transformed when first loaded) and performs the following steps:

Run with Maven

Just run:

$ mvn install

This will compile and run the application classes. A few of the examples use compile time weaving, and others use loadtime weaving. You can always change between one or the other form by uncommenting sections of the pom.xml file.

The logging example is the only example that use profiles to change from using log4j or the system.out logger. View logging.html for more info.