ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From isaacsteele <>
Subject Re: build dependencies and executing independent targets in the same project
Date Mon, 14 Sep 2009 19:57:26 GMT

Apologies about placing it in this question in the wrong forum, should I copy
the post and re-submit it there?

I'm using subant because it is calling my tests for multiple projects in
multiple directories:

<target name="test">
		<fileset dir="../../" includes="**/build.xml" excludes="**/abc/build.xml,
		<target name="test"/>

This calls ~15 different build.xml files for projects that I want to test
that I built previously my overall project build.xml.

If there is a better way to do this (with with the junit task), I'd love to
use it, but I don't know how at this point.

Stefan Bodewig wrote:
> [Isaac, this really is a qiestion for the user list, not the dev list
> which is about the development of Ant itself, not developing with Ant.]
> On 2009-09-14, isaacsteele <> wrote:
>> 1) Is this possible--that I execute a target at the end of a build
>> regardless of failure?
> Not out of the box, no.  There are patches to enable this and I think
> I've even seen somebody implement a BuildListener that will invoke a
> target in the *finished event (which sounds dangerous given that the
> project instance thinks the build is over).
>> 2) What should my default target be (if I have two independent targets
>> that
>> should be built)?
> Probably something like <target name="do-all-of-it" depends="C,D"/>
>> 3) I know I could use <failonerror> in subant and then make D dependent
>> on
>> C, but then the build isn't marked as failed when finished.
> In the part I've snipped, you said C would fail if a test failed.  do
> you really need subant at all?  If not, then make <junit> set a property
> instead of making the build fail and later use <fail/> if that property
> has been set.
> Stefan
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View this message in context:
Sent from the Ant - Dev mailing list archive at

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

View raw message