ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Zip.java
Date Tue, 18 Jan 2005 12:35:37 GMT
peterreilly    2005/01/18 04:35:37

  Modified:    .        WHATSNEW
               docs/manual/CoreTasks zip.html
               src/main/org/apache/tools/ant/taskdefs Zip.java
  Log:
  Add support of zip comment.
  PR: 22793
  Obtained from: Larry Shatzer
  
  Revision  Changes    Path
  1.716     +3 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.715
  retrieving revision 1.716
  diff -u -r1.715 -r1.716
  --- WHATSNEW	18 Jan 2005 09:41:20 -0000	1.715
  +++ WHATSNEW	18 Jan 2005 12:35:37 -0000	1.716
  @@ -182,6 +182,9 @@
     silently ignores the message.  BuildListeners still should avoid
     accessing either stream.
   
  +* Added a comment attribute to the zip task.
  +  Bugzilla report 22793.
  +
   Fixed bugs:
   -----------
   
  
  
  
  1.28      +5 -0      ant/docs/manual/CoreTasks/zip.html
  
  Index: zip.html
  ===================================================================
  RCS file: /home/cvs/ant/docs/manual/CoreTasks/zip.html,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- zip.html	22 Nov 2004 22:53:50 -0000	1.27
  +++ zip.html	18 Jan 2005 12:35:37 -0000	1.28
  @@ -184,6 +184,11 @@
       Defaults to true.  <em>Since Ant 1.6.2</em></td>
       <td align="center" valign="top">No</td>
     </tr>
  +  <tr>
  +    <td valign="top">comment</td>
  +    <td valign="top">Comment to store in the archive. <em>Since Ant 1.6.3</em></td>
  +    <td valign="top" align="center">No</td>
  +  </tr>
   </table>
   <h3>Parameters specified as nested elements</h3>
   <h4>fileset</h4>
  
  
  
  1.133     +27 -0     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.132
  retrieving revision 1.133
  diff -u -r1.132 -r1.133
  --- Zip.java	6 Jan 2005 12:05:05 -0000	1.132
  +++ Zip.java	18 Jan 2005 12:35:37 -0000	1.133
  @@ -115,6 +115,12 @@
       private boolean roundUp = true;
   
       /**
  +     * Comment for the archive.
  +     * @since Ant 1.6.3
  +     */
  +    private String comment = "";
  +
  +    /**
        * This is the name/location of where to
        * create the .zip file.
        *
  @@ -290,6 +296,26 @@
       public void setKeepCompression(boolean keep) {
           keepCompression = keep;
       }
  +    
  +    /**
  +     * Comment to use for archive.
  +     *
  +     * @param comment The content of the comment.
  +     * @since Ant 1.6.3
  +     */
  +    public void setComment(String comment) {
  +        this.comment = comment;
  +    }
  +
  +    /**
  +     * Comment of the archive
  +     *
  +     * @return Comment of the archive.
  +     * @since Ant 1.6.3
  +     */
  +    public String getComment() {
  +        return comment;
  +    }
   
       /**
        * Whether the file modification times will be rounded up to the
  @@ -484,6 +510,7 @@
                       }
                       addResources(oldFiles, r, zOut);
                   }
  +                zOut.setComment(comment);
                   finalizeZipOutputStream(zOut);
   
                   // If we've been successful on an update, delete the
  
  
  

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


Mime
View raw message