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]

Reply via email to