I *knew* there was a solution to this problem (as I'd used it several
years ago to demonstrate to an unbelieving group that application
classpath was full of junk) - and it only took me two hours to find it again...
JWhich, by Mike Clark, has a mode to validate classpaths:
To validate the class path and report any non-existent or invalid
class path entries:
java JWhich -validate
I toyed with an ant task for this way back then, but can't put my
hands on it. :(. I think I trashed it when the "whichresource" task
made it's debut.
JWhich is available at http://www.clarkware.com/software/jwhich.zip
HTH
Ken
At 04:20 2005-12-12, you 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.
--
Bertrand Delacretaz
independent consultant, Lausanne, Switzerland
http://www.codeconsult.ch