Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When you package your application you may include the deployment plan within the package or not. At deployment time, Geronimo will look for the geronimo-web.xml and web.xml deployment plans (or geronimo-application.xml or geronimo-application-client.xml depending the type of application) in the WEB-INF directory within your packaged application. If Geronimo can not find those descriptors it will attempt to deploy the application using defaults. If using defaults fails you will have to either provide a deployment plan repackaged in the application or provide an external deployment plan, in the following sections we will discuss further these alternatives.

Via Geronimo Administration Console
Anchor

...

GACdeploy

...

GACdeploy

To install a new application via the Geronimo Administration Console the Install New Applications portlet is available by selecting Deploy New on the Console Navigation menu on the left hand side. This portlet also allows you to start automatically the application right after it was deployed.

...

These are the basic steps for installing and uninstalling applications via the Geronimo Administration Console, the following two sections will focus on the command line options.

Hot deployment
Anchor

...

Hotdeploy

...

Hotdeploy

Apache Geronimo has support for Hot Deployment, which means that you can copy an application JAR file into the <geronimo_home>/deploy directory and the application will be deployed automatically. This will also work for uninstalling or refreshing applications previously deployed via this method. Alternatively, you may also copy the directory (unpacked) for the application module instead of copying a single JAR file.

...

No Format
bgColor#000000
borderStylesolid
11:46:17,953 INFO  [DirectoryHotDeployer] Undeploying HelloWorld.war
11:46:18,281 INFO  [DirectoryMonitor] Hot deployer notified that an artifact was removed: sample.applications/HelloWorldApp/2.0/war
11:46:18,281 INFO  [DirectoryHotDeployer]     Undeployed sample.applications/HelloWorldApp/2.0/war

h1. Via Deployer tool{anchor:Deployertooldeployertool}
The deployer tool will allow you, among other things, install and uninstall applications via a command line. In this section we will focus on just these two tasks for the sample application, the remaining functionality is fully covered in the [Deployer tool|deploy] section.

To deploy the HelloWorld.war sample application using the Deployer tool open a command line window and type the following command from the {{<geronimo_home>\bin}} directory:

*{{deploy --user system --password manager deploy <app_home>\HelloWorld.war}}*

If your application does not include the Geronimo specific deployment plan in the {{WEB-INF}} directory you can still, just like with the Geronimo Administration Console, specify it externally. You just need to add to the previous command the path and file name of the deployment plan.

*{{deploy --user system --password manager deploy <app_home>\HelloWorld.war <deployment_plan_home>\plan.xml}}*

Note that when specifying the deployment plan externally you can use any file name to identify that plan, there is no need to use the {{geronimo-XYZ.xml}} form. In our example we do not need to specify any additional deployment plans as we have the Geronimo specific ones already included in the package.

Once deployed you should see a confirmation message similar to this one:

{color:white}{noformat:borderStyle=solid| bgColor=#000000}
D:\geronimo-tomcat6-jee5-2.0-M2\bin>deploy --user system --password manager deploy \HelloWorld_2.0\HelloWorld.war
Using GERONIMO_BASE:   D:\geronimo-tomcat6-jee5-2.1
Using GERONIMO_HOME:   D:\geronimo-tomcat6-jee5-2.1
Using GERONIMO_TMPDIR: D:\geronimo-tomcat6-jee5-2.1\var\temp
Using JRE_HOME:        C:\Java\jdk1.5.0_06\\jre
    Deployed sample.applications/HelloWorldApp/2.0/war @
    http://hcunico:8080/hello

...