title: Compiling with maven-compiler-plugin and aspectj-maven-plugin
body: <p>When i use <code>maven-apsectj-plugin</code> and <code>maven-compiler-plugin</code> <code>compile</code> phase will execute both plugins <code>compile</code> goal.
  This results in compilation with <code>javac</code> first and then full recompilation with <code>ajc</code>.</p>
  
  <p>Is this double compilation necessary? It seems like i can just turn <code>maven-compiler-plugin</code> off and everything works just fine.</p>
  
  <p>I'm using "default" configuration as stated in the usage of <code>maven-compiler-plugin</code>:</p>
  
  <pre><code>&lt;project&gt;
    ...
    &lt;dependencies&gt;
      ...
      &lt;dependency&gt;
        &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
        &lt;artifactId&gt;aspectjrt&lt;/artifactId&gt;
        &lt;version&gt;1.8.13&lt;/version&gt;
      &lt;/dependency&gt;
      ...
    &lt;/dependencies&gt;
    ...
    &lt;build&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
          &lt;artifactId&gt;aspectj-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;1.11&lt;/version&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;goals&gt;
                &lt;goal&gt;compile&lt;/goal&gt;       &lt;!-- use this goal to weave all your main classes --&gt;
                &lt;goal&gt;test-compile&lt;/goal&gt;  &lt;!-- use this goal to weave all your test classes --&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
        &lt;/plugin&gt;
        ...
      &lt;/plugins&gt;
    &lt;build&gt;
    ...
  &lt;/project&gt;
  </code></pre>