Skip to content

Instantly share code, notes, and snippets.

@martypitt
Created May 20, 2013 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martypitt/5611982 to your computer and use it in GitHub Desktop.
Save martypitt/5611982 to your computer and use it in GitHub Desktop.
Remote deploy with Cargo Daemon
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mangofactory.joose</groupId>
<artifactId>deployment.test</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<name>Maven Webapp</name>
<dependencies>
<dependency>
<artifactId>deployment-test</artifactId>
<type>war</type>
<groupId>com.mangofactory.concorde</groupId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<hostname>xx.xx.xx.xx</hostname>
<daemon.port>18000</daemon.port>
<servlet.port>8080</servlet.port>
<server.handleId>sample</server.handleId>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.4.0</version>
<configuration>
<container>
<containerId>tomcat7x</containerId>
<zipUrlInstaller>
<url>http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.8/bin/apache-tomcat-7.0.8.zip</url>
</zipUrlInstaller>
</container>
<configuration>
<properties>
<cargo.servlet.port>${servlet.port}</cargo.servlet.port>
</properties>
</configuration>
<deployer>
<type>remote</type>
</deployer>
<deployables>
<!-- The project's artifact is automatically deployed if no deployable
is defined. However, we define it here so that we can specify the context
(we don't want the version to be included in the context). -->
<deployable>
<groupId>com.mangofactory.concorde</groupId>
<artifactId>deployment-test</artifactId>
<type>war</type>
<properties>
<context>/sample</context>
</properties>
</deployable>
</deployables>
<daemon>
<properties>
<cargo.daemon.url>http://${hostname}:${daemon.port}/</cargo.daemon.url>
<cargo.daemon.handleid>${server.handleId}</cargo.daemon.handleid>
</properties>
</daemon>
</configuration>
<executions>
<execution>
<id>deploy-cargo</id>
<phase>pre-integration-test</phase>
<goals>
<goal>daemon-start</goal>
</goals>
</execution>
<execution>
<id>undeploy-cargo</id>
<phase>post-integration-test</phase>
<goals>
<goal>daemon-stop</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
@msangel
Copy link

msangel commented Oct 2, 2013

Does this thing create remote server from localy downloaded tomcat only through cargo deamon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment