From Oxxus Wiki
There are several ways in which you can deploy your application on Geronimo. See below for the detailed explanation of each of 3 ways.
- Using administration console
- Using hot deployment
- Using deployer tool
Deploying via administration console
To install a new application via the Geronimo Administration Console, the Install Applications portlet is available by selecting Deployer on the Console Navigation menu, on the left hand side. This portlet also allows you to start the application automatically right after it's deployed.
Back in the Geronimo Administration Console, from the Install Applications portlet, click on Browse to specify the path to the HelloWorld.war in the Archive: section. Ensure that the Start app after install checkbox is selected (default is selected checkbox) and then click on Install.
You should see the " The application was successfully deployed. " and " The application was successfully started. " confirmation messages on top of the portlet.
Another way to verify that the application has been successfully installed and started is by checking the Installed Web Applications portlet. This is available by selecting Web App WARs on the Console Navigation menu on the left hand side. You should see the application listed as hello and with the status running.
Since the application installed is HelloWold.WAR, use Installed Web Applications portlet. When you install an EAR, you would check the status using the Installed Application EARs portlet available by selecting Application EARs on the Console Navigation menu on the left hand side. The installation procedure is the same for both WAR and EAR applications.
To remove the applications through the Geronimo Administration Console you would use these two portlets, either the Installed Web Applications or the Installed Application EARs portlets depending on the application to uninstall.
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.
Note that with this deployment method you have to include the deployment plan in the application package, this method does not support external deployment plans. Also note that applications deployed via the Deployer tool or the Geronimo Administration Console will not be listed in the <geronimo_home>/deploy directory.
When you copy an application in the deploy directory, for example HelloWorld.war, you will see a confirmation message in the geronimo.log which locates in the <geronimo_home>/var/log directory.
11:45:23,500 INFO [DirectoryHotDeployer] Deploying HelloWorld.war 11:45:23,953 INFO [DirectoryHotDeployer] Deployed sample.applications/HelloWorldApp/2.0/war @ /hello
To remove the application, just delete the WAR or EAR file from the deploy directory. When the application has been removed you should see a confirmation message in the geronimo.log which locates in the <geronimo_home>/var/log directory.
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
The deployer tool will allow you, amongst other things, to install and uninstall applications via a command line. In this section the focus is on these two tasks for the sample application, the remaining functionality is fully covered in the Deployer tool 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