ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ignacio J. Ortega" <>
Subject [Patch] trying solve w2k command line length limitations
Date Sat, 05 Apr 2003 16:37:47 GMT
Hola a todos:

I'm trying to solve w2k command line length problems for gump.

what i've tried is to create a properties file from gump instead of
passing the classpath in the command line, make a Launcher class that
loads it in a URLclassloader and start ant's main, this approach by
itself doesnt work at all, javac needs real jars in a real classpath not
a CL with all the jars loaded..

Hence this patch, the Launcher in addition to create a UCL, adds a
system property ant.class.path and starts ant's Main.. i've modified ant
Path type to add this property to the classpath like it's done with
java.class.path ( this property is readonly ).., and if using
build.sysclasspath=only, this property contents are added in addition to

Comments are welcomed..

Ignacio J. Ortega 

Index: src/main/org/apache/tools/ant/types/
RCS file:
retrieving revision 1.47
diff -u -r1.47
--- src/main/org/apache/tools/ant/types/	11 Mar 2003
10:57:42 -0000	1.47
+++ src/main/org/apache/tools/ant/types/	5 Apr 2003
16:28:25 -0000
@@ -103,6 +103,9 @@
     public static Path systemClasspath = 
         new Path(null, System.getProperty("java.class.path"));
+    public static Path antClasspath = 
+        new Path(null, System.getProperty("ant.classpath"));
      * Helper class, holds the nested <code>&lt;pathelement&gt;</code>
@@ -556,7 +559,8 @@
         if (order.equals("only")) {
             // only: the developer knows what (s)he is doing
             result.addExisting(Path.systemClasspath, true);
+            result.addExisting(Path.antClasspath, true);
         } else if (order.equals("first")) {
             // first: developer could use a little help
             result.addExisting(Path.systemClasspath, true);

View raw message