Compile and Run AOP Examples
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: compiles the classes; runs the aopc compiler; and runs the woven example. ant run.loadtime The run.loadtime target uses load-time weaving (the classes are transformed when first loaded) and performs the following steps: compiles the classes; and runs the example with the -javagent switch passed in to the java runtime to enable loadtime weaving; 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.