ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <anto...@antbuild.com>
Subject Re: Can <exec>'s executable attribute handle relative path?
Date Wed, 30 Jul 2003 09:59:49 GMT

----- Original Message -----
From: "Daniel Joshua" <daniel.joshua@gridnode.com>
Sent: Wednesday, July 30, 2003 11:24 AM


> Can <exec>'s  executable attribute handle relative path?

It can handle relative paths, but relative to the working directory from
which ant is started.

The setExecutable function in ExecTask has a String argument, not a File :-(

To solve your problem, do the following :
<!-- with property location you can resolve a path with the usual ant
convention -->
<!-- that is to say relative to basedir -->
<property name="myexec" location="../myexec.exe"/>
<exec executable="${myexec}"/>

Cheers,

Antoine



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


Mime
View raw message