ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <>
Subject Re: <available> task question (odd behavior) [narrowed the problem!]
Date Thu, 02 Jan 2003 20:56:02 GMT

Ok, I think I narrowed this down.  It makes a little more sense, but I 
still don't fully understand why I'm seeing this behavior....

Given the path:

<path id="coyote.classpath">
       <pathelement location="${tomcat.home}/server/lib/tomcat-coyote.jar"/>

<available> finds the following class:

<available classname="org.apache.coyote.tomcat5.Constants" 
property="coyote-5-present" classpathref="coyote.classpath"/>

but it doesn't find this (or any other class that I've tested in said package):

<available classname="org.apache.coyote.tomcat5.CoyoteConnector" 
property="coyote-5-present" classpathref="coyote.classpath"/>

What's the deal here?   The only thing I can think of is that the Constants 
class doesn't have any other dependencies.  That is, it doesn't import 
classes outside the jar file that I put in the coyote.classpath whereas the 
others import classes outside said classpath and so, even though the class 
physically exists in the package where I expect it to, the <available> task 
reports that it isn't available because the coyote.classpath doesn't 
contain some of the classes that the CoyoteConnector depends on and, 
therefore, wouldn't really be available if this was the classpath being 
used for compilation or something that would require those dependencies to 
exist.  Is this right?

If so, shouldn't there, maybe, be an ignoreDependencies="true" attribute 
for the case where I really don't require full dependency checking.  I just 
want to know if the class physically exists and that is it.  I have no use 
for it otherwise.



At 03:58 AM 1/2/2003 -0600, you wrote:

>Am I going nuts or does the <available> task only find classes being 
>available in java.* or javax.* packages?
>I am trying to see if a particular tomcat class is available and the 
><available> task keeps not finding it.  I know it finds the jar because 
>I've copied in javax.servlet.ServletConfig into the tomcat-coyote.jar and 
>it finds that just fine.  It doesn't seem to be able to find 
>org.apache.coyote.tomcat5.CoyoteConnector.  Note that I am using a nightly 
>build of Tomcat5, so, yes, that package *does* exist.
>Can someone confirm this behavior?  I don't see this quirk mentioned in 
>the docs for <available>.
>To unsubscribe, e-mail:   <>
>For additional commands, e-mail: <>

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