Browse Source

Add destfile attribute to <gzip> and <bzip2>.

PR: 11102


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274478 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
80bf50a177
5 changed files with 24 additions and 14 deletions
  1. +4
    -4
      build.xml
  2. +9
    -5
      docs/manual/CoreTasks/pack.html
  3. +1
    -2
      docs/manual/CoreTasks/war.html
  4. +1
    -2
      docs/manual/CoreTasks/zip.html
  5. +9
    -1
      src/main/org/apache/tools/ant/taskdefs/Pack.java

+ 4
- 4
build.xml View File

@@ -1213,9 +1213,9 @@
<exclude name="${dist.name}/bin/*.py"/>
</tarfileset>
</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"/>
<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"/>
<delete file="${dist.base}/bin/${dist.name}-bin.tar"/>
<delete dir="${dist.name}"/>
@@ -1253,9 +1253,9 @@
<exclude name="${dist.name}/build.sh"/>
</tarfileset>
</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"/>
<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"/>
<delete file="${dist.base}/src/${dist.name}-src.tar"/>
<delete dir="${dist.name}"/>


+ 9
- 5
docs/manual/CoreTasks/pack.html View File

@@ -24,21 +24,25 @@ file is newer.</p>
<td valign="top">the file to gzip/bzip.</td>
<td align="center" valign="top">Yes</td>
</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>
<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>
</table>
<h3>Examples</h3>
<blockquote>
<p><code>&lt;gzip src=&quot;test.tar&quot; zipfile=&quot;test.tar.gz&quot;/&gt;</code></p>
<p><code>&lt;gzip src=&quot;test.tar&quot; destfile=&quot;test.tar.gz&quot;/&gt;</code></p>
</blockquote>
<blockquote>
<p><code>&lt;bzip2 src=&quot;test.tar&quot; zipfile=&quot;test.tar.bz2&quot;/&gt;</code></p>
<p><code>&lt;bzip2 src=&quot;test.tar&quot; destfile=&quot;test.tar.bz2&quot;/&gt;</code></p>
</blockquote>
<hr>
<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2003 Apache Software Foundation. All rights
Reserved.</p>

</body>


+ 1
- 2
docs/manual/CoreTasks/war.html View File

@@ -28,13 +28,12 @@ attributes of zipfilesets in a Zip or Jar task.)</p>
<tr>
<td valign="top">destfile</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>
<td valign="top">warfile</td>
<td valign="top"><i>Deprecated<i> name of the file to create
-use <tt>destfile</tt> instead.</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">webxml</td>


+ 1
- 2
docs/manual/CoreTasks/zip.html View File

@@ -76,12 +76,11 @@ versions of zip and unzip for many Unix and Unix-like systems.</p>
<tr>
<td valign="top">destfile</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>
<td valign="top">zipfile</td>
<td valign="top">the <i>deprecated</i> old name of destfile.</td>
<td align="center" valign="top">Yes</td>
</tr>
<tr>
<td valign="top">basedir</td>


+ 9
- 1
src/main/org/apache/tools/ant/taskdefs/Pack.java View File

@@ -1,7 +1,7 @@
/*
* 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.
*
* Redistribution and use in source and binary forms, with or without
@@ -84,6 +84,14 @@ public abstract class Pack extends Task {
this.zipFile = zipFile;
}

/**
* the required destination file.
* @param zipFile
*/
public void setDestfile(File zipFile) {
setZipfile(zipFile);
}

/**
* the file to compress; required.
* @param src


Loading…
Cancel
Save