From ccef0f89820b6a6613fd587d00c6bab48e6f45ff Mon Sep 17 00:00:00 2001
From: Magesh Umasankar
Date: Wed, 24 Apr 2002 03:09:06 +0000
Subject: [PATCH] Implement and document a compression attribute for the tar
and untar tasks.
Submitted by: Curt Arnold
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272562 13f79535-47bb-0310-9956-ffa450edef68
---
WHATSNEW | 5 +
docs/manual/CoreTasks/tar.html | 11 +-
docs/manual/CoreTasks/unzip.html | 10 +-
.../taskdefs/expected/asf-logo.gif.tar.bz2 | Bin 0 -> 7543 bytes
.../taskdefs/expected/asf-logo.gif.tar.gz | Bin 0 -> 7116 bytes
src/etc/testcases/taskdefs/tar.xml | 35 ++++++
src/etc/testcases/taskdefs/untar.xml | 21 ++++
.../org/apache/tools/ant/taskdefs/Tar.java | 110 +++++++++++++++---
.../org/apache/tools/ant/taskdefs/Untar.java | 102 +++++++++++++++-
.../apache/tools/bzip2/CBZip2InputStream.java | 10 +-
.../apache/tools/ant/taskdefs/TarTest.java | 23 ++++
.../apache/tools/ant/taskdefs/UntarTest.java | 30 ++++-
12 files changed, 337 insertions(+), 20 deletions(-)
create mode 100644 src/etc/testcases/taskdefs/expected/asf-logo.gif.tar.bz2
create mode 100644 src/etc/testcases/taskdefs/expected/asf-logo.gif.tar.gz
diff --git a/WHATSNEW b/WHATSNEW
index 0c25ab4dc..166269275 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -109,6 +109,11 @@ Fixed bugs:
Other changes:
--------------
+* Gzip and Bzip2 files can now be constructed in the fly when using
+ the tar task without having to create the intermediate tar file on
+ disk. The Untar task can also untar GZip and BZip2 files on the fly
+ without creating the intermediate tar file.
+
* New optional type, added.
* now allows control over which additional classes and interfaces
diff --git a/docs/manual/CoreTasks/tar.html b/docs/manual/CoreTasks/tar.html
index d846ec01e..60511f10a 100644
--- a/docs/manual/CoreTasks/tar.html
+++ b/docs/manual/CoreTasks/tar.html
@@ -41,8 +41,8 @@ attribute is warn
which behaves just like the gnu option except
that it produces a warning for each file path encountered that does not match
the limit.
-Note that this task does not perform compression. You might want to use the
-GZip task to prepare a .tar.gz package.
+This task can perform compression by setting the compression attribute to "gzip"
+or "bzip2".
Parameters
@@ -99,6 +99,13 @@ the limit.
("yes"/"no"). Default excludes are used when omitted.
No |
+
+ compression |
+ compression method. Allowable values are
+ "none", "gzip" and "bzip2". Default is
+ "none". |
+ No |
+
Nested Elements
diff --git a/docs/manual/CoreTasks/unzip.html b/docs/manual/CoreTasks/unzip.html
index 4dd756c5c..fb8bb6bbb 100644
--- a/docs/manual/CoreTasks/unzip.html
+++ b/docs/manual/CoreTasks/unzip.html
@@ -44,6 +44,14 @@ to perform unarchival upon.
true).
No |
+
+ compression |
+ compression method for untar. Allowable values are
+ "none", "gzip" and "bzip2". Default is
+ "none". |
+ No |
+
+
Examples
@@ -82,7 +90,7 @@ to perform unarchival upon.
-Copyright © 2001 Apache Software Foundation. All rights
+
Copyright © 2001-2002 Apache Software Foundation. All rights
Reserved.