You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Fred Welland <fw...@intelixinc.com> on 2000/12/01 19:47:31 UTC

Available or target that always fires??

So <available\> can not live out side of a target.  Thus you can't use it to
set up global project properties like when you have <property /> task nested
directly under <project>.

Is there a way to get ANT to always process a specified task?  Yes I could
make an 'init' target be the default project target (and it would call my
existing 'default' target).  However the nature of our builds allows for
developers to run ant with any one of our targets not just the project
default.

So saying 'ant my_target' wouldn't run my init - which wouldn't make my
property, set by <available>, be actually, available.

Short of having all of my targets depend on init - how can I have ANT always
run a target regardless of the target requested on the command line?

Thanks,

Fred Welland

Re: Available or target that always fires??

Posted by Stefan Bodewig <bo...@apache.org>.
Fred Welland <fw...@intelixinc.com> wrote:

> Is there a way to get ANT to always process a specified task?

target, not task, yes? Sure, make all your targets depend on that
specific target.

> Short of having all of my targets depend on init - how can I have
> ANT always run a target regardless of the target requested on the
> command line?

There is no other way - and I really don't see why there should be. If
each of your targets depends on a specific target, why not say so
explicitly?

Stefan