embedded-glassfish:run

Full name:

org.glassfish:maven-embedded-glassfish-plugin:3.1:run

Description:

This Mojo starts Embedded GlassFish and deploys the application with the configured parameters supplied by the user in the embedded-glassfish-maven-plugin configuration.

Use must enter 'X' in their console for this Mojo to exit.

Attributes:

  • Requires a Maven project to be executed.
  • Binds by default to the lifecycle phase: pre-integration-test.

Required Parameters

Name Type Since Description
localRepository ArtifactRepository - This is automatically injected by the Maven framework.

Optional Parameters

Name Type Since Description
app String - Location of the application to be deployed.

Location could be a Java EE file archive or a directory.
artifacts List - This is automatically injected by the Maven framework.
Default value is: ${plugin.artifacts}.
autoDelete Boolean - Specify whether the temporary file system created by Embedded GlassFish should be deleted when Maven exits.

Embedded GlassFish creates the temporary file system under java.io.tmpdir unless a different directory is specified with glassfish.embedded.tmpdir system property.
Default value is: true.
baseDirectory String - Base directory of the maven project. Automatically injected by Maven framework.
bootstrapProperties List - Specify the set of properties required to bootstrap GlassFishRuntime. For example:
<bootstrapProperties>
     <property>GlassFish_Platform=felix</property>
</bootstrapProperties>

bootstrapPropertiesFile File - Specify the location of the properties file which has the properties required to bootstrap GlassFishRuntime. For example:

<bootstrapPropertiesFile>bootstrap.properties</bootstrapPropertiesFile>

where bootstrap.properties is a file containing the bootstrap properties.
buildDirectory String - Build directory of the maven project. Automatically injected by Maven framework.
configFile String - Location of custom configuration file (i.e., location of custom domain.xml).
configFileReadOnly Boolean - Specify whether the custom configuration file or config/domain.xml at the specified instance root is operated read only or not.
Default value is: true.
containerType String - Deprecated. This is a deprecated and unused configuration. Likely to be removed in the next version of the plugin.
Default value is: all.
contextRoot String - Note : <deploymentParams> configuration can be used instead of this.

Context root of the web application.
createTables Boolean - Note : <deploymentParams> configuration can be used instead of this.

Specify whether the tables should be created during deployment.
dbVendorName String - Note : <deploymentParams> configuration can be used instead of this.

Name of the database vendor.
deploymentParams String[] - Deployment parameters to be used while deploying the application to Embedded GlassFish.

The deployment parameters are same as how they would be passed to 'asadmin deploy' command while using standalone GlassFish.

For example:
<deploymentParams>
     <param>--contextroot=greetings</param>
     <param>--name=test</param>*
     <param>--createtables=true</param>
     <param>--force=true</param>
     <param>--precompilejsp=true</param>
</deploymentParams>

fileName String - Name of the file to be deployed to Embedded GlassFish.

Use app configuration instead of this.
glassfishProperties List - Specify the set of properties required to create a new Embedded GlassFish.

For example:
<glassfishProperties>
     <property>embedded-glassfish-config.server.jms-service.jms-host.default_JMS_host.port=17676</property>
</glassfishProperties>

glassfishPropertiesFile File - Specify the location of the properties file which has the properties required to create a new GlassFish. For example:

<glassfishPropertiesFile>glassfish.properties</glassfishPropertiesFile>

where glassfish.properties is a file containing the GlassFish properties.
installRoot String - Location of valid GlassFish installation.
instanceRoot String - Location of valid GlassFish domain.
libraries String - Note : <deploymentParams> configuration can be used instead of this.

A comma-separated list of library JAR files.
name String - Note : <deploymentParams> configuration can be used instead of this.

Name of the application.
Default value is: myapp.
port int - Note : Using <ports> configuration is preferred over this configuration.

Specify the HTTP port number.

For example: <port>8080</port>

This setting is ignored when configFile option is used.


Default value is: -1.
ports Map - Specify the port numbers for the network listeners.

Built-in domain.xml has HTTP and HTTPS network listeners by names http-listener and https-listener respectively. That allows you to configure the ports like this:

<ports>
     <http-listener>8080</http-listener>
     <https-listener>8181</http-listener>
</ports>

If you are using custom domain.xml, you can either configure the ports directy in your domain.xml or configure using this configuration parameter by correctly specifying port numbers for the the names of the network-listener element of your domain.xml.
precompileJsp Boolean - Note : <deploymentParams> configuration can be used instead of this.

Specify whether the JSPs should be precompiled during deployment.
remoteRepositories List - The remote repositories where artifacts are located. This is automatically injected by the Maven framework.
serverID String - Identifier of the Embedded GlassFish server.
Default value is: maven.
systemProperties List - Specify the system properties. For example:
<systemProperties>
     <property>com.sun.aas.imqLib=${env.S1AS_HOME}/../mq/lib</property>
     <property>com.sun.aas.imqBin=${env.S1AS_HOME}/../mq/bin</property>
</systemProperties>

systemPropertiesFile File - Specify the location of the properties file which has the system properties.

For example: <systemPropertiesFile>/tmp/system.properties</systemPropertiesFile>
undeploymentParams String[] - Undeployment parameters to be used while undeploying the application from Embedded GlassFish.

The undeployment parameters are same as how they would be passed to 'asadmin undeploy' command while using standalone GlassFish.

For example:
<undeploymentParams>
     <param>--droptables=true</param>
</undeploymentParams>

Parameter Details

app:

Location of the application to be deployed.

Location could be a Java EE file archive or a directory.
  • Type: java.lang.String
  • Required: No
  • Expression: ${app}

artifacts:

This is automatically injected by the Maven framework.
  • Type: java.util.List
  • Required: No
  • Default: ${plugin.artifacts}

autoDelete:

Specify whether the temporary file system created by Embedded GlassFish should be deleted when Maven exits.

Embedded GlassFish creates the temporary file system under java.io.tmpdir unless a different directory is specified with glassfish.embedded.tmpdir system property.
  • Type: java.lang.Boolean
  • Required: No
  • Expression: ${autoDelete}
  • Default: true

baseDirectory:

Base directory of the maven project. Automatically injected by Maven framework.
  • Type: java.lang.String
  • Required: No
  • Expression: ${basedir}

bootstrapProperties:

Specify the set of properties required to bootstrap GlassFishRuntime. For example:
<bootstrapProperties>
     <property>GlassFish_Platform=felix</property>
</bootstrapProperties>
  • Type: java.util.List
  • Required: No

bootstrapPropertiesFile:

Specify the location of the properties file which has the properties required to bootstrap GlassFishRuntime. For example:

<bootstrapPropertiesFile>bootstrap.properties</bootstrapPropertiesFile>

where bootstrap.properties is a file containing the bootstrap properties.
  • Type: java.io.File
  • Required: No

buildDirectory:

Build directory of the maven project. Automatically injected by Maven framework.
  • Type: java.lang.String
  • Required: No
  • Expression: ${project.build.directory}

configFile:

Location of custom configuration file (i.e., location of custom domain.xml).
  • Type: java.lang.String
  • Required: No
  • Expression: ${configFile}

configFileReadOnly:

Specify whether the custom configuration file or config/domain.xml at the specified instance root is operated read only or not.
  • Type: java.lang.Boolean
  • Required: No
  • Expression: ${configFileReadOnly}
  • Default: true

containerType:

Deprecated. This is a deprecated and unused configuration. Likely to be removed in the next version of the plugin.
(no description)
  • Type: java.lang.String
  • Required: No
  • Expression: ${containerType}
  • Default: all

contextRoot:

Note : <deploymentParams> configuration can be used instead of this.

Context root of the web application.
  • Type: java.lang.String
  • Required: No
  • Expression: ${contextRoot}

createTables:

Note : <deploymentParams> configuration can be used instead of this.

Specify whether the tables should be created during deployment.
  • Type: java.lang.Boolean
  • Required: No
  • Expression: ${createTables}

dbVendorName:

Note : <deploymentParams> configuration can be used instead of this.

Name of the database vendor.
  • Type: java.lang.String
  • Required: No
  • Expression: ${dbVendorName}

deploymentParams:

Deployment parameters to be used while deploying the application to Embedded GlassFish.

The deployment parameters are same as how they would be passed to 'asadmin deploy' command while using standalone GlassFish.

For example:
<deploymentParams>
     <param>--contextroot=greetings</param>
     <param>--name=test</param>*
     <param>--createtables=true</param>
     <param>--force=true</param>
     <param>--precompilejsp=true</param>
</deploymentParams>
  • Type: java.lang.String[]
  • Required: No
  • Expression: ${deploymentParams}

fileName:

Name of the file to be deployed to Embedded GlassFish.

Use app configuration instead of this.
  • Type: java.lang.String
  • Required: No
  • Expression: ${project.build.finalName}

glassfishProperties:

Specify the set of properties required to create a new Embedded GlassFish.

For example:
<glassfishProperties>
     <property>embedded-glassfish-config.server.jms-service.jms-host.default_JMS_host.port=17676</property>
</glassfishProperties>
  • Type: java.util.List
  • Required: No

glassfishPropertiesFile:

Specify the location of the properties file which has the properties required to create a new GlassFish. For example:

<glassfishPropertiesFile>glassfish.properties</glassfishPropertiesFile>

where glassfish.properties is a file containing the GlassFish properties.
  • Type: java.io.File
  • Required: No

installRoot:

Location of valid GlassFish installation.
  • Type: java.lang.String
  • Required: No
  • Expression: ${installRoot}

instanceRoot:

Location of valid GlassFish domain.
  • Type: java.lang.String
  • Required: No
  • Expression: ${instanceRoot}

libraries:

Note : <deploymentParams> configuration can be used instead of this.

A comma-separated list of library JAR files.
  • Type: java.lang.String
  • Required: No
  • Expression: ${libraries}

localRepository:

This is automatically injected by the Maven framework.
  • Type: org.apache.maven.artifact.repository.ArtifactRepository
  • Required: Yes
  • Expression: ${localRepository}

name:

Note : <deploymentParams> configuration can be used instead of this.

Name of the application.
  • Type: java.lang.String
  • Required: No
  • Expression: ${name}
  • Default: myapp

port:

Note : Using <ports> configuration is preferred over this configuration.

Specify the HTTP port number.

For example: <port>8080</port>

This setting is ignored when configFile option is used.

  • Type: int
  • Required: No
  • Expression: ${port}
  • Default: -1

ports:

Specify the port numbers for the network listeners.

Built-in domain.xml has HTTP and HTTPS network listeners by names http-listener and https-listener respectively. That allows you to configure the ports like this:

<ports>
     <http-listener>8080</http-listener>
     <https-listener>8181</http-listener>
</ports>

If you are using custom domain.xml, you can either configure the ports directy in your domain.xml or configure using this configuration parameter by correctly specifying port numbers for the the names of the network-listener element of your domain.xml.
  • Type: java.util.Map
  • Required: No

precompileJsp:

Note : <deploymentParams> configuration can be used instead of this.

Specify whether the JSPs should be precompiled during deployment.
  • Type: java.lang.Boolean
  • Required: No
  • Expression: ${precompileJsp}

remoteRepositories:

The remote repositories where artifacts are located. This is automatically injected by the Maven framework.
  • Type: java.util.List
  • Required: No
  • Expression: ${project.remoteArtifactRepositories}

serverID:

Identifier of the Embedded GlassFish server.
  • Type: java.lang.String
  • Required: No
  • Expression: ${serverID}
  • Default: maven

systemProperties:

Specify the system properties. For example:
<systemProperties>
     <property>com.sun.aas.imqLib=${env.S1AS_HOME}/../mq/lib</property>
     <property>com.sun.aas.imqBin=${env.S1AS_HOME}/../mq/bin</property>
</systemProperties>
  • Type: java.util.List
  • Required: No

systemPropertiesFile:

Specify the location of the properties file which has the system properties.

For example: <systemPropertiesFile>/tmp/system.properties</systemPropertiesFile>
  • Type: java.io.File
  • Required: No

undeploymentParams:

Undeployment parameters to be used while undeploying the application from Embedded GlassFish.

The undeployment parameters are same as how they would be passed to 'asadmin undeploy' command while using standalone GlassFish.

For example:
<undeploymentParams>
     <param>--droptables=true</param>
</undeploymentParams>
  • Type: java.lang.String[]
  • Required: No
  • Expression: ${undeploymentParams}