I use maven to build my web application (war). I have two tomcat
installations: unit test installation, which has a datasource that points to
unit test db (this db gets predefined data populated by dbUnit), and
development installation, which uses development database.
In my build I want to first run junit tests, then integration tests using
"unit test" tomcat, and then deploy the same war to the development tomcat.
What kind of setup should I use for this type of deployment? I have tried to
use cargo for deploying to the servers, but can't figure out how to make it
deploy to two places at the same time. I could even copy the wars manually,
but cannot find how I am supposed to be able to move a file from A to B
Maven? Seems like I am spending days finding out how to do simple things
like copying a file, things that I could have done in a few minutes using
ant </rant>
At the moment, I have this kind of config in my pom.xml (yuck, not pretty):
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>0.3</version>
<configuration>
<wait>${cargo.wait}</wait>
<container>
<containerId>${cargo.container}</containerId>
<home>${cargo.container.home}</home>
</container>
<configuration>
<type>existing</type>
<home>${cargo.container.home}</home>
</configuration>
</configuration>
<executions>
<execution>
<id>deploy</id>
<phase>pre-integration-test</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- additional plugin to copy also to second server -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>pre-integration-test</phase>
<configuration>
<tasks>
<copy file="target\myapp-webapp-1.0-SNAPSHOT.war"
todir="${cargo.junit.container.home}\webapps" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
--
View this message in context:
http://www.nabble.com/Deploying-war-to-2-different-containers-at-the-same-time-tf4718169s177.html#a13487565
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]