You can use the following Maven goals to test your applications with embedded Enterprise Server:
This goal starts the server and deploys an application. You can redeploy if you change the application. The application can be a packaged archive or a directory that contains an exploded application. You can set the parameters described in the following table.
Table 3 embedded-glassfish:run Parameters
Parameter |
Default |
Description |
---|---|---|
maven |
(optional) The ID of the server to start. |
|
all |
(optional) The container to start: web, ejb, jpa, or all. |
|
In order of precedence:
|
(optional) The Installation Root Directory. |
|
as-installdomains/domain1 |
(optional) The Instance Root Directory |
|
instance-dirconfig/domain.xml |
(optional) The configuration file. |
|
None. Must be set explicitly or defined in the configuration file. |
(optional) The HTTP port. |
|
None. |
The archive file or directory for the application to be deployed. |
|
In order of precedence:
For more information, see Naming Standards in Sun GlassFish Enterprise Server v3 Application Deployment Guide. |
(optional) The name of the application. |
|
The name of the application. |
(optional) The context root of the application. |
|
false |
(optional) If true, JSP pages are precompiled during deployment. |
|
Value of the create-tables-at-deploy attribute in sun-ejb-jar.xml. |
(optional) If true, creates database tables during deployment for beans that are automatically mapped by the EJBTM container. |
|
false |
(optional) If true, deletes the contents of the Instance Root Directory when the server is stopped. Caution – Do not set autoDelete to true if you are using installRoot to refer to a preexisting Enterprise Server installation. |
This goal starts the server. You can set the parameters described in the following table.
Table 4 embedded-glassfish:start Parameters
Parameter |
Default |
Description |
---|---|---|
maven |
(optional) The ID of the server to start. |
|
all |
(optional) The container to start: web, ejb, jpa, or all. |
|
In order of precedence:
|
(optional) The Installation Root Directory. |
|
as-installdomains/domain1 |
(optional) The Instance Root Directory |
|
instance-dirconfig/domain.xml |
(optional) The configuration file. |
|
None. Must be set explicitly or defined in the configuration file. |
(optional) The HTTP port. |
|
false |
(optional) If true, deletes the contents of the Instance Root Directory when the server is stopped. Caution – Do not set autoDelete to true if you are using installRoot to refer to a preexisting Enterprise Server installation. |
This goal deploys an application. You can redeploy if you change the application. The application can be a packaged archive or a directory that contains an exploded application. You can set the parameters described in the following table.
Table 5 embedded-glassfish:deploy Parameters
Parameter |
Default |
Description |
---|---|---|
None. |
The archive file or directory for the application to be deployed. |
|
In order of precedence:
For more information, see Naming Standards in Sun GlassFish Enterprise Server v3 Application Deployment Guide. |
(optional) The name of the application. |
|
The name of the application. |
(optional) The context root of the application. |
|
false |
(optional) If true, JSP pages are precompiled during deployment. |
|
Value of the create-tables-at-deploy attribute in sun-ejb-jar.xml. |
(optional) If true, creates database tables during deployment for beans that are automatically mapped by the EJB container. |
This goal undeploys an application. You can set the parameters described in the following table.
Table 6 embedded-glassfish:undeploy Parameters
This goal stops the server. You can set the parameters described in the following table.
Table 7 embedded-glassfish:stop Parameters
Parameter |
Default |
Description |
---|---|---|
maven |
(optional) The ID of the server to stop. |