title: Aspectj not work when use ant to do compile
body: <p>If I use IDE to run the code,  everything works fine.
  <a href="https://i.stack.imgur.com/OVFmM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OVFmM.png" alt="enter image description here"></a></p>
  
  <p>But when i use ant to compile the code, Aspectj's proxy doesn't work.
  My ant target</p>
  
  <pre><code>   &lt;property name="ajc.adapter" value="org.aspectj.tools.ant.taskdefs.Ajc11CompilerAdapter"/&gt; 
     &lt;target name="compile" description="compile all files"&gt;
      &lt;mkdir dir="WebContent/WEB-INF/classes" /&gt;
         &lt;javac
             debug="true"
             srcdir="src"
             destdir="WebContent/WEB-INF/classes"
             classpathref="classpath"
             deprecation="true"
             source="1.6"
             target="1.6"
             optimize="true"&gt;
             &lt;include name="**/*.java" /&gt;
             &lt;compilerarg compiler="${ajc.adapter}" line="-verbose -Xlint -proceedOnError"/&gt;
             &lt;compilerarg compiler="${ajc.adapter}" value="-classpath"/&gt;
             &lt;!--&lt;compilerarg value="-Xlint:deprecation"/&gt;--&gt;
             &lt;!--&lt;compilerarg value="-Xlint:unchecked"/&gt;--&gt;
         &lt;/javac&gt;
      &lt;!-- Copy the properties files. --&gt;
      &lt;copy todir="WebContent/WEB-INF/classes"&gt;
          &lt;fileset dir="src"&gt;
              &lt;include name="**/*.properties" /&gt;
          &lt;/fileset&gt;
      &lt;/copy&gt;
      &lt;!-- Copy the XML files --&gt;
      &lt;copy todir="WebContent/WEB-INF/classes"&gt;
          &lt;fileset dir="src"&gt;
              &lt;include name="**/*.xml" /&gt;
          &lt;/fileset&gt;
      &lt;/copy&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>Java code :</p>
  
  <pre><code>    @Around("execution(* *.*(..)) &amp;&amp; @annotation(com.xyz.MonitorMethod)")
  public Object check(ProceedingJoinPoint  pjp) throws Throwable {
      try {
          return pjp.proceed();
      } finally {
          System.out.println("======================222");
      }
  }
  </code></pre>
  
  <p>Is any issue in this target? THX.
  I want use <a href="https://eclipse.org/aspectj/doc/next/devguide/antTasks-adapter.html" rel="nofollow noreferrer">Ajc11CompilerAdapter (javac)</a></p>