Cargo : Jetty Remote Deployer
This page last changed on Mar 22, 2011 by alitokmen.
This document explains how to configure Cargo remote deployment support on a Jetty container. OverviewBy default, Jetty does not come with possibilities for remote deployment. In order to add such a support to Jetty, Cargo uses a "Jetty remote deployer" Web application. This application is a simple servlet-based application which exposes methods such as deploy or undeploy on standard HTTP POST URLs. When thse HTTP methods are called, the servlet implementing these methods connects to the Jetty Server implementation and does deployment related actions on the server; this Web application can therefore be seen as a kind of remote administration proxy. Being a standard Web application, the Cargo Jetty remote deployer application can be secured using Jetty users and roles. Downloading the remote deployerTwo versions of the Jetty remote deployer WAR are available on the Cargo downloads page (scroll down to the Tools section):
Please make sure to download and install the correct flavour for your Jetty version. SecurityBy default, the Cargo Jetty remote deployer comes with no security. In order to activate security, follow these steps:
To try the security settings, you can try to visit the /cargo-jetty-deployer context on your server, for example http://production27:8080/cargo-jetty-deployer, using any Web browser. If security is configured well, it should:
ExamplesHere is an example Maven2 plugin configuration that:
<dependencies> <dependency> <groupId>test.somegroup</groupId> <artifactId>somewar</artifactId> <version>1.0.0</version> <type>war</type> </dependency> </dependencies> ... <plugins> <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>${cargo.plugin.version}</version> <configuration> <container> <containerId>jetty6x</containerId> <type>remote</type> </container> <configuration> <type>runtime</type> <properties> <cargo.hostname>production17</cargo.hostname> <cargo.servlet.port>8080</cargo.servlet.port> <cargo.remote.username>someusername</cargo.remote.username> <cargo.remote.password>somepassword</cargo.remote.password> </properties> </configuration> <deployer> <type>remote</type> <deployables> <deployable> <groupId>test.somegroup</groupId> <artifactId>somewar</artifactId> <type>war</type> <properties> <context>/myAppContext</context> </properties> </deployable> </deployables> </deployer> </configuration> </plugin> </plugins> To run the given Maven2 plugin configuration on a simple Maven2 WAR project, simply execute: mvn war:war mvn cargo:deploy |
![]() |
Document generated by Confluence on Dec 03, 2011 14:37 |