ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Gentle <>
Subject Re: How to detect missing jars in a <path>?
Date Fri, 16 Dec 2005 01:20:21 GMT
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



At 04:20 2005-12-12, you wrote:
>I'd like a construct like
><path id="xyz">
>   <pathelement path="ok.jar"/>
>   <pathelement path="missing.jar"/>
>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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message