Output generation with 2.x or 3.x
CCMS Output Generator 7.3 dynamically creates a build.bat file, which calls a build.properties file to get all the other properties needed for the job.
The build macro
The dita-startcmd-ot-build macro is what essentially starts the build process. The macro is defined in the commontargets-system.xml file. Since it defines the properties, you must include them in the build.bat file.
Property |
Function |
---|---|
|
Defines path to DITA file that runs the build |
|
Defines location and name of build.properties |
|
Defines the input ditamap |
|
Defines the transtype |
Property |
Function |
---|---|
|
Creates the build.properties file by gathering all previously-defined properties prefixed with "outgen.job.ot.properties" and adding them to the file |
|
Creates the build.bat file |
|
Determines OS type and launches a macro appropriate for either Windows (dita_startcmd_ot_build_windows) or Linux (dita_startcmd_ot_build_linux), and it creates either a build.bat or a build.sh file with the appropriate command line and then passes in the JAVA_HOME environment variable to identify the location of the Java installation that should be used
Note: Any resulting warnings or errors are
redirected to the build log. This process doesn't use the
standard
-l logging parameter. |
(Windows) The build.bat file
A typical build.bat file is a single command line that calls the DITA-OT and passes three required properties to it. This command line is the same for Windows and Linux.
"C:Ixiasoft\outgen\og6.1\data\dita-ot-3.4\bin\dita" -i="C:\Ixiasoft\¶
outgen\og6.1\temp\Dita2df.whitel.32.1582745087104\content\authoring\¶
ojr1576871077845.ditamap" -f="pdf" -propertyfile="C:\Ixiasoft\out¶
gen\og6.1\temp\Dita2df.whitel.32.1582745087104\build.properties" -v
The first part of the file calls the DITA file within the DITA-OT\bin folder. This runs the DITA-OT:
"C:Ixiasoft\outgen\og6.1\data\dita-ot-3.4\bin\dita"
The rest of the file provides the required parameters and specifies the input
ditamap
, transtype
, and
properties
file in the build.bat file's
command line.
- -i: specifies the full path to the input
ditamap
- -f: specifies a valid
transtype
defined within the DITA-OT - -propertyfile: specifies the full path to the build.properties file, which contains any additional properties for the build
- -v: specifies the resulting log as verbose Note: This is not a required parameter, but it ensures that the log you receive from the build contains all the information you need for troubleshooting.
The build.properties file
The build.properties file in build.bat command line is dynamically created when you generate output. This file includes all other properties needed for the job, including any properties you specify in the conductor target or on the Generate Output screen.
#Ant properties
#Wed Feb 26 14:24:55 EST 2020
args.draft=no
args.output=C:\:\\Ixiasoft\\outgen\\og6.1\\temp\\Dita2Pdf.whitel.32.1582745087107\\out
args.rellinks=none
clean.temp=yes
dita.dir=C:\:\\Ixiasoft\\outgen\\og6.1\\data\\dita-ot-3.4
dita.temp.dir=C:\:\\Ixiasoft\\outgen\\og6.1\\temp\\Dita2Pdf.whitel.32.1582745087107\\temp
pdf.formatter=fop
retain.topic.fo=no
The first two lines are comments that simply note the file’s purpose and date. The
remaining lines specify values for parameters such as args.draft
and args.output
. It also specifies the DITA-OT to use and the temp directory for the build.