ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Javac.java
Date Fri, 29 Dec 2000 14:35:40 GMT
rubys       00/12/29 06:35:40

  Modified:    src/main/org/apache/tools/ant/taskdefs Javac.java
  Log:
  Control the order in which the system and build classpaths are combined
  via a new property: build.sysclasspath.
  
  Revision  Changes    Path
  1.59      +28 -8     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java
  
  Index: Javac.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- Javac.java	2000/11/20 06:25:20	1.58
  +++ Javac.java	2000/12/29 14:35:39	1.59
  @@ -372,9 +372,6 @@
           }
       }
   
  -    // XXX
  -    // we need a way to not use the current classpath.
  -
       /**
        * Builds the compilation classpath.
        *
  @@ -391,15 +388,38 @@
               classpath.setLocation(destDir);
           }
   
  -        // add our classpath to the mix
  +        // Compine the build classpath with the system classpath, in an 
  +        // order determined by the value of build.classpath
   
  -        if (compileClasspath != null) {
  -            classpath.addExisting(compileClasspath);
  +        if (compileClasspath == null) {
  +            classpath.addExisting(Path.systemClasspath);
  +        } else {
  +            String order = project.getProperty("build.sysclasspath");
  +            if (order == null) order="first";
  +
  +            if (order.equals("only")) {
  +                // only: the developer knows what (s)he is doing
  +                classpath.addExisting(Path.systemClasspath);
  +
  +            } else if (order.equals("last")) {
  +                // last: don't trust the developer
  +                classpath.addExisting(compileClasspath);
  +                classpath.addExisting(Path.systemClasspath);
  +
  +            } else if (order.equals("ignore")) {
  +                // ignore: don't trust anyone
  +                classpath.addExisting(compileClasspath);
  +                addRuntime = true;
  +
  +            } else {
  +                // first: developer could use a little help
  +                classpath.addExisting(Path.systemClasspath);
  +                classpath.addExisting(compileClasspath);
  +            }
           }
   
  -        // add the system classpath
  +        // optionally add the runtime classes
   
  -        classpath.addExisting(Path.systemClasspath);
           if (addRuntime) {
               if (System.getProperty("java.vendor").toLowerCase().indexOf("microsoft") >=
0) {
                   // Pull in *.zip from packages directory
  
  
  

Mime
View raw message