ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Vervelle <nicolas.verve...@steria.com>
Subject Re: <apply> and failifexecutionfails
Date Mon, 19 Sep 2005 19:28:41 GMT
Hi again,

I found how to overcome this problem : I first try to run xgettext2 
with <exec> task and with only one arg (--help) abd with attributes 
failifexecutionfails="false" resultproperty="xxx" just to check for 
xgettext2 existence.

Then I can use <apply> if xgettext2 exists.

To me, it really seems to be a bug in failifexecutionfails="false" for 
the <apply> task. It doesn't work, at least not in the same way of the 
<exec> task.

Nicolas


De: Nicolas Vervelle <nicolas.vervelle@steria.com>

> Hi,
> 
> I want to run an executable during the build only if the 
> executable is 
> available.
> How can I prevent the build from failing if the executable is not 
> here ?
> 
> I tried the failifexecutionfails attribute :
>    <apply executable="xgettext2" dir="${src.dir}" parallel="true"
>           verbose="true" relative="true" forwardslash="true"
>           failifexecutionfails="false">
>      <arg value="-kGT._" />
>      <arg value="--language=Java" />
>      <arg value="--msgid-bugs-address=jmol-
> developers@lists.sourceforge.net"/>
>      <arg value="--output-dir=${basedir}/${Jmol.po.dir}/tmp" />
>      <arg value="--output=Jmol.pot" />
>      <fileset dir="${src.dir}">
>        <include name="**/*.java"/>
>        <exclude name="**/jmol/applet/*.java"/>
>      </fileset>
>    
> 
> I thought that it would do the trick, but when I run the build 
> with the 
> executable missing, I got the following exception:
> E:\Java\Jmol-HEAD\build-i18n.xml:54: Execute failed: 
> java.io.IOException: CreateProcess: xgettext2 -kGT._ --
> language=Java --
> msgid-bugs-address=jmol-developers@lists.sourceforge.net --output-
> dir=E:\Java\Jmol-HEAD/src/org/jmol/translation/Jmol/tmp --
> output=Jmol.pot JmolApplet.java JmolAppletControl.java ...


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


Mime
View raw message