What I have determined, is that there is some setup required. I will do this within the calling script (.bat file) rather than making permanent environment variables.
The script will start out by setting DITA_HOME to the directory in which I installed DITA.
set DITA_OT=C:\jdn\DITA-OT1.4.2.1Then in that directory, I place a setuplocalenv.bat file that has some more variables
REM Get the absolute path of DITAOT's home directory
set DITA_DIR=%~dp0
REM Set environment variables
set ANT_OPTS=-Xmx512m %ANT_OPTS%
set ANT_HOME=%DITA_DIR%tools\ant
set PATH=%ANT_HOME%\bin;%PATH%
REM This last one is actually all one line.
set CLASSPATH=%DITA_DIR%lib;
%DITA_DIR%lib\dost.jar;
%DITA_DIR%lib\resolver.jar;
%DITA_DIR%lib\fop.jar;
%DITA_DIR%lib\avalon-framework-cvs-20020806.jar;
%DITA_DIR%lib\batik.jar;
%DITA_DIR%lib\xalan.jar;
%DITA_DIR%lib\xercesImpl.jar;
%DITA_DIR%lib\xml-apis.jar;
%DITA_DIR%lib\icu4j.jar;
%CLASSPATH%
This sets up all the environment variables that two weeks or so of constant error messages and documentation readin tells me I need. Not entirely sure what all of them do. I know xalan is Apache's XSLT processor, and xerxesImpl is the Xerxes implementation (XML parser). I also know that fop.jar is the Formatting Objects Processor for outputting PDF. batik is the SVG libraries. The file called dost.jar is the DITA Open Source Tools, but I havn't a clue what icu4j, resolver, or the avalon thing are. DITA-OT wants them, so I put them on the classpath and try not to worry about it.
Now I should be able to call ant with a build file and use a logger for recording errors.
set DITAMAP=myMapName.ditamap
ant -logger org.dita.dost.log.DITAOTBuildLogger
I'll post later about how this works. My fingers hurt.
Comments
Post a Comment