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.

Required Task Parameters

Attribute

Description

destinationFile

Specifies the path of the EAR file to be created

dynamoModules

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

dynamoRoot

Specifies the path to the ATG installation directory

Optional Task Parameters

Attribute

Description

addEarFile

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

collapseClasspath

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

The default is false.

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.

displayName

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

displayVariable

Specifies the X Window System variable declaring where any X display should be sent. For example, :0.0)

dynamoEnvPropsFile

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

layer

Enables one or more Named configuration layers for the application. This switch can take multiple arguments, each representing a named configuration layer. This option must immediately precede the –m switch.

liveConfig

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

The default is false.

overwrite

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

The default is false (do not overwrite.

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 can cause that file to be ignored. When naming files, it is best to use only alphanumeric characters and the underscore.

aserverName

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

standalone

If true, the EAR file is created in standalone mode, where 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, where Nucleus configuration and other runtime resources are used directly from the ATG installation.

The default is false (development mode).

Example

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

<taskdef name="assemble-jar"
         classname="atg.appassembly.ant.CreateUnpackedEarTask"
         classpath="C:/ATG/ATG9.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/ATG9.3 "
                 dynamoModules="DSSJ2EEDemo,DafEar.Admin"
                 destinationFile="QuincyFundsEar"
                 overwrite="true" />
</target>
 
loading table of contents...