Note that there are some explanatory texts on larger screens.

plurals
  1. POMaven Assembly Submodules Multimodules
    primarykey
    data
    text
    <p>Hi I need to assembly jars from multimodule project in master directory. Let us have a structure like this:</p> <pre><code>MASTER(pom) | +-A3(pom) | +-A1(jar) | +-A2(jar) +-B3(pom) +-B1(jar) +-B2(jar) </code></pre> <p>What I want to achieve is to assembly all jar packaged modules in MASTER.</p> <pre><code>jars/ +- A1.jar +- A2.jar +- B1.jar +- B2.jar </code></pre> <p>For now I achieved only good resolution on submodules (A3 and B3) by creating pom.xml like:</p> <pre class="lang-xml prettyprint-override"><code>&lt;modules&gt; &lt;module&gt;../A1&lt;/module&gt; &lt;module&gt;../A2&lt;/module&gt; &lt;/modules&gt; &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;descriptors&gt; &lt;descriptor&gt;src/main/assembly/bin.xml&lt;/descriptor&gt; &lt;/descriptors&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; </code></pre> <p>and assembly descriptor:</p> <pre class="lang-xml prettyprint-override"><code>&lt;moduleSets&gt; &lt;moduleSet&gt; &lt;includes&gt; &lt;include&gt;org.mycompany:A1&lt;/include&gt; &lt;include&gt;org.mycompany:A2&lt;/include&gt; &lt;/includes&gt; &lt;binaries&gt; &lt;includeDependencies&gt;false&lt;/includeDependencies&gt; &lt;outputDirectory&gt;jars/${artifactId}&lt;/outputDirectory&gt; &lt;unpack&gt;false&lt;/unpack&gt; &lt;/binaries&gt; &lt;/moduleSet&gt; &lt;/moduleSets&gt; </code></pre> <p>When I do</p> <pre><code>mvn clean package assembly:assembly </code></pre> <p>on submodules (A3 or B3) separately they seem to assembly their own submodules fine.</p> <p>I don't know how to specify assembly descriptor in MASTER. The one similar to A3 and B3 descriptor does not deal with it ([ERROR] you must specify at least one file). I tried several additional tags like includeSubModules... still nothing.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload