This tutorial demonstrates how to use the Cargo Maven2 plugin to automatically start/stop a container (possibly deploying some deployables to it as it starts).
- Configuring an Embedded Jetty Container
- Setting the JAVA_HOME for the container
- Automatic deployment of project's artifact (for J2EE projects)
- Automatically executing and stopping the container when running mvn install
- Adding JARs to the container's classpath
- Adding JDBC DataSources to the container's JNDI tree
- Adding POJO or JavaMail Resources to the container's JNDI tree
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.