ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
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 <mvda_eds@hotmail.com> 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>

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

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

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

> 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
information.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message