ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KARR, DAVID" <dk0...@att.com>
Subject RE: How to gracefully not use a feature if the task jar isn't present?
Date Thu, 29 May 2014 23:18:14 GMT
> -----Original Message-----
> From: KARR, DAVID
> Sent: Thursday, May 29, 2014 4:12 PM
> To: Ant Users List
> Subject: How to gracefully not use a feature if the task jar isn't
> present?
> 
> I'm trying to implement an optional feature in a build script that
> utilizes the "xmltask" jar. To be less intrusive, I want the feature to be
> silently disabled if the xmltask jar isn't available.  I initially assumed
> that I would check for the presence of the jar in "$HOME/.ant/lib", but
> that has a few problems.  I can get this to work, but I realized that
> "$HOME" doesn't work for Windows, and "$USERPROFILE" doesn't work for non-
> windows.  In addition, someone could conceivably install the jar in
> $ANT_HOME/lib or somewhere else.
> 
> I'm already using "if:set" on a property that I set if the jar is
> available, but I'd like that check to be a little more robust.  I don't
> see a good way to do that.

Never mind, I noticed the "classname" property of the "available" task.  I sort of wish there
was a "package" property instead, but this will work.


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


Mime
View raw message