If this a one time hit then
<exec ...
<env key="PATH" path="${path}:${basedir}/bin"/>
</exec>
If this executable is used more than once then I would do the append to PATH
at the top of the build so all targets have knowledge of it..
HTH,
Martin

----- Original Message -----
From: "Vadim Kazakov" <[EMAIL PROTECTED]>
To: "Ant Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, September 08, 2004 10:55 AM
Subject: RE: Execute failed: java.io.IOException: CreateProcess: - I have
tried about everything


Why not just do this:
<exec executable="${bin}/mxmlc">
      <arg line="-configuration ${configFile} ${client}/my.mxml"/>
</exec>

-----Original Message-----
From: Steve Pruitt [mailto:[EMAIL PROTECTED]
Sent: September 8, 2004 8:15 AM
To: Ant Users List
Subject: Execute failed: java.io.IOException: CreateProcess: - I have
tried about everything

I cannot get an exec to work.  I get an error that seems to be caused by
not ant not knowing where to find the executable.  If I explicitly set
Path with the executable dir it works fine.  As soon as I remove it from
Path and try setting it through ant.  It fails.  My project looks
like...

<project name="Project build" default="war_build" basedir=".">
:
:
<property environment="env"/>
:
<property name="build" location="${basedir}/build"/>
<property name="bin" location="${build}/bin"/>
:
:
<target name="compile">
   <exec executable="mxmlc">
      <env key="Path" path="${env.Path};${bin}"/>
      <arg line="-configuration ${configFile} ${client}/my.mxml"/>
   </exec>
</target>

If I echo the value of bin it is set correctly.  Also if I dump the env
variables in the cmd window after running ant, Path does not have the
bin directory.


-SP

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to