title: Maven - 'all' or 'parent' project for aggregation?
body: <p>For educational purposes I have set up a project layout like so (flat in order to suite eclipse better):</p>
  
  <pre><code>-product
   |
   |-parent
   |-core
   |-opt
   |-all
  </code></pre>
  
  <p>Parent contains an aggregate project with core, opt and all. Core implements the mandatory part of the application. Opt is an optional part. All is supposed to combine core with opt, and has these two modules listed as dependencies.</p>
  
  <p>I am now trying to make the following artifacts:</p>
  
  <ol>
  <li>product-core.jar</li>
  <li>product-core-src.jar</li>
  <li>product-core-with-dependencies.jar</li>
  <li>product-opt.jar</li>
  <li>product-opt-src.jar</li>
  <li>product-opt-with-dependencies.jar</li>
  <li>product-all.jar</li>
  <li>product-all-src.jar</li>
  <li>product-all-with-dependencies.jar</li>
  </ol>
  
  <p>Most of them are fairly straightforward to produce. I do have some problem with the aggregating artifacts though. I have managed to make the product-all-src.jar with a custom assembly descriptor in the 'all' module which downloads the sources for all non-transitive deps, and this works fine. This technique also allows me to make the product-all-with-dependencies.jar.</p>
  
  <p>I however recently found out that you can use the source:aggregate goal in the source plugin to aggregate sources of the entire aggregate project. This is also true for the javadoc plugin, which also aggregates through the usage of the parent project.</p>
  
  <p>So I am torn between my 'all' module approach and ditching the 'all' module and just use the 'parent' module for all aggregation. It feels unclean to have some aggregate artifacts produced in 'parent', and others produced in 'all'. Is there a way of making an 'product-all' jar in the parent project, or to aggregate javadoc in the 'all' project? Or should I just keep both?</p>
  
  <p>Thanks</p>