ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <anto...@gmx.de>
Subject Re: DO NOT REPLY [Bug 28046] - Ant includes JARs in working directory
Date Fri, 03 Sep 2004 15:51:48 GMT
Hi Peter,

is the problem that :

if there is a directory /foo/bar in the classpath before starting ant, 
then all jars present in /foo/bar will go into the classpath used by ant,
while the good behavior would be that only classes under /foo/bar such 
as /foo/bar/com/... go into the classpath ?

Antoine


Peter Reilly wrote:

>
> Does anyone know the reason why the launcher
> code in ant 1.6 gets the jars in a directory specified in
> the CLASSPATH and adds them to ant's classpath ?
>
> It does seem to be a strange thing to do.
>
> Lancher.java: line 128
>                if (element.isDirectory()) {
>                    // add any jars in the directory
>                    URL[] dirURLs = Locator.getLocationURLs(element);
>                    for (int j = 0; j < dirURLs.length; ++j) {
>                        libPathURLs.add(dirURLs[j]);
>                    }
>                }
>
>
> It may be an oversight - -lib <path> is used to pass the CLASSPATH
> to ant in the ant script.
> So the code that parses this lib <path> is the same code that parses the
> normal -lib option to ant.
>
> Perhaps we need to be the CLASSPATH in a different manner in 
> Launcher,java ?
>
> either explicitly or implicitly ?
>
> Peter
>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message