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 11:33:20 GMT
antoine     2004/12/27 03:33:20

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH
                        Zip.java
               src/testcases/org/apache/tools/ant/taskdefs Tag:
                        ANT_16_BRANCH ZipTest.java JarTest.java
               src/etc/testcases/taskdefs Tag: ANT_16_BRANCH zip.xml
                        jar.xml
               .        Tag: ANT_16_BRANCH WHATSNEW
  Log:
  Merge
  Make manifest-only jars working with duplicate="preserve"
  PR: 32802
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.116.2.11 +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.116.2.10
  retrieving revision 1.116.2.11
  diff -u -r1.116.2.10 -r1.116.2.11
  --- Zip.java	25 Aug 2004 14:58:10 -0000	1.116.2.10
  +++ Zip.java	27 Dec 2004 11:33:19 -0000	1.116.2.11
  @@ -800,7 +800,9 @@
                                            getLocation());
               } else {
                   // Create.
  -                createEmptyZip(zipFile);
  +                if (!zipFile.exists())  {
  +                    needsUpdate = true;
  +                }
               }
               return new ArchiveState(needsUpdate, initialResources);
           }
  
  
  
  No                   revision
  No                   revision
  1.15.2.6  +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.15.2.5
  retrieving revision 1.15.2.6
  diff -u -r1.15.2.5 -r1.15.2.6
  --- ZipTest.java	25 Aug 2004 14:58:10 -0000	1.15.2.5
  +++ ZipTest.java	27 Dec 2004 11:33:20 -0000	1.15.2.6
  @@ -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.22.2.7  +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.22.2.6
  retrieving revision 1.22.2.7
  diff -u -r1.22.2.6 -r1.22.2.7
  --- JarTest.java	9 Mar 2004 17:02:01 -0000	1.22.2.6
  +++ JarTest.java	27 Dec 2004 11:33:20 -0000	1.22.2.7
  @@ -257,4 +257,9 @@
               }
           }
       }
  +    public void testManifestOnlyJar() {
  +        executeTarget("testManifestOnlyJar");
  +        File manifestFile = getProject().resolveFile(tempDir + "META-INF" + File.separator
+ "MANIFEST.MF");
  +        assertTrue(manifestFile.exists());
  +    }
   }
  
  
  
  No                   revision
  No                   revision
  1.13.2.2  +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.13.2.1
  retrieving revision 1.13.2.2
  diff -u -r1.13.2.1 -r1.13.2.2
  --- zip.xml	25 Aug 2004 14:58:10 -0000	1.13.2.1
  +++ zip.xml	27 Dec 2004 11:33:20 -0000	1.13.2.2
  @@ -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.12.2.1  +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.12.2.1
  diff -u -r1.12 -r1.12.2.1
  --- jar.xml	2 Apr 2003 16:20:13 -0000	1.12
  +++ jar.xml	27 Dec 2004 11:33:20 -0000	1.12.2.1
  @@ -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>
  
  
  
  No                   revision
  No                   revision
  1.503.2.154 +2 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.503.2.153
  retrieving revision 1.503.2.154
  diff -u -r1.503.2.153 -r1.503.2.154
  --- WHATSNEW	21 Dec 2004 14:09:39 -0000	1.503.2.153
  +++ WHATSNEW	27 Dec 2004 11:33:20 -0000	1.503.2.154
  @@ -64,6 +64,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