ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <>
Subject RE: DO NOT REPLY [Bug 28046] - Ant includes JARs in working directory
Date Fri, 03 Sep 2004 16:00:56 GMT
> From: Antoine Levy-Lambert []
> 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
> while the good behavior would be that only classes under /foo/bar such
> as /foo/bar/com/... go into the classpath ?
> 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 ?

Well, -lib is not a classpath. It's more like java.ext.dirs, i.e.
all JARs in these directories are picked up. This makes it a lot
more convenient than having to specify a full classpath.

That said, since -lib is also used to pass in the user CLASSPATH,
it shouldn't change the meaning of the classpath, as Peter
pointed out.

So basically we should leave -lib as-is, and introduce a new -cp
(or -classpath or both) to pass in a true class path, and change
the launcher script to do -cp %CLASSPATH% (or -cp "$CLASSPATH").

No? --DD

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

View raw message