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 <[EMAIL PROTECTED]>
> 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-
> [EMAIL PROTECTED]"/>
> <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 --
> [EMAIL PROTECTED] --output-
> dir=E:\Java\Jmol-HEAD/src/org/jmol/translation/Jmol/tmp --
> output=Jmol.pot JmolApplet.java JmolAppletControl.java ...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]