Skip to main content

Save the Environment

The DITA Open Toolkit (DITA-OT) uses Apache Ant to do its build processing. I have now realized what a confusing warren of build files there is for building the samples. I'm sure someone really cool and hip on Ant could look at it and grok it, but I have never been accused of coolnes or hipness. (No, don't gasp, it's true!)

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.1

Then 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

Popular posts from this blog

KISS me, I'm dorky!

Ok, I give up. I've been trying to make the DITA-OT do what I want it to do. It's a really powerful and flexible tool, and I know that somebody really smart could make it do just about anything. Problem is, I'm just not that damn smart, apparently. When it comes down to it, all I really want is Ant, since I'm writing my own stylesheets and only have one output format. Also, I am not likely to need DITA's transclusion mechanisms. So forget the DITA-OT, I'll just use Ant.

Productivity Pr0n and Self-Revealing Ick

I was looking over some various productivity Pr0n when I came across a nice bit of advice for maintaining focus and productivity: Care . It seems so simple, but for someone who has been going through mild clinical depression, it's really difficult. Oh, yeah, I skipped that part. I've been going through mild clinical depression. No bad thoughts about hurting me or others, no medicine; Just a lot of apathy towards mostly everything. It runs in the family. Thanks, parents. ;P Caught up? Good. Lets continue. So there are some things I do care about. Intensely, as a matter of fact: My family My friends The socio-economic plight of the indigenous tribes of Madagascar. Granted, two of those are pretty far ahead of the third. So, I am trying to figure out what I want to do next, since I'm more or less in a forced reset mode. Self re-invention is an awkward and somewhat overly revealing process. Ever take a long, honest look at yourself without the sugar-coated happy ...

Furry Feet, Cotton Mouth, and a Big Dorky Smile

Through most of my life, I've had some serious misconceptions about depression. I have long believed that depressed people were just irritating weak-willed whiners who needed a kick in the ass and to shake it off. So naturally, I got a nice dose of the irony of life and wound up with depression myself. The more I read about depression, the more I realize how long I've had it without knowing. Actually, a big sign of depression isn't necessarily crying/sadness or a tendency to listen to emo rock at all. It can often be severe detachment and apathy. I know there's probably a lot of people out there saying "Duh!" right now, but that was news to me. Actually, three of the big symptoms are: - Apathy/Detachment - Lack of Motivation/Drive - Forgetfulness All of these, I've had in spades for some time. A lot of the reading says if these last for more than two weeks at a pop, you could be considered clinically depressed. Now that it's been poi...