What do you mean by "if you really have to..."? Am I not supposed to be
testing and deploying the latest version? What I have used so far is, I run
mvn install and myapp-webapp-1.0-SNAPSHOT.war gets deployed to both servers.
What is the "best practise" for this?
Would you have any pom.xml examples for "create a deployer" and "using real
war as underlay"?
Michael McCallum-3 wrote:
>
> perhaps you should think about this differently... create a deployer for
> tomcat that looks at your repository and deploys the latest release or if
> you
> _really_ have to the latest snapshots...
>
> i have found that using cargo is much better if I use the real war as
> an 'underlay' which the test war gets overlayed onto... - see dependencies
> on
> wars somewhere around - that way i can build a real application and
> overwrite
> a few things for testing in my container of choice
>
> On Wednesday 31 October 2007 01:26, jimpo wrote:
>> 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>
>
> --
> Michael McCallum
> Enterprise Engineer
> mailto:[EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Deploying-war-to-2-different-containers-at-the-same-time-tf4718169s177.html#a13504231
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]