Class: atg.appassembly.ant.CreateUnpackedEarTask

Description

This Ant task invokes the application assembler, which combines ATG platform libraries, Nucleus component configuration, J2EE applications, and J2EE application components to create a single J2EE application, in the form of an unpacked (open-directory) EAR file.

Task Parameters

Attribute

Description

Required?

dynamoRoot

Specifies the path to the ATG installation directory

Yes

dynamoModules

Specifies the Dynamo modules to include in the EAR file, as a comma-delimited string

Yes

destinationFile

Specifies the path of the EAR file to be created

Yes

standalone

If true, the EAR file is created in standalone mode, in which all necessary resources are imported into the resulting EAR file, and the EAR file does not reference the ATG installation directory. If false, a development-mode EAR file is created, in which Nucleus configuration and other runtime resources are used directly from the ATG installation.

No; default is false (development mode)

overwrite

If true, overwrites an existing EAR file; if false, stops processing if the EAR file already exists.

No; default is false (do not overwrite)

addEarFile

Specifies an existing EAR file whose contents will be added to the assembled EAR file.

No

serverName

If set, specifies the Dynamo server (for localconfig, etc.) to be used by the assembled EAR file. If unset, the default server is used.

No

contextRootsFile

Specifies a Java properties file to be used to override the context-root values for any web applications included in the assembled EAR file. In this properties file, each line has the format:

module-uri=context-root

This assigns the specified context root to the web application indicated by the module URI.

No

dynamoEnvPropsFile

Specifies a file that supplies Dynamo environment properties to be added to dynamo.env in the assembled EAR file.

No

liveConfig

If true, liveconfig mode is enabled in the assembled EAR file.

No; default is false

collapseClasspath

If true, the JAR files and directories in the CLASSPATH are collapsed into a single JAR file in the assembled EAR file.

No; default is false

displayVariable

Specifies the X Window System variable declaring where any X display should be sent. (e.g., :0.0)

No

displayName

Specifies the value to be used for the <display-name> tag in the application.xml file in the assembled EAR file.

No

prependJars

Includes the comma separated list of jar files on the classpath. This attribute is useful for applying hotfixes. For example:

runAssembler –prependJars hotfix1.jar,hotfix2.jar myEarFile.ear –m DCS

Note: Special characters appearing in jar file names may cause that file to be ignored. When naming files, it is best to use only alphanumeric characters and the underscore.

No

Example

To use CreateUnpackedEarTask in an Ant buildfile, you must first declare it, using the taskdef element:

<taskdef name="assemble-jar"
         classname="atg.appassembly.ant.CreateUnpackedEarTask"
         classpath="C:/ATG2007.3/home/lib/assembler.jar">

You can then create a target that assembles an ATG application EAR file:

<target name="create-quincy-ear">
   <-- It's a good idea to delete any old directories
       before assembling... -->
   <delete dir="QuincyFundsEar"/>

   <assemble-jar dynamoRoot="c:/ATG/ATG2007.3 "
                 dynamoModules="DSSJ2EEDemo,DafEar.Admin"
                 destinationFile="QuincyFundsEar"
                 overwrite="true" />
</target>
 
loading table of contents...