Author Login
Post Reply
Hi, David
Ironically, the one which ISN'T exported, DITA_HOME, IS used in the
Ant builds. But it's passed as parameter dita.dir. Obviously anything
on ANT_ARGS is passed, so ought not need exporting as well. I don't
think the others are, but I know the builds pick up the environment.
The DITA toolkit actually uses Ant to build documentation in various
formats: html, help formats and PDF. So there's no software compiling
at all. (This might also explain why I'm asking basic questions! ;-) )
Whilst pondering this, it begged the question about whether ANT_HOME
ought to be in .antrc or ant.conf, or not. If you've modified the
system path in some way, or used symlinks on *nix, so that Ant can be
called from anywhere, then it's probably a good idea to define
ANT_HOME in one or other of these files.
However, if you're running a batch script which sets the path at run
time, then that might set up ANT_HOME as part of the process of
setting up the Ant environment before calling Ant. In which case, it
would be superfluous!
Many thanks,
David
> On Tue, May 20, 2008 at 3:05 AM, David J. B. Hollis
> <dhollis@(protected):
>> I've ended up with this in an ant.conf file:
>>
>> #!/bin/sh
>>
>> DITA_HOME=~/DITA-OT1.4.2.1
>> DITA_HOME=`cd "$DITA_HOME" && pwd`
>>
>> #export ANT_HOME="$DITA_HOME"/tools/ant
>> export ANT_HOME=/Developer/Java/Ant
>> export ANT_OPTS="-Xmx512m"
>> export ANT_ARGS="-lib $DITA_HOME/lib -Ddita.dir=$DITA_HOME"
>>>
>> Are you saying I don't need to export any of these? I can just
>> define them?
>
> The ANT_HOME, DITA_HOME, ANT_OPTS, and ANT_ARGS will be available
> throughout the whole /usr/bin/ant shell script where they are used to
> start a Java process that executes Ant. If these variables are only
> used for starting up Ant, they do not need to be exported.
>
> However, once that Java process starts up, these environment variables
> won't be available. So, they will not be available in your Java
> process NOR (more importantly) in your build.xml file. That also means
> any environment variables that you're depending upon for your <java>
> or <javac> tasks will only be available if exported.
>
> --
> David Weintraub
> qazwart@(protected)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)