Ant targets

IXIASOFT provides Ant targets that you can use in the Output Generator Ant scripts.

The IXIASOFT CCMS targets are stored in the following files:
  • %OutputGenDir%/data/commontargets.xml: Contains general targets that you can use in a conductor file; this file loads the other two target files (commontargets-system.xml and commontargets-macro.xml).
  • %OutputGenDir%/data/commontargets-system.xml: Contains targets used to create and update the build.xml file for the DITA-OT and to call the OT Ant code.
  • %OutputGenDir%/data/commontargets-macro.xml: Contains internal Output Generator utilities written as Ant macrodefs. They can be called as tasks in a conductor file.
The following table lists the functional targets in alphabetical order as well as the target files that contain the source code for these targets.
Note: The internal Output Generator macrodefs defined in the commontargets-macro.xml file are not documented below. However, you can use them in your scenarios.
Table 1. CCMS functional Ant targets
Target Description
branding

Template target for using the branding task. See branding for more information.

Containing file: commontargets.xml.

clean

Deprecated. Use job_postprocess instead.

Containing file: commontargets.xml.

clean_ot_output Removes the following DITA-OT files from the output directory:
  • Configuration/*
  • Customization/*
  • dita.list
  • dita.xml.properties

This target is typically used after generating the output.

Containing file: commontargets.xml.
dita_startcmd_define _classpath and dita_startcmd_define _classpath_2x Builds the same classpath as the one in startcmd.bat or startcmd.sh. This classpath is required by the dita_startcms_ot_build target. The target called depends on the DITA-OT family property (outgen.ot.release.family):
  • 1.x family: dita_startcmd_define_classpath
  • 2.x family: dita_startcmd_define_classpath_2x

This target is called by the dita_startcmd_ot_build_windows and dita_startcmd_ot_build_linux targets.

Containing file: commontargets-system.xml.
dita_startcmd_ot _build

(calls dita_startcmd_ot _build_windows, dita_startcmd_ot _build_windows_2x, dita_startcmd_ot _build_linux, and dita_startcmd_ot _build_linux_2x)

Sets the environment and calls the DITA-OT ( through ant -f build.xml). The call to the DITA-OT is platform-specific (Windows or Linux) and it is delegated to the following targets, depending on the DITA-OT family property (outgen.ot.release.family):
  • DITA-OT 1.x family:
    • dita_startcmd_ot_build_windows
    • dita_startcmd_ot_build_linux
    DITA-OT 2.x family:
    • dita_startcmd_ot_build_windows_2x
    • dita_startcmd_ot_build_linux_2x
The dita_startcmd_ot_build target can take the following optional properties set at the job level:
  • job.build.filename: Path and file name of the build.xml file for the DITA-OT transformation
  • job.build.otlog.filename: Path and name of the DITA OT .build.html log file that is returned in the %OutputGenDir%/temp directory after the execution of the transformation scenario.
If these properties are not set in the target that calls dita_startcmd_ot_build, the default values are used.

Containing file: commontargets-system.xml.

echo_all_properties Saves all defined Java properties to the following file:
${outgen.job.dir}/ant-all[<time>].properties
For example:
C:\ixiasoft\OutputGenerators\Prod_[version]\temp\
Dita2Pdf.mtest.61.1418314407949\
ant-all[11h29m31.124s].properties

Where [version] is replaced by the current release version number.

Containing file: commontargets-system.xml.

echo_outgen _properties Saves to a file the Java properties that correspond to the following pattern:
  • hostname
  • outgen.*
  • env.*
The properties are saved to the following file:
${outgen.job.dir}/<outputfile>.ant-outgen[<time>].properties
For example:
C:\ixiasoft\OutputGenerators\Prod_[version]\temp\
Dita2Pdf.mtest.61.1418314407949\
mte1417101526619.ant-outgen[11h13m28.369s].properties

Where [version] is replaced by the release version number.

Containing file: commontargets-system.xml.

extract_HiRes_images and extract_LowRes_images Extracts the image in HiRes or LowRes format, if available, instead of the default format. This target is used when calling a DITA Open Toolkit transformation scenario to make sure that the DITA-OT can read the image files.
Note: This target could also be used as a template to handle customer-specific images.
Containing file: commontargets.xml.
flatten Copies all the working and published files to the job directory to enable outputs of branched documents.

For a source map that contains information from a branch (i.e., a map that contains topics in the Authoring and Published cycles), copies the content from the /content/published collection to the /content/authoring collection and changes any reference using the published collection.

Note: Applies to branching only.
Containing file: commontargets.xml.
gethostname Returns the machine name (or fully qualified domain name) of the machine that hosts the Output Generator. Containing file: commontargets.xml.
getobjecttype

Returns the type (map or topic) of the source object. This target is used by the Dita2ReviewPdf transformation scenario to determine the transtype.

Containing file: commontargets.xml.
Ixiasoft.SendEmail Sends a notification email when a Build Manifest is completed. See Configure the notify field and message for the Build Manifest.

Containing file: commontargets.xml.

Ixiasoft. SendEmailWithAuthentication Sends a notification email (using authentication) when a Build Manifest is completed. See Configure the notify field and message for the Build Manifest.

Containing file: commontargets.xml.

job_postprocess

Deletes the temporary working directory created in %OutputGenDir%/temp/ to store the temporary files during the build (for example, %OutputGenDir%/temp/Dita2Pdf.mtest.21.1418740847759). This task occurs after the transformation process.

The job_postprocess target is called by the Output Generator after the transformation process is completed and the zip file is returned to the user. This target is defined in the clean parameter of the preprocessor.

To disable the job_postprocess target for a specific job, you can set the following property for the job:
  • outgen.job.keep.temp="yes"
Containing file: commontargets.xml.
load_properties Loads the user parameters defined in the preprocessor into Ant properties so that they can be used in Ant scripts. The users parameters are stored in the outgen.job.userparam.* properties.

This target is called with the default_dependencies target.

Containing file: commontargets.xml.
ot_build_add_ditaval _ifpresent If the user specified a ditaval file when generating the output, sets the DITA-OT args.filter parameter to the value of the ditaval file in the build.xml file. If no ditaval file is specified, the parameter is not added to the build.xml file.
The ot_build_add_ditaval_ifpresent target can take the following optional property set at the job level:
  • job.build.filename: Path and file name of the build.xml file for the DITA-OT transformation
Containing file: commontargets-system.xml.
ot_build_add _htmlcompiler Adds the HTML compiler configuration (hhc.dir Ant parameter) to the build.xml file.
The ot_build_add_htmlcompiler target can take the following optional property set at the job level:
  • job.build.filename: Path and file name of the build.xml file for the DITA-OT transformation
Containing file: commontargets-system.xml.
ot_build_add _pdfrenderer Adds the PDF renderer configuration to the build.xml file. In particular, it sets the following Ant parameters:
  • pdf.formatter
  • Directory where the PDF renderer is stored
  • Location of the PDF renderer settings file
You must have configured the PDF renderer as described in Use another PDF rendering engine before you can call this target.
The ot_build_add_pdfrenderer target can take the following optional property set at the job level:
  • job.build.filename: Path and file name of the build.xml file for the DITA-OT transformation
Containing file: commontargets-system.xml.
ot_build_clean _ot_temp Sets the DITA-OT clean.temp parameter in the build.xml file to the value of the outgen.job.clean.ot.temp property.
The ot_build_clean_ot_temp target can take the following optional property set at the job level:
  • job.build.filename: Path and file name of the build.xml file for the DITA-OT transformation
Containing file: commontargets-system.xml.
ot_build_create Creates the DITA-OT build.xml file based on a template file.
The dita_startcmd_ot_build target can take the following optional properties set at the job level:
  • job.build.filename: Path and file name of the build.xml file for the DITA-OT transformation
  • job.build.template.filename: Path and name of the template file to use to create the build.xml file
If these properties are not set in the target that calls ot_build_create, the default values are used.
Containing file: commontargets-system.xml.
ot_build_keep _topicfo

Sets the retain.topic.fo parameter in the build.xml file to the value of the outgen.job.keep.topicfo property. See Keep the topic.fo file for more information.

The ot_build_keep_topicfo target can take the following optional property set at the job level:
  • job.build.filename: Path and file name of the build.xml file for the DITA-OT transformation

Containing file: commontargets-system.xml.

resolve_container _keyref Removes the container information from all the maps in the source directory. Each keydef defined by the container is replaced by an href to the file.
Note: Applies to the DRM module.
Containing file: commontargets.xml.