title: How to use AspectJ Maven for binary weaving after Javac + Lombok phase
body: <p>I have a project that uses compiled aspects and weaves them at compile time. I want to add Lombok, but unfortunately AJC is not supported by Lombok. Since this project doesn't have any sources of aspects on its own i configured AspectJ Maven plugin to do post-compile weaving instead, after compiling with Javac+Lombok.</p>
  
  <p>Here is config for AspectJ Maven plugin:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;forceAjcCompile&gt;true&lt;/forceAjcCompile&gt;
  &lt;sources/&gt;
  &lt;weaveDirectory&gt;${project.build.outputDirectory}&lt;/weaveDirectory&gt;
  </code></pre>
  
  <p>It's attached to compile phase right after Maven Compiler plugin compile. That way Lombok + Javac will be invoked first and later AJC will perform weaving on Javac's generated class files.</p>
  
  <p>Is there any limitations/disadvantages when performing bytecode weaving on javac generated classes?</p>
  
  <p>Maybe there is a better approach of making Maven+Lombok+Aspects+Idea work together without issues.</p>
  
  <p>Here is a minimal example project: <a href="https://github.com/Psimage/aspectj-and-lombok" rel="noreferrer">https://github.com/Psimage/aspectj-and-lombok</a></p>