On Mon, 23 Jan 2006, none ofyourbusiness <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to