glassfish:run

Full name:

net.sf.opk:embedded-glassfish-web-plugin:2.1:run

Description:

MOJO to run the artifact in an embedded GlassFish instance.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: test.
  • Invokes the execution of the lifecycle phase test-compile prior to executing itself.

Required Parameters

Name Type Since Description
classesDirectory File - The directory where classes are compiled to.
User property is: project.build.outputDirectory.
testClassesDirectory File - The directory where classes test are compiled to.
User property is: project.build.testOutputDirectory.
webAppSourceDirectory File - The directory that contains the resources of the web application.
Default value is: ${project.basedir}/src/main/webapp.

Optional Parameters

Name Type Since Description
contextRoot String - The context root to deploy the application at. Defaults to the artifact.
Default value is: /${project.artifactId}.
extraCommands Command[] - Commands to asadmin to execute prior to deploying the application. The commands required for the properties glassFishResources and fileRealms will already be executed.
fileRealms FileRealm[] - The file realms to create prior to deploying the application. The predefined realms "file" and "admin-realm" are recognized and not created anew, though the users you define are added. The predefined realm "certificate" is also recognized, but will generate an error (it is not a file realm).
glassFishResources File - A resource file that defines the external resources required by the web application. Similar to ${webAppSourceDirectory}/WEB-INF/glassfish-resources.xml, but some environments require database passwords etc. to be kept outside your application. This simulates that by loading the resources before the application is deployed.
httpPort int - The HTTP port GlassFish should listen on. Defaults to 8080.
Default value is: 8080.
httpsPort int - The HTTPS port GlassFish should listen on. Defaults to 8443, 0 means "none".
Default value is: 8443.
loggingProperties File - A file to configure java.util.logging, which is the logging system used by GlassFish.
useTestClasspath boolean - If true, the <testClassesDirectory> will be put on the runtime classpath before <classesDirectory> and the dependencies of <scope>test<scope> will be put on the runtime classpath as well.
Default value is: false.

Parameter Details

classesDirectory:

The directory where classes are compiled to.
  • Type: java.io.File
  • Required: Yes
  • User Property: project.build.outputDirectory

contextRoot:

The context root to deploy the application at. Defaults to the artifact.
  • Type: java.lang.String
  • Required: No
  • Default: /${project.artifactId}

extraCommands:

Commands to asadmin to execute prior to deploying the application. The commands required for the properties glassFishResources and fileRealms will already be executed.
  • Type: net.sf.opk.glassfish.Command[]
  • Required: No

fileRealms:

The file realms to create prior to deploying the application. The predefined realms "file" and "admin-realm" are recognized and not created anew, though the users you define are added. The predefined realm "certificate" is also recognized, but will generate an error (it is not a file realm).
  • Type: net.sf.opk.glassfish.FileRealm[]
  • Required: No

glassFishResources:

A resource file that defines the external resources required by the web application. Similar to ${webAppSourceDirectory}/WEB-INF/glassfish-resources.xml, but some environments require database passwords etc. to be kept outside your application. This simulates that by loading the resources before the application is deployed.
  • Type: java.io.File
  • Required: No

httpPort:

The HTTP port GlassFish should listen on. Defaults to 8080.
  • Type: int
  • Required: No
  • Default: 8080

httpsPort:

The HTTPS port GlassFish should listen on. Defaults to 8443, 0 means "none".
  • Type: int
  • Required: No
  • Default: 8443

loggingProperties:

A file to configure java.util.logging, which is the logging system used by GlassFish.
  • Type: java.io.File
  • Required: No

testClassesDirectory:

The directory where classes test are compiled to.
  • Type: java.io.File
  • Required: Yes
  • User Property: project.build.testOutputDirectory

useTestClasspath:

If true, the <testClassesDirectory> will be put on the runtime classpath before <classesDirectory> and the dependencies of <scope>test<scope> will be put on the runtime classpath as well.
  • Type: boolean
  • Required: No
  • Default: false

webAppSourceDirectory:

The directory that contains the resources of the web application.
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.basedir}/src/main/webapp