> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# deploy (GlassFish)

> Deploy an EAR or WAR to a running GlassFish domain. If the domain is stopped, the operation will exit with an error. You can place the operation earli

Deploy an EAR or WAR to a running GlassFish domain. If the domain is stopped, the operation will exit with an error. You can place the [startDomain](https://docs.flexagon.com/flexdeploy-11-1-documentation/flexdeploy-plugin-guides/flexdeploy-glassfish-plugin-guide/startdomain.md) operation earlier in the workflow to verify that it is running if you aren't sure.

The plugin operation waits for the deployment to complete before continuing.

If you are wondering what a GlassFish master password is and whether you need it, the link [https://blogs.oracle.com/alexismp/entry/what\_is\_a\_glassfish\_master](https://blogs.oracle.com/alexismp/entry/what_is_a_glassfish_master) may be helpful.

# Target Properties

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Property Name**</th><th>**Property Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Glassfish Admin Password</td><td>`FDGF_ADMIN_PASSWORD`</td><td>Yes</td><td>The password for the administrative user.</td></tr><tr><td>Glassfish Admin Username</td><td>`FDGF_ADMIN_USERNAME`</td><td>Yes</td><td>The username for the administrative user.</td></tr><tr><td>Glassfish Admin Port</td><td>`FDGF_ADMIN_PORT`</td><td>Yes</td><td>The port of the Glassfish admin server. (e.g. `4848`)</td></tr><tr><td>Glassfish Master Password</td><td>`FDGF_MASTER_PASSWORD`</td><td>No</td><td>The Glassfish Master Password (not needed if the developer profile is used.)</td></tr><tr><td>Glassfish Home</td><td>`FDGF_GLASSFISH_HOME`</td><td>Yes</td><td>GlassFish Home Directory. (e.g. `/u01/oracle/glassfish3`)</td></tr><tr><td>Glassfish Domain Name</td><td>`FDGF_DOMAIN_NAME`</td><td>Yes</td><td>Name of the GlassFish domain to start.</td></tr></tbody></table>

# Project Properties

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Property Name**</th><th>**Property Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Glassfish Application</td><td>`FDGF_APPLICATION_NAME`</td><td>Yes</td><td>Name of EAR or WAR file to deploy. If a relative path is given, it will be assumed to be in the `FD_ARTIFACTS_DIR`.</td></tr></tbody></table>

# Inputs

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Input Name**</th><th>**Input Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Force Deploy</td><td>`FDGF_INP_FORCE_DEPLOY`</td><td>No</td><td>Option to forcibly deploy an application to a domain.</td></tr><tr><td>Context Root</td><td>`FDGF_INP_CONTEXT_ROOT`</td><td>No</td><td>Determines which URL GlassFish will use for your application. (e.g. `http://localhost:8080/ContextRoot`)</td></tr></tbody></table>

# Artifacts

This operation does not produce or consume any artifacts.

# Endpoint Selection

This operation will select all available endpoints associated to the target.

# Endpoint Execution

This operation will execute on any one of the selected endpoints and will be random in the determination of which one.

# Special Considerations

This plugin has the following pre-requisites:

* The `JAVA_HOME` environment variable must be set to a supported JDK for the version of GlassFish being used.

* The target GlassFish server must be running prior to calling this operation.
