I was forced to define my executable paths in a properties file and then
import them
using the property task. This is a bit of a maintainance nightmare
though since each user
has to alter these path properties for their machine.
e.g.
in localsettings.properties
latex.exe=c:\somedir\latex.exe
in build.xml
<target name="init" description="Initialisation - loading properties">
<tstamp/>
<property file="LocalSettings.properties" />
<property file="ProjectSettings.properties" />
</target>
<target name="test" depends="init">
<exec executable="${latex.exe}>
...
</exec>
</target>
However I did see this bug report
Bugzilla Bug 848
<exec>'s <env> does not set environment variables correctly.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=848
Which seems to be referencing the same problem. I am using ant 1.3 and
am still experiencing this.
I'll mail you if I find out any better answers
-----Original Message-----
From: Bernd Gruendling [mailto:[EMAIL PROTECTED]]
Sent: 10 July 2001 12:36
To: [EMAIL PROTECTED]
Subject: Re: Environment not being passed to Apply task command (I
think) - Win2k
Alex,
did you solve this problem? I get exactly the same error when trying
to run a batch file with <exec>. The batch file is fine, of course.
Bern.d
>
>
>and I get...
>
>D:\Project\ant\build.xml:458: Execute failed: java.io.IOException:
>CreateProcess: latex D:\Project\doc\design\SomeDoc.tex error=2
>--- Nested Exception ---
>java.io.IOException: CreateProcess: latex
>D:\Project\doc\design\SomeDoc.tex error=2
> at java.lang.Win32Process.create(Native Method)
> at java.lang.Win32Process.<init>(Win32Process.java:66)
...
_______________________________________________________________________
Bernd Gruendling Custom Software Development
Systemberatung Softwaredesign for Mac OS and Windows
Wendenstrasse 16 Phone: +49 5363 97676-0
38448 Wolfsburg, Germany Facsimile: +49 5363 97676-9