public final class AntDeploymentHelper extends Object
Constructor and Description |
---|
AntDeploymentHelper() |
Modifier and Type | Method and Description |
---|---|
static File |
getDeploymentPropertiesFile(String serverInstanceID)
Returns the server instance specific deployment properties file used by
the deployment build script generated by the
AntDeploymentHelper.writeDeploymentScript(File,Object,String) . |
static void |
writeDeploymentScript(File file,
Object moduleType,
String serverInstanceID)
Generates the Ant deployment build script for the given module type for
the specified server instance to the specified file.
|
public static void writeDeploymentScript(File file, Object moduleType, String serverInstanceID) throws IOException
The Ant deployment build script requires the following properties to be defined.
deploy.ant.properties.file
- Path to the server instance
specific deployment properties file, see AntDeploymentHelper.getDeploymentPropertiesFile(java.lang.String)
.
deploy.ant.archive
- The deployable archive.
deploy.ant.resource.dir
- The server resources directory.
deploy.ant.enabled
- The Ant deployment targets should be
executed only if this property has been set.
The Ant deployment build script is bound to provide the following targets.
-deploy-ant
- Deploys the deployable archive defined by the
deploy.ant.archive
property. If the deployable archive is a web
module or an enterprise application with a web module the
deploy.ant.client.url
property is set by this target.
-undeploy-ant
- Undeploys the deployable archive defined
by the deploy.ant.archive
property.
file
- the file to which the deployment build script will be generated.
If the file does not exist, it will be created.moduleType
- the module type the build script should handle. Use the
constants defined in the J2eeModule
.serverInstanceID
- the server instance for which the build script will
be generated.IOException
- if a problem during generating the build script occurs.public static File getDeploymentPropertiesFile(String serverInstanceID)
AntDeploymentHelper.writeDeploymentScript(File,Object,String)
.serverInstanceID
- specifies the server instance.NullPointerException
- if the specified serverInstanceID is null.