PR: 11102 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274478 13f79535-47bb-0310-9956-ffa450edef68master
@@ -1213,9 +1213,9 @@ | |||||
<exclude name="${dist.name}/bin/*.py"/> | <exclude name="${dist.name}/bin/*.py"/> | ||||
</tarfileset> | </tarfileset> | ||||
</tar> | </tar> | ||||
<gzip zipfile="${dist.base}/bin/${dist.name}-bin.tar.gz" | |||||
<gzip destfile="${dist.base}/bin/${dist.name}-bin.tar.gz" | |||||
src="${dist.base}/bin/${dist.name}-bin.tar"/> | src="${dist.base}/bin/${dist.name}-bin.tar"/> | ||||
<bzip2 zipfile="${dist.base}/bin/${dist.name}-bin.tar.bz2" | |||||
<bzip2 destfile="${dist.base}/bin/${dist.name}-bin.tar.bz2" | |||||
src="${dist.base}/bin/${dist.name}-bin.tar"/> | src="${dist.base}/bin/${dist.name}-bin.tar"/> | ||||
<delete file="${dist.base}/bin/${dist.name}-bin.tar"/> | <delete file="${dist.base}/bin/${dist.name}-bin.tar"/> | ||||
<delete dir="${dist.name}"/> | <delete dir="${dist.name}"/> | ||||
@@ -1253,9 +1253,9 @@ | |||||
<exclude name="${dist.name}/build.sh"/> | <exclude name="${dist.name}/build.sh"/> | ||||
</tarfileset> | </tarfileset> | ||||
</tar> | </tar> | ||||
<gzip zipfile="${dist.base}/src/${dist.name}-src.tar.gz" | |||||
<gzip destfile="${dist.base}/src/${dist.name}-src.tar.gz" | |||||
src="${dist.base}/src/${dist.name}-src.tar"/> | src="${dist.base}/src/${dist.name}-src.tar"/> | ||||
<bzip2 zipfile="${dist.base}/src/${dist.name}-src.tar.bz2" | |||||
<bzip2 destfile="${dist.base}/src/${dist.name}-src.tar.bz2" | |||||
src="${dist.base}/src/${dist.name}-src.tar"/> | src="${dist.base}/src/${dist.name}-src.tar"/> | ||||
<delete file="${dist.base}/src/${dist.name}-src.tar"/> | <delete file="${dist.base}/src/${dist.name}-src.tar"/> | ||||
<delete dir="${dist.name}"/> | <delete dir="${dist.name}"/> | ||||
@@ -24,21 +24,25 @@ file is newer.</p> | |||||
<td valign="top">the file to gzip/bzip.</td> | <td valign="top">the file to gzip/bzip.</td> | ||||
<td align="center" valign="top">Yes</td> | <td align="center" valign="top">Yes</td> | ||||
</tr> | </tr> | ||||
<tr> | |||||
<td valign="top">destfile</td> | |||||
<td valign="top">the destination file to create.</td> | |||||
<td align="center" valign="top" rowspan="2">Exactly one of the two.</td> | |||||
</tr> | |||||
<tr> | <tr> | ||||
<td valign="top">zipfile</td> | <td valign="top">zipfile</td> | ||||
<td valign="top">the destination file.</td> | |||||
<td align="center" valign="top">Yes</td> | |||||
<td valign="top">the <i>deprecated</i> old name of destfile.</td> | |||||
</tr> | </tr> | ||||
</table> | </table> | ||||
<h3>Examples</h3> | <h3>Examples</h3> | ||||
<blockquote> | <blockquote> | ||||
<p><code><gzip src="test.tar" zipfile="test.tar.gz"/></code></p> | |||||
<p><code><gzip src="test.tar" destfile="test.tar.gz"/></code></p> | |||||
</blockquote> | </blockquote> | ||||
<blockquote> | <blockquote> | ||||
<p><code><bzip2 src="test.tar" zipfile="test.tar.bz2"/></code></p> | |||||
<p><code><bzip2 src="test.tar" destfile="test.tar.bz2"/></code></p> | |||||
</blockquote> | </blockquote> | ||||
<hr> | <hr> | ||||
<p align="center">Copyright © 2000-2002 Apache Software Foundation. All rights | |||||
<p align="center">Copyright © 2000-2003 Apache Software Foundation. All rights | |||||
Reserved.</p> | Reserved.</p> | ||||
</body> | </body> | ||||
@@ -28,13 +28,12 @@ attributes of zipfilesets in a Zip or Jar task.)</p> | |||||
<tr> | <tr> | ||||
<td valign="top">destfile</td> | <td valign="top">destfile</td> | ||||
<td valign="top">the WAR file to create.</td> | <td valign="top">the WAR file to create.</td> | ||||
<td valign="top" align="center">Yes</td> | |||||
<td align="center" valign="top" rowspan="2">Exactly one of the two.</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td valign="top">warfile</td> | <td valign="top">warfile</td> | ||||
<td valign="top"><i>Deprecated<i> name of the file to create | <td valign="top"><i>Deprecated<i> name of the file to create | ||||
-use <tt>destfile</tt> instead.</td> | -use <tt>destfile</tt> instead.</td> | ||||
<td valign="top" align="center">No</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td valign="top">webxml</td> | <td valign="top">webxml</td> | ||||
@@ -76,12 +76,11 @@ versions of zip and unzip for many Unix and Unix-like systems.</p> | |||||
<tr> | <tr> | ||||
<td valign="top">destfile</td> | <td valign="top">destfile</td> | ||||
<td valign="top">the zip-file to create.</td> | <td valign="top">the zip-file to create.</td> | ||||
<td align="center" valign="top">Yes</td> | |||||
<td align="center" valign="top" rowspan="2">Exactly one of the two.</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td valign="top">zipfile</td> | <td valign="top">zipfile</td> | ||||
<td valign="top">the <i>deprecated</i> old name of destfile.</td> | <td valign="top">the <i>deprecated</i> old name of destfile.</td> | ||||
<td align="center" valign="top">Yes</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td valign="top">basedir</td> | <td valign="top">basedir</td> | ||||
@@ -1,7 +1,7 @@ | |||||
/* | /* | ||||
* The Apache Software License, Version 1.1 | * The Apache Software License, Version 1.1 | ||||
* | * | ||||
* Copyright (c) 2001-2002 The Apache Software Foundation. All rights | |||||
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights | |||||
* reserved. | * reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
@@ -84,6 +84,14 @@ public abstract class Pack extends Task { | |||||
this.zipFile = zipFile; | this.zipFile = zipFile; | ||||
} | } | ||||
/** | |||||
* the required destination file. | |||||
* @param zipFile | |||||
*/ | |||||
public void setDestfile(File zipFile) { | |||||
setZipfile(zipFile); | |||||
} | |||||
/** | /** | ||||
* the file to compress; required. | * the file to compress; required. | ||||
* @param src | * @param src | ||||