Note that there are some explanatory texts on larger screens.

plurals
  1. POMaven - Calling a module from Parent POM based on the profile
    primarykey
    data
    text
    <p>I have a module which is supposed to produce two artifacts (war's). The only difference between the two WAR's is the web.xml being used.<br> I did this with the help of Maven Profiles... </p> <pre><code>&lt;parent&gt; &lt;artifactId&gt;com&lt;/artifactId&gt; &lt;groupId&gt;myProj&lt;/groupId&gt; &lt;version&gt;1.0&lt;/version&gt; &lt;/parent&gt; &lt;groupId&gt;myProj.module1&lt;/groupId&gt; &lt;artifactId&gt;module1&lt;/artifactId&gt; &lt;version&gt;1.0&lt;/version&gt; &lt;packaging&gt;war&lt;/packaging&gt; &lt;profiles&gt; &lt;profile&gt; &lt;id&gt;module1&lt;/id&gt; &lt;build&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;warName&gt;module1&lt;/warName&gt; &lt;webXml&gt;src\main\webapp\WEB-INF\web_module1.xml&lt;/webXml&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/profile&gt; &lt;profile&gt; &lt;id&gt;module2&lt;/id&gt; &lt;build&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;warName&gt;module2&lt;/warName&gt; &lt;webXml&gt;src\main\webapp\WEB-INF\web_module2.xml&lt;/webXml&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/profile&gt; &lt;/profiles&gt; </code></pre> <p><strong>Q1: How can I call this POM from super POM so that both the Profiles are activated?<br> Q2: Is it possible to install both the generated artifacts in Local repository?</strong></p> <p>Thanks!</p>
    singulars
    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. 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