Message-ID: <158657805.4763.1369466542817.JavaMail.firstname.lastname@example.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_4762_1583374547.1369466542816" ------=_Part_4762_1583374547.1369466542816 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
CARGO can be directly run on any existing Maven2 Java EE project (W= AR, EAR or other) by running:
This will create a default Jetty 7.x installed = local container and start it using the Cargo Maven2 plugin with your Ma= ven2 project's deployable (a WAR, for example) deployed to it; so you can r= un manual tests (as a first introduction).
What is magic is that if y= ou 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 h= ave in Maven2/Maven3), instantiate the container, create a local configurat= ion with your application and run it. It will also save the downloaded cont= ainer 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 yo=
u want to run this time on Glassfi=
sh 3.x with with the HTTP port set to
CARGO's main advantage is that the commands and configuratio= n remains the same for any version of any container supported by CARGO -be = it Tomcat, Jetty, JBoss, JOnAS, GlassFish, WebLogic, etc.
Like it? We= ll, keep on reading, then!
As 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 th= at you check them out. For more details, read here: Maven2 Archetypes.
In addition here are the= typical uses cases covered by the plugin:
Here are the different goals available to call on this plugin:
Start a containe= r. That goal will:
Note: A container that's started wi=
Start a container and wait for the u=
ser to press
Stop a container.
|Stop and start again a container=
. If the container was not running before calling |
Create the configuration for a local container, without starting it. Note that the
Package= the local container.
|Star= t a container via the daemon. Read more on: Cargo Daemon|
|Stop a container via the daemon. Read more on: Cargo Daemon|
Deploy a deployable to a running container.
Undeploy a deployable from a running conta= iner.
Start a = deployable already installed in a running container.
Stop a deployed deployable without un= deploying it.
Undeploy and d=
eploy again a deployable. If the deployable was not deployed before calling=
Merge several WAR files into one.
Get = help (list of available goals, available options, etc.).
The configuration e= lements are described in the Reference Guide section.