Cargo : Maven2 Archetypes
This page last changed on Jun 02, 2010 by alitokmen.
Maven2 ArchetypesMaven2 has a powerful feature called Archetype. As part of the Cargo project we have created some Archetype that you can use to get a working project sample using the Cargo Maven2 plugin. Single Webapp Module ArchetypeShows how to configure Cargo and Maven2 to run functional tests directly from a single webapp module. To run it, execute: mvn archetype:create -DarchetypeGroupId=org.codehaus.cargo -DarchetypeArtifactId=cargo-archetype-webapp-single-module -DarchetypeVersion=<version> -DgroupId=<application groupId> -DartifactId=<application artifactId> -Dversion=<application version> where
Once your Maven project is generated, simply run mvn clean install That command will:
That archetype also demonstrates another powerful feature of CARGO: if you now run mvn clean install -Ptomcat6x the same steps will be done with Tomcat instead of Jetty. The archetype actually ships with Maven profiles for the jetty6x, tomcat6x, jonas5x, jboss51x and glassfish3x containers. You can of course add and use any other container from the Containers list. Separate Functional Test Module ArchetypeShows how to configure Cargo and Maven2 to run functional tests by creating a functional tests module next to the webapp module. To run it, execute: mvn archetype:create -DarchetypeGroupId=org.codehaus.cargo -DarchetypeArtifactId=cargo-archetype-webapp-functional-tests-module -DarchetypeVersion=<version> -DgroupId=<application groupId> -DartifactId=<application artifactId> -Dversion=<application version> |
![]() |
Document generated by Confluence on Nov 03, 2010 20:45 |