The J2EE ANT build script format is of type J2EEBLD and language J2EEANT. It can be any name up to 8 characters and variables are defined in tagged language format. The build scripts are very similar for JAR, WAR and EAR. The syntax below is shown for a WAR build script. For JAR and EAR build scripts variables are the same, except use EAR_NAME and JAR_NAME instead of WAR_NAME.
<ANTXML>
<project name="J2EE Project type" default="web-war" basedir=".">
<property name="env" environment="env" value="env"/>
<property name="SCLM_ARCHDEF" value="ARCHDEF name"/>
<property name="SCLM_ANTXML" value="ANTXML name"/>
<property name="SCLM_BLDMAP" value="Include Buildmap"/>
<property name="JAVA_SOURCE" value="Include Java Source"/>
<property name="J2EE_HOME" value="${env.J2EE_HOME}"/>
<property name="JAVA_HOME" value="${env.JAVA_HOME}"/>
<property name="CLASSPATH_JARS" value="Classpath Directory location"/>
<property name="CLASSPATH_JARS_FILES" value="Jar/class filenames"/>
<property name="ENCODING" value="Codepage"/>
<!-- WAR file name to be created by this build process -->
<!-- include suffix of .war -->
<property name="WAR_NAME" value="War name" />
<path id="build.class.path">
<pathelement location="."/>
<pathelement location="${J2EE_HOME}/lib/j2ee.jar"/>
<pathelement location="${CLASSPATH_JARS}/jdom.jar"/>
<fileset dir="." includes="**/*.jar"/>
<fileset dir="${CLASSPATH_JARS}" includes="**/*.jar, **/*.zip"/>
</path>
</ANTXML>
The SCLM build scripts will overlay customer defined variables dynamically on build request when running the ANT build script. These variables are set to the following values:
| Variable | Value |
|---|---|
| J2EE Project name | Java/J2EE project type being built. This is a
temporary project name set in the build script for ANT to use during
the build. The values this will be set to are:
|
| ARCHDEF name | ARCHDEF name or the ARCHDEF being built |
| ANTXML name | Name of skeleton Ant XML to use for build |
| Include Buildmap | Value of Yes or No. If Yes then include SCLM Build map in MANIFEST directory in JAR, WAR, or EAR. Provides audit and build map of parts included. |
| Include Java™ Source | Value of Yes or No. If Yes then include Java source in JAR, WAR, or EAR. |
| Classpath Directory location | z/OS® UNIX System services classpath directory used for resolving classpath dependencies during build. All jars located in this directory will be used in the classpath. |
| Jar/class filenames | Names of individual JAR and Class files to be
included in the build. This can be in the form of a list thus:
|
| Codepage | Either ASCII or EBCDIC codepage for JAVA. This
is the codepage JAVA source is stored on the z/OS host. For example:
|
| Ear_name/ War_name/ Jar_name | Name of the created EAR, WAR or JAR |
Normally, Java source within an ARCHDEF may have classpath dependencies upon other Java libraries or classes. If these dependencies are on Java components contained within the same ARCHDEF structure, then these classpath dependencies will be resolved as part of the ARCHDEF build (whether build mode is conditional or forced).