...
Code Block |
---|
[...] DeployableFactory factory = new DefaultDeployableFactory(); WAR war = factory.createDeployable("tomcat5x", "path/to/my.war", DeployableType.WAR); |
Example using the Ant
...
tasks
Statically deploying a WAR in Tomcat 5.x:
Code Block | ||||
---|---|---|---|---|
| ||||
<cargo containerId="tomcat5x" home="c:/apps/tomcat-5.0.29" action="start"> <configuration> <war warfile="path/to/my.war"/> </configuration> </cargo> |
Example using
...
the Maven 3 plugin
Code Block | ||||
---|---|---|---|---|
| ||||
<dependencies> [...] <dependency> <groupId>my.war.groupId</groupId> <artifactId>my-war</artifactId> <version>1.0.0</version> <packaging>war</packaging> </dependency> [...] </dependencies> [...] <plugins> [...] <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven3-plugin</artifactId> <configuration> <container> [...] </container> <configuration> <type>standalone</type> [...] </configuration> <deployables> <deployable> <groupId>my.war.groupId</groupId> <artifactId>my-war</artifactId> <type>war</type> </deployable> </deployables> </configuration> </plugin> </plugins> |
...