We're updating the issue view to help you get more done. 

Cargo Jetty Documentation for remote deployment

Description

It seems there is no clear documentation on how to set up Cargo with Jetty for remote (hot) deployment using the maven2 plugin.

In particular, I saw no place telling me to download and set-up 'cargo-jetty-deployer.war' on my remote server, nor did I find a place to download it aside from googling to get it from a maven repo. Besides that, setting the proper hostname in the doc isn't mentioned in any of the examples (they all seem to leave it out and use localhost? not my idea of remote...). There is also no information on how to set up the user expected for cargo.remote.username/password – it would be good if it said to add it to Jetty's realms.properties file on the remote host with the role level 'manager' (at least the role name should be mentioned.)

Being absolutely new to configuring Cargo and Jetty, this took me several hours to figure out by trifling through old mailing list posts, JIRA issues and going as far as to read some of the source code.

Here is my example solution:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <configuration> <container> <containerId>jetty6x</containerId> <type>remote</type> </container> <configuration> <type>runtime</type> <properties> <!-- where app will go e.g.: example.com if you get app at http://example.com/context --> <cargo.hostname>hostname </cargo.hostname> <!-- to be configured in jetty's realm.properties file with role 'manager' --> <cargo.remote.username>user</cargo.remote.username> <cargo.remote.password>password</cargo.remote.password> </properties> </configuration> <deployer> <type>remote</type> <deployables> <deployable> <groupId>groupId from above in POM</groupId> <artifactId>artifactId from above in POM</artifactId> <type>war</type> <properties> <context>/myAppContext</context> </properties> </deployable> </deployables> </deployer> </configuration> </plugin>

And in jetty's $JETTY_HOME/etc/realms.properties file:
user: password,manager
(note that there are several ways to securely store that password in the file, mentioned on Jetty's website)

It would be good if this information was available on the Cargo webpage, along with a simple run-through of the commands:
mvn war:war (I don't believe cargo does this for me, and I have no idea how to make it, but it would be nice if it did)
mvn cargo:deploy (or mvn cargo:redeploy)

Summary of info to be added:
+ link to cargo-jetty-deployer.war to be deployed manually on Jetty server
+ example of working plugin configuration with non-localhost hostname
+ note of user being created for Jetty on remote server with role manager
+ a typical command sequence (mvn war:war, mvn cargo:deploy)

Status

Assignee

Savas Ali Tokmen

Reporter

S. Ali Tokmen

Components

Fix versions

Priority

Minor