ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1197895 - in /ant/antlibs/compress/trunk: ./ docs/ src/main/org/apache/ant/compress/ src/main/org/apache/ant/compress/resources/ src/main/org/apache/ant/compress/taskdefs/ src/main/org/apache/ant/compress/util/ src/tests/antunit/ src/tests...
Date Sat, 05 Nov 2011 06:47:32 GMT
Author: bodewig
Date: Sat Nov  5 06:47:31 2011
New Revision: 1197895

URL: http://svn.apache.org/viewvc?rev=1197895&view=rev
Log:
add support for the XZ format.  Requires Commons Compress trunk and XZ for Java

Added:
    ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/XZResource.java
      - copied, changed from r1197887, ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/GZipResource.java
    ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/taskdefs/UnXZ.java
      - copied, changed from r1197887, ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/taskdefs/GUnzip.java
    ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/taskdefs/XZ.java
      - copied, changed from r1197887, ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/taskdefs/GZip.java
    ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/util/XZStreamFactory.java
      - copied, changed from r1197887, ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/util/GZipStreamFactory.java
    ant/antlibs/compress/trunk/src/tests/antunit/unxz-test.xml
      - copied, changed from r1197887, ant/antlibs/compress/trunk/src/tests/antunit/gunzip-test.xml
    ant/antlibs/compress/trunk/src/tests/antunit/xz-test.xml
      - copied, changed from r1197887, ant/antlibs/compress/trunk/src/tests/antunit/gzip-test.xml
    ant/antlibs/compress/trunk/src/tests/antunit/xzresource-test.xml
      - copied, changed from r1197887, ant/antlibs/compress/trunk/src/tests/antunit/gzipresource-test.xml
    ant/antlibs/compress/trunk/src/tests/resources/asf-logo.gif.xz   (with props)
Modified:
    ant/antlibs/compress/trunk/changes.xml
    ant/antlibs/compress/trunk/docs/compresource.html
    ant/antlibs/compress/trunk/docs/index.html
    ant/antlibs/compress/trunk/docs/pack.html
    ant/antlibs/compress/trunk/docs/unpack.html
    ant/antlibs/compress/trunk/project-template.ivy.xml
    ant/antlibs/compress/trunk/project-template.pom
    ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/antlib.xml
    ant/antlibs/compress/trunk/version.properties

Modified: ant/antlibs/compress/trunk/changes.xml
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/changes.xml?rev=1197895&r1=1197894&r2=1197895&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/changes.xml (original)
+++ ant/antlibs/compress/trunk/changes.xml Sat Nov  5 06:47:31 2011
@@ -37,6 +37,17 @@
       <title>Apache Compress Ant Library</title>
     </properties>
 
+    <release version="1.2" date="unreleased">
+      <action type="update" breaks-bwc="true">
+        The Apache Compress Antlib now requires Apache Commons
+        Compress 1.4 and the public domain XZ for Java library if you
+        want to use the XZ format.
+      </action>
+      <action type="add">
+        Support for xz compression has been added.
+      </action>
+    </release>
+
     <release version="1.1" date="2011-11-05">
       <action type="update" breaks-bwc="true">
         The Apache Compress Antlib now requires Apache Commons

Modified: ant/antlibs/compress/trunk/docs/compresource.html
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/docs/compresource.html?rev=1197895&r1=1197894&r2=1197895&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/docs/compresource.html (original)
+++ ant/antlibs/compress/trunk/docs/compresource.html Sat Nov  5 06:47:31 2011
@@ -92,3 +92,23 @@
   JAR some-archive.pack where the <code>pack200resource</code>
   provides the decompression of the archive.</p>
 
+<h2><a name="xzresource">xzresource</a></h2>
+
+<p>This is a <a href="#compresource">compressed resource</a> using the
+  XZ compression.</p>
+
+<h4>Examples</h4>
+
+<pre>
+&lt;cmp:tarentry xmlns:cmp="antlib:org.apache.ant.compress"
+    name="some-file.txt"&gt;
+  &lt;cmp:xzresource&gt;
+    &lt;file file="some-archive.tar.xz"/&gt;
+  &lt;/cmp:xzresource&gt;
+&lt;/cmp:tarentry&gt;
+</pre>
+
+<p>Represents the entry named some-file.txt in archive
+  some-archive.tar.xz where the <code>xzresource</code> provides
+  the decompression of the archive.</p>
+

Modified: ant/antlibs/compress/trunk/docs/index.html
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/docs/index.html?rev=1197895&r1=1197894&r2=1197895&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/docs/index.html (original)
+++ ant/antlibs/compress/trunk/docs/index.html Sat Nov  5 06:47:31 2011
@@ -28,8 +28,8 @@
     <p>This Antlib contains tasks and resources that provide
       compression/uncompression and archival/unarchival capabilities
       based on <a href="http://commons.apache.org/compress/">Apache
-      Commons Compress</a>.  Using Apache Commons Compress 1.3 this
-      Antlib supports gzip, bzip2 and pack200 compression and ar, cpio, Unix
+      Commons Compress</a>.  Using Apache Commons Compress 1.4 this
+      Antlib supports gzip, bzip2, xz and pack200 compression and ar, cpio, Unix
       dump, tar and zip archives.  Support for dump is read-only.</p>
 
     <h3>Known Limitations</h3>
@@ -57,7 +57,9 @@
       <li><a href="expand.html#undump">undump</a></li>
       <li><a href="unpack.html#unpack200">unpack200</a></li>
       <li><a href="expand.html#untar">untar</a></li>
+      <li><a href="unpack.html#unxz">unxz</a></li>
       <li><a href="expand.html#unzip">unzip</a></li>
+      <li><a href="pack.html#xz">xz</a></li>
       <li><a href="archive.html#zip">zip</a></li>
     </ul>
 
@@ -76,6 +78,7 @@
       <li><a href="compresource.html#pack200resource">pack200resource</a></li>
       <li><a href="entry.html#tarentry">tarentry</a></li>
       <li><a href="fileset.html#tarfileset">tarfileset</a></li>
+      <li><a href="compresource.html#xzresource">xzresource</a></li>
       <li><a href="entry.html#zipentry">zipentry</a></li>
       <li><a href="fileset.html#zipfileset">zipfileset</a></li>
     </ul>

Modified: ant/antlibs/compress/trunk/docs/pack.html
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/docs/pack.html?rev=1197895&r1=1197894&r2=1197895&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/docs/pack.html (original)
+++ ant/antlibs/compress/trunk/docs/pack.html Sat Nov  5 06:47:31 2011
@@ -161,6 +161,11 @@
     </tr>
   </table>
 
+  <h3><a name="xz">XZ</a></h3>
+
+  <p>Is a <a href="#pack">compressing task</a> that uses the XZ
+    compression algorithm.</p>
+
   <h3>Examples</h3>
   <pre>
     &lt;cmp:gzip src=&quot;test.tar&quot; dest=&quot;test.tar.gz&quot;

Modified: ant/antlibs/compress/trunk/docs/unpack.html
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/docs/unpack.html?rev=1197895&r1=1197894&r2=1197895&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/docs/unpack.html (original)
+++ ant/antlibs/compress/trunk/docs/unpack.html Sat Nov  5 06:47:31 2011
@@ -131,6 +131,11 @@ resource collection</h4>
     </tr>
   </table>
 
+<h3><a name="unxz">UnXZ</a></h3>
+
+<p>Is an <a href="#unpack">uncompressing task</a> that uses the XZ
+  compression algorithm.</p>
+
 <h3>Examples</h3>
 <blockquote><pre>
 &lt;cmp:gunzip src=&quot;test.tar.gz&quot; xmlns:cmp="antlib:org.apache.ant.compress"/&gt;

Modified: ant/antlibs/compress/trunk/project-template.ivy.xml
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/project-template.ivy.xml?rev=1197895&r1=1197894&r2=1197895&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/project-template.ivy.xml (original)
+++ ant/antlibs/compress/trunk/project-template.ivy.xml Sat Nov  5 06:47:31 2011
@@ -52,6 +52,7 @@
   </publications>
   <dependencies>
     <dependency org="org.apache.commons" name="commons-compress"
-                rev="1.3"/>
+                rev="1.4"/>
+    <dependency org="org.tukaani" name="xz" rev="1.0"/>
   </dependencies>
 </ivy-module>

Modified: ant/antlibs/compress/trunk/project-template.pom
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/project-template.pom?rev=1197895&r1=1197894&r2=1197895&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/project-template.pom (original)
+++ ant/antlibs/compress/trunk/project-template.pom Sat Nov  5 06:47:31 2011
@@ -50,7 +50,12 @@
     <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-compress</artifactId>
-      <version>[1.3,)</version>
+      <version>1.4</version>
+    </dependency>
+    <dependency>
+      <groupId>org.tukaani</groupId>
+      <artifactId>xz</artifactId>
+      <version>1.0</version>
     </dependency>
   </dependencies>
 </project>

Modified: ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/antlib.xml
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/antlib.xml?rev=1197895&r1=1197894&r2=1197895&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/antlib.xml (original)
+++ ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/antlib.xml Sat Nov  5 06:47:31
2011
@@ -65,6 +65,10 @@
      classname="org.apache.ant.compress.taskdefs.UnPack200"
      />
   <taskdef
+     name="unxz"
+     classname="org.apache.ant.compress.taskdefs.UnXZ"
+     />
+  <taskdef
      name="bzip2"
      classname="org.apache.ant.compress.taskdefs.BZip2"
      />
@@ -80,6 +84,10 @@
      name="pack200normalize"
      classname="org.apache.ant.compress.taskdefs.Pack200Normalize"
      />
+  <taskdef
+     name="xz"
+     classname="org.apache.ant.compress.taskdefs.XZ"
+     />
 
   <typedef
      name="arentry"
@@ -138,6 +146,10 @@
      name="pack200resource"
      classname="org.apache.ant.compress.resources.Pack200Resource"
      />
+  <typedef
+     name="xzresource"
+     classname="org.apache.ant.compress.resources.XZResource"
+     />
 
   <componentdef
      name="hasusername"

Copied: ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/XZResource.java
(from r1197887, ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/GZipResource.java)
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/XZResource.java?p2=ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/XZResource.java&p1=ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/GZipResource.java&r1=1197887&r2=1197895&rev=1197895&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/GZipResource.java
(original)
+++ ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/resources/XZResource.java
Sat Nov  5 06:47:31 2011
@@ -17,20 +17,21 @@
  */
 package org.apache.ant.compress.resources;
 
-import org.apache.ant.compress.util.GZipStreamFactory;
+import org.apache.ant.compress.util.XZStreamFactory;
 import org.apache.tools.ant.types.ResourceCollection;
 
 /**
- * A GZip compressed resource.
+ * An XZ compressed resource.
+ * @since Apache Compress Antlib 1.2
  */
-public final class GZipResource extends CommonsCompressCompressorResource {
-    private static final String NAME = "GZip";
+public final class XZResource extends CommonsCompressCompressorResource {
+    private static final String NAME = "XZ";
 
-    public GZipResource() {
-        super(NAME, new GZipStreamFactory());
+    public XZResource() {
+        super(NAME, new XZStreamFactory());
     }
 
-    public GZipResource(ResourceCollection other) {
-        super(NAME, new GZipStreamFactory(), other);
+    public XZResource(ResourceCollection other) {
+        super(NAME, new XZStreamFactory(), other);
     }
 }

Copied: ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/taskdefs/UnXZ.java (from
r1197887, ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/taskdefs/GUnzip.java)
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/taskdefs/UnXZ.java?p2=ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/taskdefs/UnXZ.java&p1=ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/taskdefs/GUnzip.java&r1=1197887&r2=1197895&rev=1197895&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/taskdefs/GUnzip.java (original)
+++ ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/taskdefs/UnXZ.java Sat Nov
 5 06:47:31 2011
@@ -18,15 +18,16 @@
 
 package org.apache.ant.compress.taskdefs;
 
-import org.apache.ant.compress.util.GZipStreamFactory;
+import org.apache.ant.compress.util.XZStreamFactory;
 
 /**
- * Expands a gzip archive.
+ * Expands an xz archive.
+ * @since Apache Compress Antlib 1.2
  */
-public final class GUnzip extends UnpackBase {
+public final class UnXZ extends UnpackBase {
 
-    public GUnzip() {
-        super(".gz", new GZipStreamFactory());
+    public UnXZ() {
+        super(".xz", new XZStreamFactory());
     }
 
 }
\ No newline at end of file

Copied: ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/taskdefs/XZ.java (from
r1197887, ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/taskdefs/GZip.java)
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/taskdefs/XZ.java?p2=ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/taskdefs/XZ.java&p1=ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/taskdefs/GZip.java&r1=1197887&r2=1197895&rev=1197895&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/taskdefs/GZip.java (original)
+++ ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/taskdefs/XZ.java Sat Nov 
5 06:47:31 2011
@@ -19,20 +19,21 @@
 package org.apache.ant.compress.taskdefs;
 
 import org.apache.ant.compress.resources.CommonsCompressCompressorResource;
-import org.apache.ant.compress.resources.GZipResource;
-import org.apache.ant.compress.util.GZipStreamFactory;
+import org.apache.ant.compress.resources.XZResource;
+import org.apache.ant.compress.util.XZStreamFactory;
 import org.apache.tools.ant.types.Resource;
 
 /**
- * Compresses using gzip.
+ * Compresses using XZ.
+ * @since Apache Compress Antlib 1.2
  */
-public final class GZip extends PackBase {
+public final class XZ extends PackBase {
 
-    public GZip() {
-        super(new GZipStreamFactory(),
+    public XZ() {
+        super(new XZStreamFactory(),
               new PackBase.ResourceWrapper() {
                 public CommonsCompressCompressorResource wrap(Resource dest) {
-                    return new GZipResource(dest);
+                    return new XZResource(dest);
                 }
             });
     }

Copied: ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/util/XZStreamFactory.java
(from r1197887, ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/util/GZipStreamFactory.java)
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/util/XZStreamFactory.java?p2=ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/util/XZStreamFactory.java&p1=ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/util/GZipStreamFactory.java&r1=1197887&r2=1197895&rev=1197895&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/util/GZipStreamFactory.java
(original)
+++ ant/antlibs/compress/trunk/src/main/org/apache/ant/compress/util/XZStreamFactory.java
Sat Nov  5 06:47:31 2011
@@ -24,20 +24,21 @@ import java.io.OutputStream;
 
 import org.apache.commons.compress.compressors.CompressorInputStream;
 import org.apache.commons.compress.compressors.CompressorOutputStream;
-import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream;
-import org.apache.commons.compress.compressors.gzip.GzipCompressorOutputStream;
+import org.apache.commons.compress.compressors.xz.XZCompressorInputStream;
+import org.apache.commons.compress.compressors.xz.XZCompressorOutputStream;
 
 /**
  * Creates streams for the supported compression formats.
+ * @since Apache Compress Antlib 1.2
  */
-public class GZipStreamFactory implements CompressorStreamFactory {
+public class XZStreamFactory implements CompressorStreamFactory {
 
     /**
      * @param stream the stream to read from, should be buffered
      */
     public CompressorInputStream getCompressorStream(InputStream stream)
         throws IOException {
-        return new GzipCompressorInputStream(stream);
+        return new XZCompressorInputStream(stream);
     }
 
 
@@ -46,6 +47,6 @@ public class GZipStreamFactory implement
      */
     public CompressorOutputStream getCompressorStream(OutputStream stream)
         throws IOException {
-        return new GzipCompressorOutputStream(stream);
+        return new XZCompressorOutputStream(stream);
     }
 }
\ No newline at end of file

Copied: ant/antlibs/compress/trunk/src/tests/antunit/unxz-test.xml (from r1197887, ant/antlibs/compress/trunk/src/tests/antunit/gunzip-test.xml)
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/src/tests/antunit/unxz-test.xml?p2=ant/antlibs/compress/trunk/src/tests/antunit/unxz-test.xml&p1=ant/antlibs/compress/trunk/src/tests/antunit/gunzip-test.xml&r1=1197887&r2=1197895&rev=1197895&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/src/tests/antunit/gunzip-test.xml (original)
+++ ant/antlibs/compress/trunk/src/tests/antunit/unxz-test.xml Sat Nov  5 06:47:31 2011
@@ -29,42 +29,35 @@
 
   <target name="test1">
     <au:expectfailure>
-      <cmp:gunzip/>
+      <cmp:unxz/>
     </au:expectfailure>
   </target>
 
   <target name="test2">
     <au:expectfailure>
-      <cmp:gunzip src=""/>
+      <cmp:unxz src=""/>
     </au:expectfailure>
   </target>
 
-  <target name="testCoreGzipTask" depends="setUp">
-    <gzip src="../resources/asf-logo.gif" destfile="${output}/asf-logo.gif.gz"/>
-    <cmp:gunzip src="${output}/asf-logo.gif.gz" dest="${output}/asf-logo.gif" />
+  <target name="testXZTask" depends="setUp">
+    <cmp:xz src="../resources/asf-logo.gif"
+            destfile="${output}/asf-logo.gif.xz"/>
+    <cmp:unxz src="${output}/asf-logo.gif.xz" dest="${output}/asf-logo.gif" />
     <au:assertFilesMatch expected="../resources/asf-logo.gif"
                          actual="${output}/asf-logo.gif"/>
   </target>
 
-  <target name="testAntlibGzipTask" depends="setUp">
-    <cmp:gzip src="../resources/asf-logo.gif"
-              destfile="${output}/asf-logo.gif.gz"/>
-    <cmp:gunzip src="${output}/asf-logo.gif.gz" dest="${output}/asf-logo.gif" />
-    <au:assertFilesMatch expected="../resources/asf-logo.gif"
-                         actual="${output}/asf-logo.gif"/>
-  </target>
-
-  <target name="testNativeGzip" depends="setUp">
-    <cmp:gunzip src="../resources/asf-logo.gif.gz"
+  <target name="testNativeXZ" depends="setUp">
+    <cmp:unxz src="../resources/asf-logo.gif.xz"
                 dest="${output}/asf-logo.gif" />
     <au:assertFilesMatch expected="../resources/asf-logo.gif"
                          actual="${output}/asf-logo.gif"/>
   </target>
 
   <target name="testWithResource" depends="setUp">
-    <cmp:gunzip dest="${output}/asf-logo.gif">
-      <file file="../resources/asf-logo.gif.gz"/>
-    </cmp:gunzip>
+    <cmp:unxz dest="${output}/asf-logo.gif">
+      <file file="../resources/asf-logo.gif.xz"/>
+    </cmp:unxz>
     <au:assertFilesMatch expected="../resources/asf-logo.gif"
                          actual="${output}/asf-logo.gif"/>
   </target>

Copied: ant/antlibs/compress/trunk/src/tests/antunit/xz-test.xml (from r1197887, ant/antlibs/compress/trunk/src/tests/antunit/gzip-test.xml)
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/src/tests/antunit/xz-test.xml?p2=ant/antlibs/compress/trunk/src/tests/antunit/xz-test.xml&p1=ant/antlibs/compress/trunk/src/tests/antunit/gzip-test.xml&r1=1197887&r2=1197895&rev=1197895&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/src/tests/antunit/gzip-test.xml (original)
+++ ant/antlibs/compress/trunk/src/tests/antunit/xz-test.xml Sat Nov  5 06:47:31 2011
@@ -31,77 +31,77 @@
 
   <target name="testFailNone" depends="setUp">
     <au:expectfailure expectedmessage="source is required.">
-      <cmp:gzip destfile="${output}/file.gz">
+      <cmp:xz destfile="${output}/file.xz">
         <fileset dir="${output}/empty" />
-      </cmp:gzip>
+      </cmp:xz>
     </au:expectfailure>
   </target>
 
   <target name="testFailTwo" depends="setUp">
     <au:expectfailure expectedmessage="Can only have one source.">
-      <cmp:gzip destfile="${output}/file.gz">
+      <cmp:xz destfile="${output}/file.xz">
         <fileset dir="${output}" />
-      </cmp:gzip>
+      </cmp:xz>
     </au:expectfailure>
   </target>
 
   <target name="testFailNoDest" depends="setUp">
     <au:expectfailure expectedmessage="dest resource is required.">
-      <cmp:gzip src="${output}/fileone">
+      <cmp:xz src="${output}/fileone">
         <dest>
           <fileset dir="${output}/empty" />
         </dest>
-      </cmp:gzip>
+      </cmp:xz>
     </au:expectfailure>
   </target>
 
   <target name="testFailTwoDests" depends="setUp">
     <au:expectfailure expectedmessage="Can only have one destination resource.">
-      <cmp:gzip src="${output}/fileone">
+      <cmp:xz src="${output}/fileone">
         <dest>
           <fileset dir="${output}" />
         </dest>
-      </cmp:gzip>
+      </cmp:xz>
     </au:expectfailure>
   </target>
 
   <target name="testRealTest" depends="setUp">
-    <cmp:gzip src="../resources/asf-logo.gif"
-              destfile="${output}/asf-logo.gif.gz" />
-    <au:assertLogContains text="Building: asf-logo.gif.gz"/>
-    <au:assertFileExists file="${output}/asf-logo.gif.gz"/>
+    <cmp:xz src="../resources/asf-logo.gif"
+              destfile="${output}/asf-logo.gif.xz" />
+    <au:assertLogContains text="Building: asf-logo.gif.xz"/>
+    <au:assertFileExists file="${output}/asf-logo.gif.xz"/>
   </target>
 
   <target name="testRealTestWithResource" depends="setUp">
-    <cmp:gzip destfile="${output}/asf-logo.gif.gz">
+    <cmp:xz destfile="${output}/asf-logo.gif.xz">
       <file file="../resources/asf-logo.gif"/>
-    </cmp:gzip>
-    <au:assertLogContains text="Building: asf-logo.gif.gz"/>
-    <au:assertFileExists file="${output}/asf-logo.gif.gz"/>
+    </cmp:xz>
+    <au:assertLogContains text="Building: asf-logo.gif.xz"/>
+    <au:assertFileExists file="${output}/asf-logo.gif.xz"/>
   </target>
 
   <target name="testDateCheck" depends="setUp">
-    <touch file="${output}/asf-logo.gif.gz"/>
-    <cmp:gzip src="../resources/asf-logo.gif"
-              destfile="${output}/asf-logo.gif.gz" />
-    <au:assertLogContains text="Nothing to do: asf-logo.gif.gz is up to date."/>
+    <touch file="${output}/asf-logo.gif.xz"/>
+    <cmp:xz src="../resources/asf-logo.gif"
+              destfile="${output}/asf-logo.gif.xz" />
+    <au:assertLogContains text="Nothing to do: asf-logo.gif.xz is up to date."/>
   </target>
 
   <target name="testNestedTask" depends="setUp">
-    <cmp:gzip destfile="${output}/asf-logo.tar.gz">
+    <cmp:xz destfile="${output}/asf-logo.tar.xz">
       <cmp:tar>
         <cmp:cpiofileset src="../resources/asf-logo.gif.bin.cpio"
                          includes="asf-logo.gif"/>
       </cmp:tar>
-    </cmp:gzip>
-    <au:assertFileExists file="${output}/asf-logo.tar.gz"/>
+    </cmp:xz>
+    <au:assertFileExists file="${output}/asf-logo.tar.xz"/>
     <au:assertTrue>
       <cond:islastmodified datetime="2009-07-31-20:11:13 +0200"
                            pattern="yyyy-MM-dd-HH:mm:ss Z">
         <cmp:tarentry name="asf-logo.gif">
-          <gzipresource>
-            <file file="${output}/asf-logo.tar.gz"/>
-          </gzipresource>
+          <cmp:xzresource>
+            <file file="${output}/asf-logo.tar.xz"/>
+          </cmp:xzresource>
         </cmp:tarentry>
       </cond:islastmodified>
     </au:assertTrue>

Copied: ant/antlibs/compress/trunk/src/tests/antunit/xzresource-test.xml (from r1197887, ant/antlibs/compress/trunk/src/tests/antunit/gzipresource-test.xml)
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/src/tests/antunit/xzresource-test.xml?p2=ant/antlibs/compress/trunk/src/tests/antunit/xzresource-test.xml&p1=ant/antlibs/compress/trunk/src/tests/antunit/gzipresource-test.xml&r1=1197887&r2=1197895&rev=1197895&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/src/tests/antunit/gzipresource-test.xml (original)
+++ ant/antlibs/compress/trunk/src/tests/antunit/xzresource-test.xml Sat Nov  5 06:47:31 2011
@@ -27,12 +27,12 @@
     <mkdir dir="${output}"/>
   </target>    
 
-  <target name="testNativeGZip" depends="setUp">
+  <target name="testNativeXZ" depends="setUp">
     <copy todir="${output}">
-      <cmp:gzipresource>
-        <file file="../resources/asf-logo.gif.gz"/>
-      </cmp:gzipresource>
-      <globmapper from="*.gz" to="*"/>
+      <cmp:xzresource>
+        <file file="../resources/asf-logo.gif.xz"/>
+      </cmp:xzresource>
+      <globmapper from="*.xz" to="*"/>
     </copy>
     <au:assertFilesMatch expected="../resources/asf-logo.gif"
                          actual="${output}/asf-logo.gif"/>

Added: ant/antlibs/compress/trunk/src/tests/resources/asf-logo.gif.xz
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/src/tests/resources/asf-logo.gif.xz?rev=1197895&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ant/antlibs/compress/trunk/src/tests/resources/asf-logo.gif.xz
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: ant/antlibs/compress/trunk/version.properties
URL: http://svn.apache.org/viewvc/ant/antlibs/compress/trunk/version.properties?rev=1197895&r1=1197894&r2=1197895&view=diff
==============================================================================
--- ant/antlibs/compress/trunk/version.properties (original)
+++ ant/antlibs/compress/trunk/version.properties Sat Nov  5 06:47:31 2011
@@ -12,4 +12,4 @@
 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
-artifact.version=1.1Alpha
+artifact.version=1.2Alpha



Mime
View raw message