ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Dittberner <>
Subject Re: exec task with *
Date Thu, 11 Sep 2008 21:30:05 GMT
hi you are who you are,

I guess this problem occurs because YOU (your script) ignores the 
errorcode of the cd-command.

Try something like that:

<shellscript shell="bash" dir="/home/${usr}/doc" failonerror="true">
cd /home/${usr}/doc && zip -ll doc.jar *.properties

I am Who i am schrieb:
> Hi All
> I'm trying to zip one folder, with some specific files from it as part of
> build like
>   <exec dir="/home/${usr}/doc" executable="zip" failonerror="true">
>       <arg line="-ll doc.jar *.properties">
>   </arg>
> but this throws error zip warning: name not matched: *.properties
> so i tried to use <shellscript> task from ant-contrib
> <shellscript shell="bash" dir="/home/${usr}/doc">
> cd /home/${usr}/doc
> zip -ll doc.jar *.properties
> </shellscript>
> This works, but i have problem with this, when there is some valid error
> lets say ${usr} directory doesn't exist, this task is no failing. Means
> build is not failing at that position, it just keeps continue to next target
> on the build.xml
> Any one has any idea on how to make sure to have failonerror=true for this??

Mit freundlichen Grüßen

Christoph Dittberner
Dipl. Inf.

digitec GmbH
Amsinckstraße 57
20097 Hamburg

Tel. +49 40 23776-156
Fax  +49 40 23776-200
digitec GmbH EDV-Beratung, Soft- und Hardware
Sitz Hamburg - HRB 28818, Amtsgericht Hamburg - Steuer-Nr. 2279101874
Geschäftsführer Klaus Bredow, Hans-Joachim Hänel, Hans-Jürgen Joost

Die Kommunikation mit digitec GmbH per Email dient nur dem Zweck der
schnellen Information. Rechtsverbindliche Absprachen kommen über dieses 
Medium nicht zustande !

Communication with digitec GmbH via email is for quick information 
purposes only. This medium is not to be used for the  exchange of 
legally binding statements !

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message