stevel 02/01/31 23:34:34
Modified: . build.xml
docs/manual/CoreTasks tar.html
src/main/org/apache/tools/ant/taskdefs Tar.java
src/etc/testcases/taskdefs tar.xml
Log:
adding destFile naming scheme to tar, for consistency with the zip family and
other tasks. I know Costin thinks we do this deliberately, just to break his
builds, so even though I have updated the manual and the test cases, I have
commented out the deprecated message which users should get when they use the
tarfile attribute. Which means old builds still work, but the old params are no
longer documented for new users.
Revision Changes Path
1.233 +2 -2 jakarta-ant/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-ant/build.xml,v
retrieving revision 1.232
retrieving revision 1.233
diff -u -r1.232 -r1.233
--- build.xml 29 Jan 2002 13:02:43 -0000 1.232
+++ build.xml 1 Feb 2002 07:34:33 -0000 1.233
@@ -604,7 +604,7 @@
basedir="${dist.name}/.."
includes="${dist.name}/**"/>
<tar longfile="gnu"
- tarfile="${dist.base}/bin/${dist.name}-bin.tar">
+ destfile="${dist.base}/bin/${dist.name}-bin.tar">
<tarfileset dir="${dist.name}/.." mode="755" username="ant"
group="ant">
<include name="${dist.name}/bin/ant"/>
<include name="${dist.name}/bin/antRun"/>
@@ -634,7 +634,7 @@
basedir="${dist.name}/.."
includes="${dist.name}/**"/>
<tar longfile="gnu"
- tarfile="${dist.base}/src/${dist.name}-src.tar" >
+ destfile="${dist.base}/src/${dist.name}-src.tar" >
<tarfileset dir="${dist.name}/.." mode="755" username="ant"
group="ant">
<include name="${dist.name}/bootstrap.sh"/>
<include name="${dist.name}/build.sh"/>
1.12 +3 -3 jakarta-ant/docs/manual/CoreTasks/tar.html
Index: tar.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/manual/CoreTasks/tar.html,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- tar.html 10 Jan 2002 08:48:29 -0000 1.11
+++ tar.html 1 Feb 2002 07:34:34 -0000 1.12
@@ -52,7 +52,7 @@
<td valign="top" align="center"><b>Required</b></td>
</tr>
<tr>
- <td valign="top">tarfile</td>
+ <td valign="top">destfile</td>
<td valign="top">the tar-file to create.</td>
<td align="center" valign="top">Yes</td>
</tr>
@@ -138,7 +138,7 @@
<p>tars all files in the <code>htdocs/manual</code> directory into a file
called <code>manual.tar</code>
in the <code>${dist}</code> directory, then applies the gzip task to
compress
it.</p>
-<pre> <tar tarfile="${dist}/manual.tar"
+<pre> <tar destfile="${dist}/manual.tar"
basedir="htdocs/manual"
excludes="mydocs/**, **/todo.html"
/></pre>
@@ -147,7 +147,7 @@
or files with the name <code>todo.html</code> are excluded.</p>
<pre><tar longfile="gnu"
- tarfile="${dist.base}/${dist.name}-src.tar" >
+ destfile="${dist.base}/${dist.name}-src.tar" >
<tarfileset dir="${dist.name}/.." mode="755"
username="ant" group="ant">
<include name="${dist.name}/bootstrap.sh"/>
<include name="${dist.name}/build.sh"/>
1.22 +11 -0
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tar.java
Index: Tar.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tar.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- Tar.java 10 Jan 2002 13:59:32 -0000 1.21
+++ Tar.java 1 Feb 2002 07:34:34 -0000 1.22
@@ -129,9 +129,20 @@
/**
* This is the name/location of where to create the tar file.
+ * @deprecated for consistency with other tasks, please use setDestFile()
*/
public void setTarfile(File tarFile) {
+ //log("DEPRECATED - The tarfile attribute is deprecated. Please use
the destfile attribute instead.");
this.tarFile = tarFile;
+ }
+
+ /**
+ * Sets the destfile attribute.
+ * @since 1.22 ant 1.5
+ * @param destFile The output of the tar
+ */
+ public void setDestFile(File destFile) {
+ this.tarFile = destFile;
}
/**
1.7 +4 -4 jakarta-ant/src/etc/testcases/taskdefs/tar.xml
Index: tar.xml
===================================================================
RCS file: /home/cvs/jakarta-ant/src/etc/testcases/taskdefs/tar.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- tar.xml 5 Dec 2001 01:15:57 -0000 1.6
+++ tar.xml 1 Feb 2002 07:34:34 -0000 1.7
@@ -16,19 +16,19 @@
<target name="test4">
<touch file="test4.tar"/>
- <tar tarfile="test4.tar"
+ <tar destfile="test4.tar"
basedir="."/>
</target>
<target name="test5">
<mkdir dir="test5dir"/>
- <tar tarfile="test5.tar"
+ <tar destfile="test5.tar"
basedir="."
includes="test5dir"/>
</target>
<target name="test6">
- <tar tarfile="blah" longfile="Foo"/>
+ <tar destfile="blah" longfile="Foo"/>
</target>
<target name="cleanup">
@@ -39,7 +39,7 @@
</target>
<target name="feather">
- <tar tarfile="asf-logo.gif.tar"
+ <tar destfile="asf-logo.gif.tar"
basedir=".."
includes="asf-logo.gif" />
</target>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>