ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject cvs commit: ant WHATSNEW
Date Mon, 27 Dec 2004 10:15:06 GMT
antoine     2004/12/27 02:15:06

  Modified:    src/main/org/apache/tools/ant/taskdefs Zip.java
               src/testcases/org/apache/tools/ant/taskdefs ZipTest.java
                        JarTest.java
               src/etc/testcases/taskdefs zip.xml jar.xml
               .        WHATSNEW
  Log:
  Make it possible to create manifest only jars with the option duplicate="preserve"
  PR: 32802
  
  Revision  Changes    Path
  1.131     +3 -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.130
  retrieving revision 1.131
  diff -u -r1.130 -r1.131
  --- Zip.java	11 Dec 2004 22:43:05 -0000	1.130
  +++ Zip.java	27 Dec 2004 10:15:05 -0000	1.131
  @@ -800,7 +800,9 @@
                                            getLocation());
               } else {
                   // Create.
  -                createEmptyZip(zipFile);
  +                if (!zipFile.exists())  {
  +                    needsUpdate = true;
  +                }
               }
               return new ArchiveState(needsUpdate, initialResources);
           }
  
  
  
  1.23      +6 -0      ant/src/testcases/org/apache/tools/ant/taskdefs/ZipTest.java
  
  Index: ZipTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/ZipTest.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- ZipTest.java	17 Dec 2004 14:12:08 -0000	1.22
  +++ ZipTest.java	27 Dec 2004 10:15:05 -0000	1.23
  @@ -139,4 +139,10 @@
           assertTrue("archive should be created",
                      getProject().resolveFile("test3.zip").exists());
       }
  +    public void testZipEmptyCreate() {
  +        executeTarget("zipEmptyCreate");
  +        assertTrue("archive should be created",
  +                   getProject().resolveFile("test3.zip").exists());
  +
  +    }
   }
  
  
  
  1.31      +5 -0      ant/src/testcases/org/apache/tools/ant/taskdefs/JarTest.java
  
  Index: JarTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/JarTest.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- JarTest.java	17 Dec 2004 14:12:08 -0000	1.30
  +++ JarTest.java	27 Dec 2004 10:15:05 -0000	1.31
  @@ -256,4 +256,9 @@
               }
           }
       }
  +    public void testManifestOnlyJar() {
  +        executeTarget("testManifestOnlyJar");
  +        File manifestFile = getProject().resolveFile(tempDir + "META-INF" + File.separator
+ "MANIFEST.MF");
  +        assertTrue(manifestFile.exists());
  +    }
   }
  
  
  
  1.16      +5 -0      ant/src/etc/testcases/taskdefs/zip.xml
  
  Index: zip.xml
  ===================================================================
  RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/zip.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- zip.xml	25 Aug 2004 14:56:41 -0000	1.15
  +++ zip.xml	27 Dec 2004 10:15:05 -0000	1.16
  @@ -134,6 +134,11 @@
   		<zip destfile="test3.zip" basedir="empty" update="true"/>
     </target>
   
  +  <target name="zipEmptyCreate">
  +      <mkdir dir="empty"/>
  +      <zip destfile="test3.zip" basedir="empty" whenempty="create" includes="*.xyz"/>
  +  </target>
  +
     <target name="cleanup">
       <delete file="test3.zip"/>
       <delete file="test4.zip"/>
  
  
  
  1.13      +12 -0     ant/src/etc/testcases/taskdefs/jar.xml
  
  Index: jar.xml
  ===================================================================
  RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/jar.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- jar.xml	2 Apr 2003 16:20:13 -0000	1.12
  +++ jar.xml	27 Dec 2004 10:15:05 -0000	1.13
  @@ -210,4 +210,16 @@
       <touch file="${tmp.dir}/sub/foo"/>
       <jar destfile="${tmp.jar}" index="yes" basedir="${tmp.dir}"/>
     </target>
  +    <!-- bug 32802 -->
  +  <target name="testManifestOnlyJar">
  +    <mkdir dir="${tmp.dir}"/>  
  +    <jar destfile="${tmp.jar}" duplicate="preserve">
  +      <manifest>
  +        <attribute name="Foo" value="bar"/>
  +      </manifest>
  +    </jar>
  +    <mkdir dir="${tmp.dir}"/>
  +    <unzip src="${tmp.jar}" dest="${tmp.dir}"/>
  +
  +  </target>
   </project>
  
  
  
  1.703     +2 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.702
  retrieving revision 1.703
  diff -u -r1.702 -r1.703
  --- WHATSNEW	21 Dec 2004 14:08:20 -0000	1.702
  +++ WHATSNEW	27 Dec 2004 10:15:05 -0000	1.703
  @@ -176,6 +176,8 @@
   
   * Zip task was not zipping when only empty directories were found. Bugzilla 30365.
   
  +* Jar task was not including manifest files when duplicate="preserve" was chosen. Bugzilla
32802.
  +
   * Classpath was treated in the same way as -lib options. Bugzilla 28046.
   
   * Manual page for cvsversion contained incorrect attributes and did not say since 1.6.1.
  
  
  

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


Mime
View raw message