7.3.3. Ant target for annotation compiler

7.3.3. Ant target for annotation compiler

Below is the code snippet for the annoc Ant target. You run this step if you are using the JDK1.4 annotation. After this step is successfully run, you decide either to use compile-time or load-time mode of weaving.

   <!-- pre-compile directory with annotationc using jdk1.4 -->
   <target name="annoc" depends="compile" description="Annotation precompiler for aop class">
      <!-- Define a new ant target. This is the 1.4 annotation pre-compiler. 
      After running this step, you still need to run the aopc step again,
      if you are not using system class loader.
      -->
       <taskdef name="annotationc" classname="org.jboss.aop.ant.AnnotationC" 
       classpathref="aop.classpath"/>
       <annotationc compilerclasspathref="aop.classpath" bytecode="true">
          <classpath refid="lib.classpath"/>
          <classpath path="${build}"/>
          <!--System wide jboss-aop.xml is located here. -->
          <classpath path="${output.resources.dir}"/>
          <src path="${source}"/>
          <include name="org/jboss/cache/aop/test/**/*.java"/>
       </annotationc>
   </target>