ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smiley <>
Subject "available" shouldn't actually load the class; just see if it's resolvable
Date Fri, 29 Oct 2004 15:40:20 GMT
Hello.  Recently I got the uddi4j source and I rant it's ant build 
script.  It turns out that it would conditionally compile some extras if 
I have Apache's soap & axis projects on the classpath.  I checked this via:
     <available classname="org.apache.soap.messaging.Message"
                property="apache-soap.available" />
     <available classname="org.apache.axis.Constants"
                property="apache-axis.available" />
Okay, so I rant ant again but I used the -lib option to specify those 
two jars.  However, ant failed to set those two properties!  I did a lot 
of troubleshooting, trying everything, and then I tried the ant -debug 
option which revealed the problem.  Ant was trying to actually load the 
classes in question (instead of just seeing if they are available) 
which in turn caused it to load dependent classes --some of which were 
not on the classpath.

I don't think ant's "available" task should actually load the class. 
Just see if the class is available by doing a getResource or something 
like that.

~ David Smiley

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message