Note that there are some explanatory texts on larger screens.

plurals
  1. POMaven multiple profile not working
    primarykey
    data
    text
    <p>I would like to upload my war onto two sepearet locations. For that I have defined following profile in my pom.xml;</p> <pre><code> ........ &lt;profile&gt; &lt;id&gt;deployPoc&lt;/id&gt; &lt;activation&gt; &lt;activeByDefault&gt;false&lt;/activeByDefault&gt; &lt;/activation&gt; &lt;properties&gt; &lt;jboss.host&gt;POC_Deploy&lt;/jboss.host&gt; &lt;jboss.deployDir&gt;/storage2/home/server1/&lt;/jboss.deployDir&gt; &lt;jboss.deployUrl&gt;scp://server1.com&lt;/jboss.deployUrl&gt; &lt;/properties&gt; &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;com.atlassian.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-upload-plugin&lt;/artifactId&gt; &lt;version&gt;1.1&lt;/version&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.maven.wagon&lt;/groupId&gt; &lt;artifactId&gt;wagon-ssh&lt;/artifactId&gt; &lt;version&gt;2.4&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;configuration&gt; &lt;resourceSrc&gt; ${project.build.directory}/${project.build.finalName}.${project.packaging} &lt;/resourceSrc&gt; &lt;resourceDest&gt;${jboss.deployDir}&lt;/resourceDest&gt; &lt;serverId&gt;${jboss.host}&lt;/serverId&gt; &lt;url&gt;${jboss.deployUrl}&lt;/url&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/profile&gt; &lt;profile&gt; &lt;id&gt;uploadUpdate&lt;/id&gt; &lt;activation&gt; &lt;activeByDefault&gt;false&lt;/activeByDefault&gt; &lt;/activation&gt; &lt;properties&gt; &lt;updateReleaseHost&gt;PluginReleaseSite&lt;/updateReleaseHost&gt; &lt;updateReleaseDir&gt;/var/www/html/releases/Latest/&lt;/updateReleaseDir&gt; &lt;updateReleaseUrl&gt;scp://server2.com&lt;/updateReleaseUrl&gt; &lt;/properties&gt; &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;com.atlassian.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-upload-plugin&lt;/artifactId&gt; &lt;version&gt;1.1&lt;/version&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.maven.wagon&lt;/groupId&gt; &lt;artifactId&gt;wagon-ssh&lt;/artifactId&gt; &lt;version&gt;2.4&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;configuration&gt; &lt;resourceSrc&gt; ${project.build.directory}/${project.build.finalName}.${project.packaging} &lt;/resourceSrc&gt; &lt;resourceDest&gt;${updateReleaseDir}&lt;/resourceDest&gt; &lt;serverId&gt;${updateReleaseHost}&lt;/serverId&gt; &lt;url&gt;${updateReleaseUrl}&lt;/url&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/profile&gt; </code></pre> <p></p> <p>I am trying to execute both using following command and its only executing one of them;</p> <pre><code>mvn help:active-profiles upload:upload -PdeployPoc -PuploadUpdate </code></pre> <p>Its only executing 'uploadUpdate', I have tried everything i.e. -Pa,b; -P a,b etc etc.</p> <p>Nothing seems to be working though maven shows following;</p> <pre><code>The following profiles are active: - releaseRepository (source: external) - snapshotsRepository (source: external) - deployPoc (source: com.Project:1.0-SNAPSHOT) - uploadUpdate (source: com.Project:1.0-SNAPSHOT) </code></pre> <p>Am I missing something?</p> <p>Thanks,</p> <p>--</p> <p>SJunejo</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.
    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