ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "healey, alex" <alex.hea...@midas-kapiti.com>
Subject Environment not being passed to Apply task command (I think) - Wi n2k
Date Tue, 03 Jul 2001 09:41:28 GMT
Having some problems with Ant not passing environment to a command line
in Apply etc. I am running on Win2k and have latex working fine on my
command prompt so that I get expected operation when I run...

latex D:\Project\doc\design\SomeDoc.tex

Now I try to use apply like this...


<target name="texToDVI" depends="init">
        <property environment="env"/>
        <echo message="${env.Path}" />
        <apply executable="latex" dest=".">
            <fileset dir="." includes="**/*.tex"
excludes="**/*.docbook.tex"/>
            <mapper type="glob" from="*.tex" to="*.dvi"/>
            <env key="Path" value="${env.Path}"/>
        </apply>
    </target>


and I get...

D:\Project\ant\build.xml:458: Execute failed: java.io.IOException:
CreatePr
ocess: 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)
        at java.lang.Runtime.execInternal(Native Method)
        at java.lang.Runtime.exec(Runtime.java:551)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Exec
ute.java:509)
        at
org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:329)
        at
org.apache.tools.ant.taskdefs.ExecuteOn.runExec(ExecuteOn.java:167)
        at
org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:162)
        at org.apache.tools.ant.Target.execute(Target.java:153)
        at org.apache.tools.ant.Project.runTarget(Project.java:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
        at org.apache.tools.ant.Project.executeTargets(Project.java:510)
        at org.apache.tools.ant.Main.runBuild(Main.java:421)
        at org.apache.tools.ant.Main.main(Main.java:149)

Now if I instead replace latex with the full path to latex I am fine. If
I remove the env element I also get the same result.

Has anyone seen this problem??

Cheers

Alex

Mime
View raw message