You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Chad Armstrong <ch...@gmail.com> on 2005/07/12 20:15:01 UTC
antcall with antcontrib's RemoteAnt?
Hello,
I've gotten some help from this list in setting up antcontrib's
RemoteAnt task, and have it mostly working (for which I am greatly
indebted.) Now, however, I'm up against another issue.
I have a build script on an XP box that kicks off (using RemoteAnt)
a build file on a Linux box. But the Linux build file script (the
'subprocess' of the Windows build script) fails whenever it hits an
[antcall] tag.
Is there some limitation there that I don't know about? I was
thinking of replacing the [antcall] tags with [macrodef], but the
current [antcall] targets are conditional on other variables defined
in my script, and [macrodefs] don't take the [if] attribute.
thanks for any help
Chad
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: antcall with antcontrib's RemoteAnt?
Posted by Chad Armstrong <ch...@gmail.com>.
Ok, I think I figured this out myself. I can replace all antcall's
with macrodef's like the following (assumes antcontrib installed):
----------------------------------------
..
<antcall target="doTask" />
..
<target name="doTask" if="WINDOWS">
..
</target>
..
----- would translate to --------
..
<doTask platform="WINDOWS" />
..
<macrodef name="doTask">
<attribute name="platform" />
<sequential>
<if>
<isset property="@{platform}" />
<then>
..
</then>
</if>
</sequential>
</macrodef>
--------------------------------------
similarly, UNLESS would be accomplished the following way:
--------------------------------------
..
<target name="doTask" if="WINDOWS" unless="fileExistsAlready">
..
--changes to--
..
<doTask platform="WINDOWS" fileExistsAlready="fileExistsBoolean" />
..
<macrodef name="doTask">
<attribute name="platform" />
<attribute name="fileExistsAlready" />
<sequential>
<if>
<and>
<isset property="@{platform}" />
<not>
<isset property="@{fileExistsAlready}" />
</not>
</and>
<then>
..
</then>
</if>
</sequential>
</macrodef>
Chad
On 7/12/05, Chad Armstrong <ch...@gmail.com> wrote:
> Hello,
> I've gotten some help from this list in setting up antcontrib's
> RemoteAnt task, and have it mostly working (for which I am greatly
> indebted.) Now, however, I'm up against another issue.
>
> I have a build script on an XP box that kicks off (using RemoteAnt)
> a build file on a Linux box. But the Linux build file script (the
> 'subprocess' of the Windows build script) fails whenever it hits an
> [antcall] tag.
>
> Is there some limitation there that I don't know about? I was
> thinking of replacing the [antcall] tags with [macrodef], but the
> current [antcall] targets are conditional on other variables defined
> in my script, and [macrodefs] don't take the [if] attribute.
>
> thanks for any help
> Chad
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org