ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin" <>
Subject Re: Conditional target execution based on prerequisite execution
Date Sun, 25 Aug 2002 22:05:11 GMT
It appears we have 2 items here
1)The regular Target dependency tree
2)Targets which should be executed everytime the Project build is invoked.
Does Ant have a mechanism for ALWAYS executing specified targets everytime
the Project build is invoked
Regardless of the Dependency tree?
----- Original Message -----
From: "Mike Ayers" <>
To: "Ant Users List" <>
Sent: Tuesday, February 18, 2003 1:02 PM
Subject: RE: Conditional target execution based on prerequisite execution

> From: Timothy Wall []
> Sent: Tuesday, February 18, 2003 8:36 AM

> This raises the question (for me): What *does* affect whether the
> target that specifies the dependency(s) gets executed if the
> dependent
> target(s) did not (need to) run?  Of course, that paragraph may not
> mean anything at all...

This is beyond my current skill level.  I suspect that it means something,
just something obscure.  Like all software of any complexity, Ant will have
interesting twists and turns that will be discovered as time goes on.

> If B is only run when one or more of its dependencies is run,
> then the
> problem seems to be those bootstrap targets which have no "depends";
> they need to be conditionally run to prevent the entire remainder of
> the chain from always being run.

Errr - I don't know if you realize it, but you are stating a basic build
principle hre.  Am I missing something?

> What is the canonical "Only create this directory if it
> doesn't exist"
> rule?

There may not be a canonical form, but this will work:

<condition property="dir.makeme" >
<available ${} >
<mkdir dir=${} />

I have a suspicion, however, that just "<mkdir dir=${} />" will also


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

View raw message