You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Kris Read <kr...@gmail.com> on 2004/10/15 23:53:20 UTC
Calling another build without failing on error
Hi!
I have not been able to come up with a solution to this problem.
Perhaps someone can help?
I want to call an ant target in an external build file. I can do this
now using <ant/>
However...
If the external target fails, I do not want the calling target to fail
also. I would like to store the pass/fail of this external target in
a property and continue with the rest of my build.
The <ant/> task does not seem to support any flags which would let me
do this. Other tasks use a property such as failonerror="false".
I guess I might be able to use the <apply/> tag somehow but I do not
know how and I am hoping there is a cleaner solution.
K. Read
Calgary, Canada
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Calling another build without failing on error
Posted by Matt Benson <gu...@yahoo.com>.
Depending on what you are doing I would suggest using
<subant> which has a failonerror attribute, or
wrapping your <ant> invocation in an ant-contrib
<trycatch>...
HTH,
Matt
--- Kris Read <kr...@gmail.com> wrote:
> Hi!
>
> I have not been able to come up with a solution to
> this problem.
> Perhaps someone can help?
>
> I want to call an ant target in an external build
> file. I can do this
> now using <ant/>
>
> However...
>
> If the external target fails, I do not want the
> calling target to fail
> also. I would like to store the pass/fail of this
> external target in
> a property and continue with the rest of my build.
>
> The <ant/> task does not seem to support any flags
> which would let me
> do this. Other tasks use a property such as
> failonerror="false".
>
> I guess I might be able to use the <apply/> tag
> somehow but I do not
> know how and I am hoping there is a cleaner
> solution.
>
> K. Read
> Calgary, Canada
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
>
>
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org