ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Return code from Ant
Date Tue, 28 Oct 2003 10:33:59 GMT
On 27 Oct 2003, Weiqi Gao <weiqigao@networkusa.net> wrote:

> However in my testing I discovered that Ant's return code is always
> 0

Not in my case:

[bodewig@bodewig tmp]$ cat foo.xml
<project default="del-no-perm">
  <target name="del-no-perm">
    <delete dir="/"/>
  </target>
</project>
[bodewig@bodewig tmp]$ ant -f foo.xml 
Buildfile: foo.xml

del-no-perm:
   [delete] Deleting directory /

BUILD FAILED
/tmp/foo.xml:3: Unable to delete directory /

Total time: 1 second
[bodewig@bodewig tmp]$ echo $?
1

This is Linux, /bin/sh is bash.

Are you using the ant script that comes with Ant (unmodified), which
version of Ant, which OS, which shell are you using?

Stefan

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


Mime
View raw message