I'd like to deploy a war
to both a Tomcat 7 and Weblogic container viacargo:deploy
at the same time. As it stands I can only get one profile to be active at a time.
Here is what I currently have:
<profiles>
<!-- *********************************************************************
CARGO - FOR TOMCAT.
Activated when file ${env.USERPROFILE}/foo.bar exists (which should be there after successful Tomcat tookit install)
********************************************************************* -->
<profile>
<id>tomcat</id>
<activation>
<file><exists>${env.USERPROFILE}/foo.bar</exists></file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>${cargo-maven2-plugin.version}</version>
<configuration>
<container>
<containerId>tomcat7x</containerId>
<type>installed</type>
<home>${env.USERPROFILE}/foo/apache-tomcat-7.0.57</home>
<timeout>180000</timeout>
</container>
<configuration>
<type>existing</type>
<home>${env.USERPROFILE}/foo/apache-tomcat-7.0.57</home>
</configuration>
<deployables>
<deployable>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<type>war</type>
<properties>
<!--No slash needed before the context-->
<context>sec-captc</context>
</properties>
</deployable>
</deployables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- *********************************************************************
CARGO - FOR WEBLOGIC
********************************************************************* -->
<profile>
<id>weblogic</id>
<activation>
<file><exists>${env.USERPROFILE}/foo.bar</exists></file>
</activation>
<build><plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>${cargo-maven2-plugin.version}</version>
<configuration>
<container>
<containerId>weblogic12x</containerId>
<type>installed</type>
<home>${installed-weblogic.home}/foo</home>
<timeout>180000</timeout>
</container>
<configuration>
<type>existing</type>
<home>${installed-weblogic.domain}</home>
</configuration>
<deployables>
<deployable>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<type>war</type>
<properties>
<context>/${installed-weblogic.war.contextpath}</context>
</properties>
</deployable>
</deployables>
</configuration>
</plugin>
</plugins></build>
</profile>
</profiles>
What do I need to add/change to be able to make these work concurrently?