<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.vlab</groupId>
<artifactId>myproject</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>org.vlab</groupId>
<version>1.0-SNAPSHOT</version>
<artifactId>deployModules</artifactId>
<packaging>pom</packaging>
<dependencies>
<dependency>
<groupId>org.vlab.jsf</groupId>
<artifactId>module1</artifactId>
<version>1.0-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.vlab.jsf</groupId>
<artifactId>module2</artifactId>
<version>1.0-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.vlab.jsf</groupId>
<artifactId>module3</artifactId>
<version>1.0-SNAPSHOT</version>
<type>war</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<executions>
<execution>
<id>verify-deploy</id>
<phase>install</phase>
<goals>
<goal>deployer-deploy</goal>
</goals>
</execution>
<execution>
<id>clean-undeploy</id>
<phase>pre-clean</phase>
<goals>
<goal>deployer-undeploy</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- Container Configuration -->
<container>
<containerId>tomcat5x</containerId>
<type>remote</type>
</container>
<!-- Configuration to use with the container -->
<configuration>
<type>runtime</type>
<properties>
<cargo.tomcat.manager.url>
http://localhost:8080/manager
</cargo.tomcat.manager.url>
<cargo.remote.username>
bollig
</cargo.remote.username>
<cargo.remote.password>
test
</cargo.remote.password>
</properties>
</configuration>
<!-- Deployer and Deployables configuration -->
<deployer>
<type>remote</type>
<deployables>
<deployable>
<groupId>org.vlab.jsf</groupId>
<artifactId>module1</artifactId>
<type>war</type>
<pingURL>http://localhost:8080/module1-1.0-SNAPSHOT/helloWorld.jsf</pingURL>
</deployable>
<deployable>
<groupId>org.vlab.jsf</groupId>
<artifactId>module2</artifactId>
<type>war</type>
<pingURL>http://localhost:8080/module2-1.0-SNAPSHOT/helloWorld.jsf</pingURL>
</deployable>
<deployable>
<groupId>org.vlab.jsf</groupId>
<artifactId>module3</artifactId>
<type>war</type>
<pingURL>http://localhost:8080/module3-1.0-SNAPSHOT/helloWorld.jsf</pingURL>
</deployable>
</deployables>
</deployer>
</configuration>
</plugin>
</plugins>
</build>
</project>
Refer to http://www.gorerle.com/vlab-wiki/index.php?title=Tomcat_Deployment_in_Maven2#HotDeploy_With_Cargo
No comments:
Post a Comment