ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 3989] - Available tasks test always user classpath
Date Mon, 08 Oct 2001 13:39:07 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3989>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3989

Available tasks test always user classpath

conor@cortexebusiness.com.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX



------- Additional Comments From conor@cortexebusiness.com.au  2001-10-08 06:39 -------
Available uses the AntClassLoader and all classloaders should delegate searches
to their parent loaders. It is, therefore, difficult to perform the sort of
isolated search you desire. 

The parent must always be queried first, even is isolated mode, since otherwise
classes such as java.lang.Object would be loaded in the child loader, rather
than the parent loader. Isolated mode tries to isolate non-JDK classes to ensure
consistent behaviour between forked and non-forked java invocations. It is for
this reason that java and javax package namespaces are always delegated. 

The classloading in Ant is somewhat of a compromise. Nevertheless, the type of
test you want to perform here is not really what the <available> task does. You
may need a custom task which actually searches the given classpath (classes and
jar files) rather than loading the class. 

I'm interested to know why you need to do this type of search.

Mime
View raw message