ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Creating a task for getting the current target in a project
Date Mon, 23 Jan 2006 21:14:56 GMT
On Mon, 23 Jan 2006, none ofyourbusiness <> wrote:

> Thats why we would like to make these dependancies optional for
> these 2 targets. We would like check for the availibilty of these
> jars only if the target is something else then "clean" or "package"

<target name="mark-optional">
  <property name="optional!" value="t"/>

<target name="check-third-party" unless="optional!">
  .. check for jar and fail if not available ..

<target name="compile" depends="check-third-party">

<target name="package" depends="mark-optional, compile">

> so first i looked for a system property that gives the current
> target, but that doesnt seem to exist. After this i tried making a
> task for this myself, but i couldnt get it working...

And you don't really have a chance to, only the project instance knows
which targets it is going to execute and it doesn't expose the


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

View raw message