ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KARR, DAVID" <dk0...@att.com>
Subject How to gracefully not use a feature if the task jar isn't present?
Date Thu, 29 May 2014 23:11:52 GMT
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.

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


Mime
View raw message