bodewig     2005/03/11 00:48:20

  Modified:    .        Tag: ANT_16_BRANCH WHATSNEW
               src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH
                        Jar.java Zip.java
               src/main/org/apache/tools/zip Tag: ANT_16_BRANCH
                        ExtraFieldUtils.java
  Added:       src/main/org/apache/tools/zip Tag: ANT_16_BRANCH
                        JarMarker.java
  Log:
  merge
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.503.2.192 +33 -14    ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.503.2.191
  retrieving revision 1.503.2.192
  diff -u -r1.503.2.191 -r1.503.2.192
  --- WHATSNEW  10 Mar 2005 16:13:11 -0000      1.503.2.191
  +++ WHATSNEW  11 Mar 2005 08:48:19 -0000      1.503.2.192
  @@ -61,6 +61,9 @@
     silently ignores the message.  BuildListeners still should avoid
     accessing either stream.
   
  +* Added a comment attribute to the zip task.
  +  Bugzilla report 22793.
  +
   * Overloaded FileUtils.createNewFile with a boolean mkdirs attribute
     to create nonexistent parent directories.
   
  @@ -102,23 +105,33 @@
   * Pathconvert no longer requires that one of (targetos|pathsep|dirsep)
     be set; platform defaults are used when this is the case.
   
  +* Added preservelastmodified attribute to fixcrlf task. Bugzilla 25770.
  +
   * Added isfileselected condition.
   
   * Added verbose="true|false" attribute to <subant>. When verbose is enabled,
     the directory name is logged on entry and exit of the sub-build. Bugzilla 
33787.
   
  +* Added -nouserlib option to allow running ant without automatically loading
  +  up ${user.home}/.lib/ant. This is useful when compiling ant, and antlibs.
  +  Modified the build.sh and build.bat to use the option.
  +
  +* Added -noclasspath option to allow running ant WITHOUT using CLASSPATH env
  +  variable. Modified ant.bat to do this so that %CLASSPATH% is not looked at.
  +
   * Add else attribute to the condition task, which specifies an
     optional alternate value to set the property to if the nested
     condition evaluates to false. Bugzilla report 33074.
   
  +* Ant generated jar files should now be detected as jar files by
  +  Solaris.  Bugzilla Report 32649.
  +  
   Fixed bugs:
   -----------
   
   * AbstractCvsTask prematurely closed its outputStream and errorStream.
     Bugzilla 30097.
   
  -* Target Location was always UNKNOWN_LOCATION due to an omitted merge.
  -
   * Impossible to use implicit classpath for <taskdef>
     when Ant core loader != Java application loader and
     Path.systemClassPath taken from ${java.class.path} Bugzilla 30161.
  @@ -188,9 +201,8 @@
   
   * forked <javac> won't pass -source to a JDK 1.1 or 1.2 javac anymore.
     Bugzilla report 32948
  -  
  -* filenames with colon on second position are not handled correctly by ant.
  -  Bugzilla report 32979
  +
  +* propertyset references did not handle nested propertyset references.
   
   * oata.types.Description.getDescription(Project) would throw a
     NullPointerException when the "ant.targets" reference was unset.
  @@ -232,13 +244,6 @@
   
   * Get with usetimestamp did not work when local timestamp roughly >= now.
   
  -* Added -nouserlib option to allow running ant without automatically loading
  -  up ${user.home}/.lib/ant. This is useful when compiling ant, and antlibs.
  -  Modified the build.sh and build.bat to use the option.
  -
  -* Added -noclasspath option to allow running ant WITHOUT using CLASSPATH env
  -  variable. Modified ant.bat to do this so that %CLASSPATH% is not looked at.
  -
   Changes from Ant 1.6.1 to Ant 1.6.2
   ===================================
   
  @@ -532,11 +537,17 @@
   --------------
   * Shipped XML parser is now Xerces-J 2.6.1
   
  +* Translate task logs a debug message specifying the number of files
  +  that it processed.  Bugzilla Report 13938.
  +
   * <fixcrlf> has a new attribute - fixlast. Bugzilla Report 23262.
   
   * <p4submit> has 2 new attributes, needsresolveproperty and changeproperty.
     Bugzilla Report 25711.
   
  +* add description attributes to macrodef attributes and elements.
  +  Bugzilla Report 24711.
  +
   * Extending ClearCase Tasks :
    - Added an extra option to 'failonerr' to each ClearCase task/command.
    - Extended the functionality of cccheckout. It can check (notco) to see if
  @@ -545,8 +556,10 @@
    - Added three new ClearCase commands: ccmkattr, ccmkdir, ccmkelem
     Bugzilla Report 26253.
   
  -* add description attributes to macrodef attributes and elements.
  -  Bugzilla Report 24711.
  +* New condition <typefound> that can be used to probe for the declaration 
  +  and implementation of a task, type, preset, macro, scriptdef, whatever. 
  +  As it tests for the implementation, it can be used to check for optional
  +  tasks being available. 
   
   * added nested text support to <macrodef>
     
  @@ -759,6 +772,12 @@
     element tagdiff of the xml output
     Bugzilla Report 16081.
   
  +* <cvstagdiff> had a problem with aliased modules and with requests for 
multiple modules
  +  Bugzilla Reports 21373 and 22877.
  +
  +* <cvstagdiff> could not parse properly the revision number of new files 
with CVS 1.11.9 or higher
  +  Bugzilla Report 24406.
  +
   * <fixcrlf> make fixcrlf create its temporary files in the default directory
     of FileUtils#createTempFile instead of the destination dir of fixcrlf.
     Bugzilla Report 20870.
  
  
  
  No                   revision
  No                   revision
  1.81.2.6  +14 -2     ant/src/main/org/apache/tools/ant/taskdefs/Jar.java
  
  Index: Jar.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Jar.java,v
  retrieving revision 1.81.2.5
  retrieving revision 1.81.2.6
  diff -u -r1.81.2.5 -r1.81.2.6
  --- Jar.java  13 May 2004 07:13:53 -0000      1.81.2.5
  +++ Jar.java  11 Mar 2005 08:48:20 -0000      1.81.2.6
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2000-2004 The Apache Software Foundation
  + * Copyright  2000-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -47,6 +47,8 @@
   import org.apache.tools.ant.types.FileSet;
   import org.apache.tools.ant.types.Path;
   import org.apache.tools.ant.types.ZipFileSet;
  +import org.apache.tools.zip.JarMarker;
  +import org.apache.tools.zip.ZipExtraField;
   import org.apache.tools.zip.ZipOutputStream;
   
   /**
  @@ -130,6 +132,15 @@
        */
       private Path indexJars;
   
  +    /**
  +     * Extra fields needed to make Solaris recognize the archive as a jar 
file.
  +     *
  +     * @since Ant 1.6.3
  +     */
  +    private ZipExtraField[] JAR_MARKER = new ZipExtraField[] {
  +        JarMarker.getInstance()
  +    };
  +
       /** constructor */
       public Jar() {
           super();
  @@ -382,7 +393,8 @@
                   Project.MSG_WARN);
           }
   
  -        zipDir(null, zOut, "META-INF/", ZipFileSet.DEFAULT_DIR_MODE);
  +        zipDir(null, zOut, "META-INF/", ZipFileSet.DEFAULT_DIR_MODE,
  +               JAR_MARKER);
           // time to write the manifest
           ByteArrayOutputStream baos = new ByteArrayOutputStream();
           OutputStreamWriter osw = new OutputStreamWriter(baos, "UTF-8");
  
  
  
  1.116.2.16 +22 -1     ant/src/main/org/apache/tools/ant/taskdefs/Zip.java
  
  Index: Zip.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Zip.java,v
  retrieving revision 1.116.2.15
  retrieving revision 1.116.2.16
  diff -u -r1.116.2.15 -r1.116.2.16
  --- Zip.java  1 Mar 2005 09:48:51 -0000       1.116.2.15
  +++ Zip.java  11 Mar 2005 08:48:20 -0000      1.116.2.16
  @@ -47,6 +47,7 @@
   import org.apache.tools.ant.util.MergingMapper;
   import org.apache.tools.ant.util.ResourceUtils;
   import org.apache.tools.zip.ZipEntry;
  +import org.apache.tools.zip.ZipExtraField;
   import org.apache.tools.zip.ZipFile;
   import org.apache.tools.zip.ZipOutputStream;
   
  @@ -972,6 +973,22 @@
       protected void zipDir(File dir, ZipOutputStream zOut, String vPath,
                             int mode)
           throws IOException {
  +        zipDir(dir, zOut, vPath, mode, null);
  +    }
  +
  +    /**
  +     * Add a directory to the zip stream.
  +     * @param dir  the directort to add to the archive
  +     * @param zOut the stream to write to
  +     * @param vPath the name this entry shall have in the archive
  +     * @param mode the Unix permissions to set.
  +     * @param extra ZipExtraFields to add
  +     * @throws IOException on error
  +     * @since Ant 1.6.3
  +     */
  +    protected void zipDir(File dir, ZipOutputStream zOut, String vPath,
  +                          int mode, ZipExtraField[] extra)
  +        throws IOException {
           if (addedDirs.get(vPath) != null) {
               // don't add directories we've already added.
               // no warning if we try, it is harmless in and of itself
  @@ -996,7 +1013,11 @@
               ze.setCrc (EMPTY_CRC);
               ze.setUnixMode(mode);
   
  -            zOut.putNextEntry (ze);
  +            if (extra != null) {
  +                ze.setExtraFields(extra);
  +            }
  +
  +            zOut.putNextEntry(ze);
           }
       }
   
  
  
  
  No                   revision
  No                   revision
  1.5.2.6   +1 -0      ant/src/main/org/apache/tools/zip/ExtraFieldUtils.java
  
  Index: ExtraFieldUtils.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/zip/ExtraFieldUtils.java,v
  retrieving revision 1.5.2.5
  retrieving revision 1.5.2.6
  diff -u -r1.5.2.5 -r1.5.2.6
  --- ExtraFieldUtils.java      9 Mar 2005 18:56:27 -0000       1.5.2.5
  +++ ExtraFieldUtils.java      11 Mar 2005 08:48:20 -0000      1.5.2.6
  @@ -37,6 +37,7 @@
       static {
           implementations = new Hashtable();
           register(AsiExtraField.class);
  +        register(JarMarker.class);
       }
   
       /**
  
  
  
  No                   revision
  
  Index: ExtraFieldUtils.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/zip/ExtraFieldUtils.java,v
  retrieving revision 1.5.2.5
  retrieving revision 1.5.2.6
  diff -u -r1.5.2.5 -r1.5.2.6
  --- ExtraFieldUtils.java      9 Mar 2005 18:56:27 -0000       1.5.2.5
  +++ ExtraFieldUtils.java      11 Mar 2005 08:48:20 -0000      1.5.2.6
  @@ -37,6 +37,7 @@
       static {
           implementations = new Hashtable();
           register(AsiExtraField.class);
  +        register(JarMarker.class);
       }
   
       /**
  
  
  
  No                   revision
  
  Index: ExtraFieldUtils.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/zip/ExtraFieldUtils.java,v
  retrieving revision 1.5.2.5
  retrieving revision 1.5.2.6
  diff -u -r1.5.2.5 -r1.5.2.6
  --- ExtraFieldUtils.java      9 Mar 2005 18:56:27 -0000       1.5.2.5
  +++ ExtraFieldUtils.java      11 Mar 2005 08:48:20 -0000      1.5.2.6
  @@ -37,6 +37,7 @@
       static {
           implementations = new Hashtable();
           register(AsiExtraField.class);
  +        register(JarMarker.class);
       }
   
       /**
  
  
  
  1.1.2.1   +0 -0      ant/src/main/org/apache/tools/zip/JarMarker.java
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to