JBoss.org Community Documentation

- Prev
- Next

### 6.5.2. Ant target for aopc

Below is the code snippet for the `aopc` Ant target. Running this target will do compile-time weaving of the POJO classes specified.

    <taskdef name="aopc" classname="org.jboss.aop.ant.AopC" classpathref="aop.classpath"/>
    <target name="aopc" depends="compile" description="Precompile aop class">
       <aopc compilerclasspathref="aop.classpath" verbose="true">
          <src path="${build}"/>
          <include name="org/jboss/cache/aop/test/**/*.class"/>
          <aoppath path="${output}/resources/pojocache-aop.xml"/>
          <classpath path="${build}"/>
          <classpath refid="lib.classpath"/>
       </aopc>
    </target>

Below is a snapshot of files that are generated when aopc is applied. Notice that couple extra classes have been generated because of `aopc` .

Figure 6.1. Classes generated after aopc

- Prev6.5.1. Ant target for running load-time instrumen...
- Top of page
- Front page
- NextChapter 7. TroubleShooting