Cargo : Maven2 plugin
This page last changed on May 01, 2011 by alitokmen.
A Maven 2 plugin that wraps the Cargo Java API
Table of ContentsThe documentatation for this Maven2 plugin includes:
Getting StartedVery quick startCARGO can be directly run on any existing Maven2 Java EE project (WAR, EAR or other) by running: This will create a default Jetty 6.x embedded container and start it using the Cargo Maven2 plugin with your Maven2 project's deployable (a WAR, for example) deployed to it; so you can run manual tests (as a first introduction). What is magic is that if you now want to run the same tests with Tomcat 7.x you simply need to run (in one line): That command will automatically download Tomcat 7.0.16 from the specified URL (taking into account any proxy server setting you would have in Maven2/Maven3), instantiate the container, create a local configuration with your application and run it. It will also save the downloaded container in the default directory (see the Maven2 Plugin Reference Guide for details), so it won't get downloaded when you run the same command twice. Now, if you want to run this time on Glassfish 3.x with with the HTTP port set to 9000, run: CARGO's main advantage is that the commands and configuration remains the same for any version of any container supported by CARGO -be it Tomcat, Jetty, JBoss, JOnAS, GlassFish, WebLogic, etc. Like it? Well, keep on reading, then! More examplesAs usual the best way to learn to use a tool is through examples. We have several Maven2 Archetypes that contain sample Maven2/Maven3 projects with different use cases for the CARGO plugin, we would really recommend that you check them out. For more details, read here: Maven2 Archetypes. In addition here are the typical uses cases covered by the plugin:
The Cargo Maven plugin in detailHere are the different goals available to call on this plugin:
|
![]() |
Document generated by Confluence on Dec 03, 2011 14:37 |