ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Jar.java Zip.java
Date Tue, 27 Jun 2000 11:12:13 GMT
bodewig     00/06/27 04:12:12

  Modified:    src/main/org/apache/tools/ant/taskdefs Jar.java Zip.java
  Log:
  Store the modification time of the files inside the ZIP file.
  
  Revision  Changes    Path
  1.5       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Jar.java
  
  Index: Jar.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Jar.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Jar.java	2000/05/20 10:58:17	1.4
  +++ Jar.java	2000/06/27 11:12:11	1.5
  @@ -98,7 +98,7 @@
   	    InputStream in = this.getClass().getResourceAsStream(s);
               if ( in == null )
   		throw new BuildException ( "Could not find: " + s );
  -	    zipFile(in, zOut, "META-INF/MANIFEST.MF");
  +	    zipFile(in, zOut, "META-INF/MANIFEST.MF", System.currentTimeMillis());
    	}
        }
   
  
  
  
  1.7       +4 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java
  
  Index: Zip.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Zip.java	2000/05/20 10:58:17	1.6
  +++ Zip.java	2000/06/27 11:12:12	1.7
  @@ -161,10 +161,12 @@
       {
       }
   
  -    protected void zipFile(InputStream in, ZipOutputStream zOut, String vPath)
  +    protected void zipFile(InputStream in, ZipOutputStream zOut, String vPath,
  +                           long lastModified)
           throws IOException
       {
           ZipEntry ze = new ZipEntry(vPath);
  +        ze.setTime(lastModified);
   
           /*
            * XXX ZipOutputStream.putEntry expects the ZipEntry to know its
  @@ -222,7 +224,7 @@
           throws IOException
       {
           FileInputStream fIn = new FileInputStream(file);
  -        zipFile(fIn, zOut, vPath);
  +        zipFile(fIn, zOut, vPath, file.lastModified());
           fIn.close();
       }
   }
  
  
  

Mime
View raw message