Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you have a multi-module project you need a structure like the following which will also be represented by the folder structure as well.</p> <pre><code>+-- root (pom.xml) +--- module-1 +--- module-2 +--- module-war </code></pre> <p>Whereas the root module contains a thing like this:</p> <pre><code>&lt;project ..&gt; &lt;groupId&gt;com.test.project&lt;/groupId&gt; &lt;artifactId&gt;parent&lt;/artifactId&gt; &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt; &lt;modules&gt; &lt;module&gt;module-1&lt;/module&gt; &lt;module&gt;module-2&lt;/module&gt; &lt;module&gt;module-war&lt;/module&gt; &lt;/modules&gt; &lt;/project&gt; </code></pre> <p>In the module-1 your pom should look like this:</p> <pre><code>&lt;project ..&gt; &lt;parent&gt; &lt;groupId&gt;com.test.project&lt;/groupId&gt; &lt;artifactId&gt;parent&lt;/artifactId&gt; &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt; &lt;/parent&gt; &lt;artifactId&gt;module-1&lt;/artifactId&gt; dependencies for the module &lt;/project&gt; </code></pre> <p>in module-2 it look more or less the same..and in the war module it looks like:</p> <pre><code>&lt;project ..&gt; &lt;parent&gt; &lt;groupId&gt;com.test.project&lt;/groupId&gt; &lt;artifactId&gt;parent&lt;/artifactId&gt; &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt; &lt;/parent&gt; &lt;packaging&gt;war&lt;/packaging&gt; &lt;artifactId&gt;module-war&lt;/artifactId&gt; dependencies for the module &lt;/project&gt; </code></pre> <p>If you have dependencies between the modules for example module-1 depends on module-2 it looks like the following in module-1:</p> <pre><code>&lt;project ..&gt; &lt;parent&gt; &lt;groupId&gt;com.test.project&lt;/groupId&gt; &lt;artifactId&gt;parent&lt;/artifactId&gt; &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt; &lt;/parent&gt; &lt;artifactId&gt;module-1&lt;/artifactId&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;${project.groupId}&lt;/groupId&gt; &lt;artifactId&gt;module-2&lt;/artifactId&gt; &lt;version&gt;{project.version}&lt;/version&gt; &lt;/dependency&gt; ..other dependencies.. &lt;/dependencies&gt; &lt;/project&gt; </code></pre> <p>To build and package your project you will go to parent folder and do simply a</p> <pre><code>mvn clean package </code></pre>
    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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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