ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: Exec problems
Date Tue, 10 Apr 2001 07:55:28 GMT
At 09:40  10/4/01 +0200, Magnus Rosenquist,,, wrote:
>Hi folks,
>I have some problems with the exec tag,
>I have successfully used it with native commands
>such as 'ls', 'mkdir' etc... But when it comes
>to me using a shell-script this fails.
>The tag looks like this:
><target name="ejb">
>    <exec executable="/usr/local/bin/" os="Linux">
>      <arg value="1"/>
>      <arg value="2"/>
>    </exec>
>When I run ant with ejb as the target I get the following
>Buildfile: build.xml
>      [exec] Result: 255
>Total time: 3 seconds
>The result is '255' and the script is never executed,
>the script just echoes the arguments to a file.

expected behaviour on 1.1/1.2 JVMs if your working directory is same as
basedirectory or on any 1.3 JVMs. Scripts

>Above the full path to the script is defined, I have
>also tried with adding the script to my PATH but with
>the same problem...The script is executable and runs
>perfectly from the prompt.
>Does anybody have any ideas what this might mean and
>a way around it?

<target name="ejb">
    <exec executable="/bin/sh" os="Linux">
      <arg value="/usr/local/bin/"/>
      <arg value="1"/>
      <arg value="2"/>


| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |

View raw message