Bertrand Delacretaz wrote:
Hi,I'd like a construct like <path id="xyz"> <pathelement path="ok.jar"/> <pathelement path="missing.jar"/> </path> to fail if missing.jar is not available.Is there a way without using a separate <available/> element (which means having the missing.jar name in two places, unless I'm missing something)?Making the Path class configurable to cause an error instead of logging the "dropping " + f + " from path as it doesn't exist" could be a solution, but I'm wondering if there's an easier way, without duplicating jar names.
Sounds to me like you've just added a new condition to Ant, Monsieur Delacretaz, called something like <pathexists> , which verifies that every element in a path is present, logs at -verbose level if one is missing (and perhaps sets a property to a filelist/path of missing items).
something like <condition property="missing.path"><available pathref="xyz" missingpathid="xyz.missing" textproperty="message" />
</condition>
<fail if="missing.path">Missing files ${message}</fail>
implementations & tests gratefully accepted
-steve
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
