...
where <version> is the version of the Cargo Archetype, as a result the CARGO the Codehaus Cargo version to use.
The Maven 3 archetype plugin will then ask you what groupId
, artifactId
, version
, and package
you would like to use for generation. Once your Maven 3 project is generated, simply run:
...
Code Block |
---|
mvn clean verify -P tomcat8xtomcat9x |
the same steps will be done with Tomcat instead of Jetty; thanks to Maven 3's profiles.
The archetype actually ships with Maven 3 profiles for the jetty9x (default), jetty7x jetty10x, tomcat8x tomcat9x, jonas5x, jboss71x, glassfish3x glassfish5x, geronimo3x and wildfly10x wildfly21x containers. We tried to show with these archetypes as many examples as possible, so you will find that:
- Some of these profiles define a standalone container:
- The profiles jetty9x, jonas5x, jboss71x, glassfish3xglassfish5x, geronimo3x and wildfly10x wildfly21x download the server using the ArtifactInstaller.
- The profile tomcat8x tomcat9x downloads the server using the ZipUrlInstaller (with, indeed, a Maven repository URL).
- The profile jetty7x jetty10x define an embedded container.
...
where <version> is the version of the Cargo Archetype, as a result the CARGO the Codehaus Cargo version to use.
The remaining instructions for this archetype remain the same as the Single Webapp Module Archetype archetype.
...
where <version> is the version of the Cargo Archetype, as a result the CARGO the Codehaus Cargo version to use.
The overall remaining instructions for this archetype remain the same as the Single Webapp Module Archetype archetype, with the following differences:
- Not all containers support DataSources. For details configuring DataSource, please read: DataSource and Resource Support.
- The profiles that ship with this archetype are jetty7x jetty9x (default), tomcat8x tomcat9x, glassfish3x glassfish5x, jboss71x, jonas5x, geronimo3x and wildfly10x wildfly21x.
As in the other examples, what's interesting to see is that the DataSource definition on CARGO on Codehaus Cargo remains the same even if you switch container; as CARGO as Codehaus Cargo handles all the container-specific DataSource setup steps.
...
where <version> is the version of the Cargo Archetype, as a result the CARGO the Codehaus Cargo version to use.
Anchor | ||||
---|---|---|---|---|
|
...
where <version> is the version of the Cargo Archetype, as a result the CARGO Codehaus Cargo version to use.
Once your Maven 3 project is generated, simply run:
...
This archetype ships with Maven 3 profiles for the following containers:
- tomcat8x tomcat9x (default), using the Tomcat manager
- jetty9x. Before using the Jetty remote deployer, please read: Jetty Remote Deployer.
- jonas5x
- jboss7x, including adding in the special dependencies for the JBoss remote deployer. For more details, please read: JBoss Remote Deployer.
- glassfish3xglassfish5x, including adding in the GlassFish-specific dependencies for JSR88. For more details, please read: JSR88.
...
where <version> is the version of the Cargo Archetype, as a result the CARGO the Codehaus Cargo version to use.
The Maven 3 archetype plugin will then ask you what groupId
, artifactId
, version
, and package
you would like to use for generation. Once your Maven 3 project is generated, you need to first start the Cargo Daemon. Then, simply run:
...
The archetype actually ships with Maven 3 profiles for the jetty9x (default), tomcat8xtomcat9x, jonas5x, jboss71x, glassfish3x glassfish5x, geronimo3x and wildfly10x wildfly21x containers.
You can of course add and use any other container from the Containers list.