ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject RE: Execute failed: java.io.IOException: CreateProcess: - I have tried about everything
Date Fri, 10 Sep 2004 15:19:11 GMT
Steve:  the <env> didn't work because of the way
processes are invoked.  The nested environment
variables are, by default, added to the process
environment, but the call itself (apparently) does not
use the PATH specified in the environment when
resolving the executable; it uses the original system
path instead.  A change has just been committed to the
CVS HEAD version that should allow you to specify
resolveexecutable="true" searchpath="true" to search
your nested <env> variables as well as your system
path, and in that order.  Note that you will still
have to add the extension as Ant will be looking for
an exact filename.

HTH,
Matt

--- Steve Pruitt <SPruitt@exstream.com> wrote:

> That worked fine after determining I needed to add
> .exe to the end.  Thanks.  I would like to know why
> the <env> didn't work, but thats for another day.
> 
> -S
> 
> 
> Why not just do this:
> <exec executable="${bin}/mxmlc">
>       <arg line="-configuration ${configFile}
> ${client}/my.mxml"/>
> </exec>
> 
> -----Original Message-----
> From: Steve Pruitt [mailto:SPruitt@exstream.com] 
> 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:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 



		
_______________________________
Do you Yahoo!?
Shop for Back-to-School deals on Yahoo! Shopping.
http://shopping.yahoo.com/backtoschool

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message