You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by an...@apache.org on 2003/06/03 23:13:54 UTC

cvs commit: ant WHATSNEW

antoine     2003/06/03 14:13:54

  Modified:    src/main/org/apache/tools/ant/taskdefs/compilers
                        JavacExternal.java DefaultCompilerAdapter.java
               .        WHATSNEW
  Log:
  Make sure that javac source files in lists passed to external compilers
  are always quoted in the default external compiler implementations
  Also replace backslashes with slashes in path names containing spaces
  PR: 10499 17683
  Submitted by: Joe Boon (joe dot boon at cdcsolutions dot com) and
                Anne Kinsella (anne dot kinsella at iona dot com)
  
  Revision  Changes    Path
  1.10      +1 -2      ant/src/main/org/apache/tools/ant/taskdefs/compilers/JavacExternal.java
  
  Index: JavacExternal.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/compilers/JavacExternal.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- JavacExternal.java	29 Apr 2003 13:16:22 -0000	1.9
  +++ JavacExternal.java	3 Jun 2003 21:13:53 -0000	1.10
  @@ -80,8 +80,7 @@
   
           return 
               executeExternalCompile(cmd.getCommandline(), firstFileName,
  -                                   !assumeJava11() && !assumeJava12() 
  -                                   && !assumeJava13()) 
  +                                   true)
               == 0;
       }
   
  
  
  
  1.37      +3 -2      ant/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
  
  Index: DefaultCompilerAdapter.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- DefaultCompilerAdapter.java	15 May 2003 12:44:01 -0000	1.36
  +++ DefaultCompilerAdapter.java	3 Jun 2003 21:13:53 -0000	1.37
  @@ -405,7 +405,7 @@
        * system.
        */
       protected int executeExternalCompile(String[] args, int firstFileName) {
  -        return executeExternalCompile(args, firstFileName, false);
  +        return executeExternalCompile(args, firstFileName, true);
       }
   
       /**
  @@ -415,7 +415,7 @@
        * if the index is negative, no temporary file will ever be
        * created, but this may hit the command line length limit on your
        * system.
  -     * @param quoteFilenames - if set to true, filenames containing
  +     * @param quoteFiles - if set to true, filenames containing
        * spaces will be quoted when they appear in the external file.
        * This is necessary when running JDK 1.4's javac and probably
        * others.
  @@ -448,6 +448,7 @@
                       out = new PrintWriter(new FileWriter(tmpFile));
                       for (int i = firstFileName; i < args.length; i++) {
                           if (quoteFiles && args[i].indexOf(" ") > -1) {
  +                            args[i] = args[i].replace('\\', '/');
                               out.println("\"" + args[i] + "\"");
                           } else {
                               out.println(args[i]);
  
  
  
  1.434     +5 -1      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.433
  retrieving revision 1.434
  diff -u -r1.433 -r1.434
  --- WHATSNEW	29 May 2003 21:35:42 -0000	1.433
  +++ WHATSNEW	3 Jun 2003 21:13:54 -0000	1.434
  @@ -119,7 +119,11 @@
     Bugzilla Report 19187.
   
   * file names that include spaces need to be quoted inside the @argfile
  -  argument using forked <javac> and JDK 1.4.  Bugzilla Report 10499.
  +  argument using forked <javac> and (all JDKS).  Bugzilla Report 10499.
  +  NB : a first correction was only introducing quotes for JDK 1.4
  +  It has been changed to quote for all external compilers when paths contain spaces.
  +  Also the backslashes need to be converted to forward slashes 
  +  Bugzilla Report 17683.
   
   * Setting filesonly to true in <zip> and related tasks would cause the
     archives to be always recreated.  Bugzilla Report 19449.