Common Macros
This section covers the Enterprise Extensions SMP/E Common Macros which extend the EWM Ant toolkit by offering a build various features that satisfy common processing requirements.
The Common Macros are generalized utilities used by all of the Enterprise Extensions SMP/E Ant Scripts. The repository for the Common Macros is the $common.xml file, which is imported in the top-level section of an Ant script using the following code snippet:
<!-- Load build extensions -->
<xt:loadBuildExtensions/>
<xt:getJarLocation property="jarPath"/>
<!-- Load common resources -->
<import>
<javaresource name="scripts/smpe/imports/$common.xml">
<classpath location="${jarPath}"/>
</javaresource>
</import>
-
AntExit
The AntExit macro is used to exit an Ant script cleanly, without the need of generating a build exception.
-
AntRestart
The AntRestart macro is used to determine the restart point in a series of build scripts and the projects they represent.
-
AntRestartClear
The AntRestartClear macro is used to delete the restart directory, and the restart data it contains, after a successful build.
-
BuildActivity
The BuildActivity macro is used to log the start of a build activity.
-
BuildActivityChild
The BuildActivityChild macro is used to log the start of a build activity step.
-
BuildActivityStart
The BuildActivityStart macro is used to signal the start of a build activity in the build results.
-
BuildActivityStartChild
The BuildActivityStartChild macro is used to signal the start of a child build activity in the build results.
-
BuildActivityStartParent
The BuildActivityStartParent macro is used to signal the start of a parent build activity in the build results.
-
BuildValueBlank
The BuildValueBlank macro is used to validate a blank value.
-
BuildValueNonBlank
The BuildValueNonBlank macro is used to validate a non-blank value.
-
FetchWorkspace
The FetchWorkspace macro is used to fetch the contents of the named repository workspace into a local destination directory.
-
FetchWorkspaceById
The FetchWorkspaceById macro is used to fetch the contents of a repository workspace into a local destination directory using the UUID of the workspace rather than its name.
-
FileGet
The FileGet macro is used to fetch a previously published file from a build result.
-
FileGetById
The FileGetById macro is used to fetch a previously published file from the last non-personal completed build for the specified build definition ID.
-
FilePut
The FilePut macro is used to store a file in a build result.
-
FileWait
The FileWait macro waits for a file to become available.
-
GetChangeLog
The GetChangeLog macro compares two snapshots to generate a list of change sets, added components, and removed components.
-
GetChangeLogLastBuild
The GetChangeLogLastBuild macro compares the current build result to the last build result to generate a list of change sets, added components, and removed components.
-
GetChangeLogLastSnapshotName
The GetChangeLogLastSnapshotName macro compares the current build result to a snapshot identified by name to generate a list of change sets, added components, and removed components.
-
GetChangeLogLastSnapshotUUID
The GetChangeLogLastSnapshotUUID macro compares the current build result to a snapshot identified by UUID to generate a list of change sets, added components, and removed components.
-
GetResponse
The GetResponse macro returns the input command response in a parseable format by removing all line breaks.
-
GetResponseProperty
The GetResponseProperty macro returns the input command response in a parseable format by removing all line breaks, as well as, the first matched group as defined by the specified regex pattern.
-
LogSend
The LogSend macro is used to add a log to the build result.
-
LogSendIfAvailable
The LogSendIfAvailable macro is used to add a log to the build result if the log file is available. If the file is not available, no error is generated and the build continues.
-
LogWait
The LogWait macro waits for a log to become available.
-
LogWaitSend
The LogWaitSend macro is used to add a log to the build result. The macro first waits for the log to become available. If the wait time out before the log becomes available, the build will fail.
-
OslcLogin
The OslcLogin macro establishes an OSLC login session with the EWM server.
-
RequestTeamBuild
The RequestTeamBuild macro is used to request a build.
-
SetBuildNonDeletable
The SetBuildNonDeletable macro is used to set a build result non-deletable.
-
SetWorkItems
The SetWorkItems macro is used to publish work item information to a build result.
-
TsoGateway
The TsoGateway macro is used to invoke the TSO Gateway to execute a TSO command, ISPF command, REXX exec or CLIST as part of a build script.
-
UnixCommand
The UnixCommand macro is used to execute a Unix command as part of a build script.
-
UnixConvert
The UnixConvert macro is used to convert a z/OS® USS file from one encoding to another.
-
UnixGetFile
The UnixGetFile macro is used to copy a file from a z/OS® data set to the USS.
-
UnixShellCommand
The UnixShellCommand macro is used to execute a Unix shell command, via /bin/sh, as part of a build script.
-
UnixShellScript
The UnixShellScript macro is used to execute the provided shell script.
-
UnixSubmit
The UnixSubmit macro is used to submit a batch job.
-
ValidateIsTrue
The ValidateIsTrue macro is used to validate that a property value is "true".
-
ValidateNonBlank
The ValidateNonBlank macro is used to validate that a property value is non-blank.
-
ValidateNonEmpty
The ValidateNonEmpty macro is used to validate that a property value is non-empty.
-
ValidateNonPersonal
The ValidateNonPersonal macro is used to validate that the current build is not a personal build.
-
ValidateNonSimulation
The ValidateNonSimulation macro is used to validate that the current build is not a simulation build.