title: AspectJ - Compile-time vs load-time weaving
body: <p>I am having trouble understanding aspectJ's compile-time and load-time weaving and figuring out what to use(and how to use ajc) to compile and build my project.</p>
  
  <p>Here's my project structure:-</p>
  
  <ul>
  <li><p>TestProject : a java service library.
  This is being used by a few other
  projects. This project do not contain
  any aspects.</p></li>
  <li><p>TestProject-Aspects : Contains just<br>
  aspects which advice a few classes in
  TestProject. I am not using the<br>
  AspectJ5 annotation style and all my 
  joinpoints are just at the method<br>
  execution currently.</p></li>
  </ul>
  
  <p>My questions:</p>
  
  <ul>
  <li>ajc vs iajc and how are they
  different? </li>
  <li><p>Is there any need for    weaving?</p></li>
  <li><p>Will something like this    work ?</p></li>
  </ul>
  
  <p>Compile TestProject-Aspects</p>
  
  <pre><code>&lt;iajc&gt;
      sourceroots=${sources.dir}
      destdir=${classes.dir}
      classpath=${standard.compile.classpath}
  &lt;/iajc&gt;
  </code></pre>
  
  <p>Compile TestProject</p>
  
  <pre><code>&lt;iajc&gt;
      sourceroots=${sources.dir}
      destdir=${classes.dir}
      classpath=${standard.compile.classpath}
      inpath=${[TestProject-Aspects]pkg.classpath}
  &lt;/iajc&gt;
  </code></pre>
  
  <ul>
  <li>Don't I have to use javac at all ?
  which I was initially using to compile
  TestProject?</li>
  </ul>