donaldp 01/09/12 07:21:43
Modified: . WHATSNEW
docs/manual/CoreTasks jar.html war.html zip.html
src/main/org/apache/tools/ant/taskdefs Jar.java War.java
Zip.java
Log:
Unify the attribute of the archive to "file" rather than having three
separate attributes (zipfile, jarfile and warfile).
Revision Changes Path
1.148 +3 -0 jakarta-ant/WHATSNEW
Index: WHATSNEW
===================================================================
RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -r1.147 -r1.148
--- WHATSNEW 2001/08/30 13:26:36 1.147
+++ WHATSNEW 2001/09/12 14:21:43 1.148
@@ -7,6 +7,9 @@
Other changes:
--------------
+* The attributes zipfile, jarfile and warfile (from the Zip, Jar and War
tasks)
+ have been deprecated and supersceded by a new attribute "file".
+
Fixed bugs:
-----------
1.8 +5 -5 jakarta-ant/docs/manual/CoreTasks/jar.html
Index: jar.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/manual/CoreTasks/jar.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- jar.html 2001/09/08 01:05:17 1.7
+++ jar.html 2001/09/12 14:21:43 1.8
@@ -56,7 +56,7 @@
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
- <td valign="top">jarfile</td>
+ <td valign="top">file</td>
<td valign="top">the jar-file to create.</td>
<td valign="top" align="center">Yes</td>
</tr>
@@ -138,17 +138,17 @@
fileset includes a file named <code>MANIFEST.MF</code>, the file is
ignored and you will get a warning.</p>
<h3>Examples</h3>
-<pre> <jar jarfile="${dist}/lib/app.jar"
basedir="${build}/classes"/></pre>
+<pre> <jar file="${dist}/lib/app.jar"
basedir="${build}/classes"/></pre>
<p>jars all files in the <code>${build}/classes</code> directory into a file
called <code>app.jar</code> in the <code>${dist}/lib</code> directory.</p>
-<pre> <jar jarfile="${dist}/lib/app.jar"
+<pre> <jar file="${dist}/lib/app.jar"
basedir="${build}/classes"
excludes="**/Test.class"
/></pre>
<p>jars all files in the <code>${build}/classes</code> directory into a file
called <code>app.jar</code> in the <code>${dist}/lib</code> directory. Files
with the name <code>Test.class</code> are excluded.</p>
-<pre> <jar jarfile="${dist}/lib/app.jar"
+<pre> <jar file="${dist}/lib/app.jar"
basedir="${build}/classes"
includes="mypackage/test/**"
excludes="**/Test.class"
@@ -157,7 +157,7 @@
called <code>app.jar</code> in the <code>${dist}/lib</code> directory. Only
files under the directory <code>mypackage/test</code> are used, and files
with
the name <code>Test.class</code> are excluded.</p>
-<pre> <jar jarfile="${dist}/lib/app.jar">
+<pre> <jar file="${dist}/lib/app.jar">
<fileset dir="${build}/classes"
excludes="**/Test.class"
/>
1.7 +2 -2 jakarta-ant/docs/manual/CoreTasks/war.html
Index: war.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/manual/CoreTasks/war.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- war.html 2001/08/30 13:23:13 1.6
+++ war.html 2001/09/12 14:21:43 1.7
@@ -26,7 +26,7 @@
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
- <td valign="top">warfile</td>
+ <td valign="top">file</td>
<td valign="top">the war-file to create.</td>
<td valign="top" align="center">Yes</td>
</tr>
@@ -140,7 +140,7 @@
</pre>
then the war file <code>myapp.war</code> created with
<pre>
-<war warfile="myapp.war"
webxml="src/metadata/myapp.xml">
+<war file="myapp.war"
webxml="src/metadata/myapp.xml">
<fileset dir="src/html/myapp"/>
<fileset dir="src/jsp/myapp"/>
<lib dir="thirdparty/libs">
1.7 +7 -7 jakarta-ant/docs/manual/CoreTasks/zip.html
Index: zip.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/manual/CoreTasks/zip.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- zip.html 2001/09/08 01:05:17 1.6
+++ zip.html 2001/09/12 14:21:43 1.7
@@ -57,7 +57,7 @@
<td valign="top" align="center"><b>Required</b></td>
</tr>
<tr>
- <td valign="top">zipfile</td>
+ <td valign="top">file</td>
<td valign="top">the zip-file to create.</td>
<td align="center" valign="top">Yes</td>
</tr>
@@ -142,12 +142,12 @@
for inclusion in the archive.</p>
<h3>Examples</h3>
-<pre> <zip zipfile="${dist}/manual.zip"
+<pre> <zip file="${dist}/manual.zip"
basedir="htdocs/manual"
/></pre>
<p>zips all files in the <code>htdocs/manual</code> directory into a file
called <code>manual.zip</code>
in the <code>${dist}</code> directory.</p>
-<pre> <zip zipfile="${dist}/manual.zip"
+<pre> <zip file="${dist}/manual.zip"
basedir="htdocs/manual"
update="true"
/></pre>
@@ -155,27 +155,27 @@
in the <code>${dist}</code> directory. If <code>manual.zip</code>
doesn't exist, it is created; otherwise it is updated with the
new/changed files.</p>
-<pre> <zip zipfile="${dist}/manual.zip"
+<pre> <zip file="${dist}/manual.zip"
basedir="htdocs/manual"
excludes="mydocs/**, **/todo.html"
/></pre>
<p>zips all files in the <code>htdocs/manual</code> directory. Files in the
directory <code>mydocs</code>,
or files with the name <code>todo.html</code> are excluded.</p>
-<pre> <zip zipfile="${dist}/manual.zip"
+<pre> <zip file="${dist}/manual.zip"
basedir="htdocs/manual"
includes="api/**/*.html"
excludes="**/todo.html"
/></pre>
<p>zips all files in the <code>htdocs/manual</code> directory. Only html
files under the directory <code>api</code>
are zipped, and files with the name <code>todo.html</code> are excluded.</p>
-<pre> <zip zipfile="${dist}/manual.zip">
+<pre> <zip file="${dist}/manual.zip">
<fileset dir="htdocs/manual"/>
<fileset dir="." includes="ChangeLog.txt"/>
</zip></pre>
<p>zips all files in the <code>htdocs/manual</code> directory, and also adds
the file <code>ChangeLog.txt</code> in the
current directory. <code>ChangeLog.txt</code> will be added to the top of
the ZIP file, just as if
it had been located at <code>htdocs/manual/ChangeLog.txt</code>.</p>
-<pre> <zip zipfile="${dist}/manual.zip">
+<pre> <zip file="${dist}/manual.zip">
<zipfileset dir="htdocs/manual"
prefix="docs/user-guide"/>
<zipfileset dir="." includes="ChangeLog27.txt"
fullpath="docs/ChangeLog.txt"/>
<zipfileset src="examples.zip"
includes="**/*.html" prefix="docs/examples"/>
1.23 +2 -1
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Jar.java
Index: Jar.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Jar.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- Jar.java 2001/08/18 14:59:39 1.22
+++ Jar.java 2001/09/12 14:21:43 1.23
@@ -83,7 +83,8 @@
}
public void setJarfile(File jarFile) {
- super.setZipfile(jarFile);
+ log("DEPRECATED - The jarfile attribute is deprecated. Use file
attribute instead.");
+ super.setFile(jarFile);
}
public void addConfiguredManifest(Manifest newManifest) throws
ManifestException {
1.12 +2 -1
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/War.java
Index: War.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/War.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- War.java 2001/04/23 16:12:10 1.11
+++ War.java 2001/09/12 14:21:43 1.12
@@ -78,7 +78,8 @@
}
public void setWarfile(File warFile) {
- super.setZipfile(warFile);
+ log("DEPRECATED - The warfile attribute is deprecated. Use file
attribute instead.");
+ super.setFile(warFile);
}
public void setWebxml(File descr) {
1.48 +14 -1
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java
Index: Zip.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- Zip.java 2001/08/03 14:15:40 1.47
+++ Zip.java 2001/09/12 14:21:43 1.48
@@ -102,9 +102,22 @@
/**
* This is the name/location of where to
* create the .zip file.
+ *
+ * @deprecated Use setFile() instead
*/
public void setZipfile(File zipFile) {
- this.zipFile = zipFile;
+ log("DEPRECATED - The zipfile attribute is deprecated. Use file
attribute instead.");
+ setFile( zipFile );
+ }
+
+ /**
+ * This is the name/location of where to
+ * create the .zip file.
+ *
+ * @deprecated Use setFile() instead
+ */
+ public void setFile(File file) {
+ this.zipFile = file;
}
/**