ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: How to use the <available> task?
Date Tue, 03 Apr 2001 09:35:57 GMT
Per Thomas Jahr <Per.Thomas.Jahr@nr.no> wrote:

> I want to check if the commapi.jar is available in the projects
> classpath.

Then you shouldn't use the file attribute of <available> as this
searches for files in the filesystem, not for parts of your
classpath.

What you want to do is to use the classname attribute and search for a
class that can only be loaded from that specific jar file.

Take a look at Ant's own buildfile - the check_for_optional_packages
target.

Stefan

Mime
View raw message