On 12/29/00 4:36 AM, "Peter Donald" <[EMAIL PROTECTED]> wrote:

> Agreed - this is a problem ant2.0 will address hopefully. Many people have
> asked for it in one way or another ... What I suggest is something like
> 
> <target name="t1" depends="t2"/>
> <target name="t2" if="execute.t2"/>
> 
> <target name="t1" if="execute.t1">
> <ant-call target="t1"/>
> </target>
> 
> It is not efficient or pretty but it does work ;)

Um, do you really mean to define the same target twice? That doesn't flow
very well.

The way that I think it should be solved is via a "execute-target" task.

<target name="main">
   <execute-target name="foo" if="property.foo"/>
</target>

<target name="foo" depends="bar, bap">..</target>

Having it as just a task means that nothing else gets done unless the
property is set to 1 or true.

.duncan

-- 
James Duncan Davidson                                        [EMAIL PROTECTED]
                                                                  !try; do()

Reply via email to