Class: atg.appassembly.ant.PackEarFileTask
Description
This Ant task takes an EAR file in exploded (open-directory) format, and packs it into the archive-file format specified by the J2EE standard.
Required Task Parameters
Attribute | Description |
---|---|
| Specifies the staging directory containing the unpacked application. |
| Specifies the filename for the packed EAR file. |
Example
To use PackEarFileTask
in an Ant build file, you must first declare it, using the taskdef
element:
<taskdef name="pack-ear"
classname="atg.appassembly.ant.PackEarFileTask"
classpath="C:/ATG/ATG11.3/home/lib/assembler.jar">
This example is a target that uses CreateUnpackedEarTask
to create the application in unpacked format, and then uses the PackEarFileTask
to pack the application in an EAR file:
<target name="create-myearhere-ear"> <-- It's a good idea to delete any old directories before assembling... --> <delete dir="<MyOldEar"/> <assemble-jar dynamoRoot="C:/ATG/ATG11.3" dynamoModules="DSSJ2EEDemo,DafEar.Admin" destinationFile="MyNewEar" overwrite="true" /> <pack-ear sourceFile = "MyNewEar" destinationFile = "MyEar.ear" /> <-- Delete the open directory, and keep the packed EAR file. --> <delete dir="MyNewEar"/> </target>