Assembling Applications

runAssembler earfilename –m module-list

Example : runAssembler MyApp.ear –m MyApp DSS

When runAssembler creates an EAR file, it copies

  • CLASSPATH entries, 
  • configuration path entries, and 
  • J2EE modules. 
  • To include other module files, specify them via the ATG-Assembler-Import-File attribute in the module’s META-INF/MANIFEST.MF file.

ATG-Required: DSS DAS-UI
ATG-Config-Path: config/dafconfig.jar
ATG-Web-Module: j2ee-components/atg-bootstrap.war
ATG-EJB-Module: j2ee-components/atg-bootstrap-ejb.jar
ATG-Class-Path: ../Tomcat/lib/classes.jar ../WebLogic/lib/classes.jar  lib/classes.jar
ATG-Assembler-Import-File: True

In addition, to include a standalone WAR file in an application you must provide runAssembler with the WAR file’s URL and context root. If not provided, runAssembler creates a unique name based on the directory where it found the WAR file. To provide the URL and context root, within your WAR file, create a META-INF/MANIFEST.MF file as follows:

Manifest-Version: 1.0
ATG-Enterprise-Nucleus: True
ATG-Module-Uri: atg_bootstrap.war
ATG-Context-Root: /dyn
ATG-Assembler-Priority: -1

Specifying a Server for a Standalone EAR File

To build a standalone-mode EAR file that uses a non-default server, you can run the application assembler with the –standalone and –server flags. For example:

runAssembler –standalone –server myServer MyApp.ear –m MyApp DSS

Note: If production environment is clustered, do not specify the Oracle ATG Web Commerce server when you build the EAR.

There are four localconfig directories at the end of the application’s configuration path.

  • atg_bootstrap.war/WEB-INF/ATG-INF/localconfig (copy of <ATG10dir>/home/localconfig)
  • ATG-Data/localconfig
  • atg_bootstrap.war/WEB-INF/ATG-INF/home/servers/servername/localconfig (copy of <ATG10dir>/servers/servername/localconfig)
  • ATG-Data/servers/servername/localconfig

Invoking the Application Assembler Through an Ant Task

The Oracle ATG Web Commerce platform includes two Ant tasks to simplify invoking the application assembler from within Ant build files:

  • CreateUnpackedEarTask builds an unpacked (exploded) EAR file
  • PackEarFileTask takes an unpacked EAR file and packages it in a packed (unexploded) EAR file

The classes for these Ant tasks are located at <ATG10dir>/home/lib/assembler.jar. This library contains all the supporting classes necessary to run the tasks.


This Ant task invokes the application assembler, which combines 

  • Oracle ATG Web Commerce 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

  • destinationFile : Specifies the path of the EAR file to be created.
  • dynamoModules : Specifies the Oracle ATG Web Commerce modules to include in the EAR file, as a comma-delimited string.
  • dynamoRoot : Specifies the path to the Oracle ATG Web Commerce installation directory.


Declare CreateUnpackedEarTask in an Ant build file using taskdef element:

<taskdef name="assemble-jar"

Then create a target that assembles EAR file:

<target name="create-quincy-ear">
   <-- delete any old directories before assembling... -->
   <delete dir="QuincyFundsEar"/>

   <assemble-jar dynamoRoot="c:/ATG/ATG10.2"
                 overwrite="true" />


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

  • sourceFile : Specifies the staging directory containing the unpacked application.
  • destinationFile : Specifies the filename for the packed EAR file.

Declare PackEarFileTask in an Ant build file using the taskdef element:

<taskdef name="pack-ear"

PackEarFileTask to pack the application in an EAR file:

<target name="create-quincy-ear">
   <-- delete any old directories before assembling... -->
   <delete dir="QuincyFundsEar"/>

   <assemble-jar dynamoRoot="C:/ATG/ATG10.2"
                 overwrite="true" />

   <pack-ear sourceFile = "QuincyFundsEar"
             destinationFile = "Quincy.ear" />

   <-- Delete the open directory, and keep the packed EAR file. -->
   <delete dir="QuincyFundsEar"/>


No comments :