ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: cvs commit: ant/src/main/org/apache/tools/ant/launch Launcher .java
Date Thu, 12 Feb 2004 09:51:14 GMT
On Wed, 11 Feb 2004, Matt Benson <gudnabrsam@yahoo.com> wrote:

> This is only peripherally related... this has been
> discussed briefly before, but I never received a
> satisfactory answer.  Can someone justify the
> restriction that all Java classes and resources to be
> used by Ant must be in jars?

There is no such restriction AFAIK.  Point Ant with -lib to a
directory and it will use the directory itself as a starting point for
a package hierarchy plus all jars contained inside the directory.

In Launcher:

                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]);
                    }
                }
                libPathURLs.add(element.toURL());

the loop adds the jars and after that the directory itself is added.

Stefan

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


Mime
View raw message