ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers DefaultCompilerAdapter.java
Date Fri, 09 Mar 2001 16:03:11 GMT
bodewig     01/03/09 08:03:11

  Modified:    src/main/org/apache/tools/ant/taskdefs/compilers
                        DefaultCompilerAdapter.java
  Log:
  Make sure bootclasspath and extdirs attribute of <javac> get special
  treatment if running JDK 1.1.
  
  PR: 841
  
  Revision  Changes    Path
  1.2       +25 -11    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
  
  Index: DefaultCompilerAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultCompilerAdapter.java	2001/01/12 14:08:51	1.1
  +++ DefaultCompilerAdapter.java	2001/03/09 16:03:10	1.2
  @@ -202,11 +202,23 @@
           }
           
           cmd.createArgument().setValue("-classpath");
  +
           // Just add "sourcepath" to classpath ( for JDK1.1 )
  +        // as well as "bootclasspath" and "extdirs"
           if (Project.getJavaVersion().startsWith("1.1")) {
  -            cmd.createArgument().setValue(classpath.toString() 
  -                                          + File.pathSeparator 
  -                                          + src.toString());
  +            Path cp = new Path(project);
  +            /*
  +             * XXX - This doesn't mix very well with build.systemclasspath,
  +             */
  +            if (bootclasspath != null) {
  +                cp.append(bootclasspath);
  +            }
  +            if (extdirs != null) {
  +                addExtdirsToClasspath(cp);
  +            }
  +            cp.append(classpath);
  +            cp.append(src);
  +            cmd.createArgument().setPath(cp);
           } else {
               cmd.createArgument().setPath(classpath);
               cmd.createArgument().setValue("-sourcepath");
  @@ -215,7 +227,17 @@
                   cmd.createArgument().setValue("-target");
                   cmd.createArgument().setValue(target);
               }
  +            if (bootclasspath != null
  +                && !Project.getJavaVersion().startsWith("1.1")) {
  +                cmd.createArgument().setValue("-bootclasspath");
  +                cmd.createArgument().setPath(bootclasspath);
  +            }
  +            if (extdirs != null) {
  +                cmd.createArgument().setValue("-extdirs");
  +                cmd.createArgument().setPath(extdirs);
  +            }
           }
  +
           if (encoding != null) {
               cmd.createArgument().setValue("-encoding");
               cmd.createArgument().setValue(encoding);
  @@ -225,14 +247,6 @@
           }
           if (optimize) {
               cmd.createArgument().setValue("-O");
  -        }
  -        if (bootclasspath != null) {
  -            cmd.createArgument().setValue("-bootclasspath");
  -            cmd.createArgument().setPath(bootclasspath);
  -        }
  -        if (extdirs != null) {
  -            cmd.createArgument().setValue("-extdirs");
  -            cmd.createArgument().setPath(extdirs);
           }
   
           if (depend) {
  
  
  

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


Mime
View raw message