How to gracefully not use a feature if the task jar isn't present?
KARR, DAVID <dk068x <at> att.com>
2014-05-29 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
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.