bodewig 00/08/10 05:51:39
Modified: . WHATSNEW
docs index.html
src/main/org/apache/tools/ant/taskdefs Chmod.java
Log:
Updated documentation for <chmod> and removed <chmod>'s src attribute.
Revision Changes Path
1.19 +3 -1 jakarta-ant/WHATSNEW
Index: WHATSNEW
===================================================================
RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- WHATSNEW 2000/08/10 12:30:17 1.18
+++ WHATSNEW 2000/08/10 12:51:34 1.19
@@ -17,13 +17,15 @@
* the class attribute of <java> has been removed.
+* the src attribute of <chmod> has been removed.
+
* <patch> and <javadoc> have lost some of their attributes.
* <java> and <cvs> have lost some undocumented attributes.
* the Unix antRun script would search for command.sh in the directory
it changed to and invoke this instead of command if present. This
-beahvior has been dropped.
+behavior has been dropped.
Other changes:
--------------
1.77 +32 -18 jakarta-ant/docs/index.html
Index: index.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/index.html,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- index.html 2000/08/10 12:30:19 1.76
+++ index.html 2000/08/10 12:51:34 1.77
@@ -906,18 +906,16 @@
<hr>
<h2><a name="chmod">Chmod</a></h2>
<h3>Description</h3>
-<p>Changes the permissions of a file or all files inside a specified
directory. Right now it has efect only under Unix.
+<p>Changes the permissions of a file or all files inside specified
directories. Right now it has efect only under Unix.
The permissions are also UNIX style, like the argument for the chmod
command.</p>
-<p>It is possible to refine the set of files whose permissions are changed.
This can be
-done with the <i>includes</i>, <i>includesfile</i>, <i>excludes</i>,
<i>excludesfile</i> and <i>defaultexcludes</i>
-attributes. With the <i>includes</i> or <i>includesfile</i> attribute you
specify the files you want to
-have included by using patterns. The <i>exclude</i> or <i>excludesfile</i>
attribute is used to specify
-the files you want to have excluded. This is also done with patterns. And
-finally with the <i>defaultexcludes</i> attribute, you can specify whether
you
-want to use default exclusions or not. See the section on <a
-href="#directorybasedtasks">directory based tasks</a>, on how the
-inclusion/exclusion of files works, and how to write patterns. The patterns
are
-relative to the <i>dir</i> directory.</p>
+<p>See the section on <a href="#directorybasedtasks">directory based
+tasks</a>, on how the inclusion/exclusion of files works, and how to
+write patterns.</p>
+<p>This task holds an implicit <a href="#fileset">FileSet</a> and
+supports all of FileSet's attributes and nested elements
+directly. More FileSets can be specified using nested
+<code><fileset></code> or <code><filesetref></code>
+elements.</p>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
@@ -929,7 +927,7 @@
<td valign="top">file</td>
<td valign="top">the file or single directory of which the permissions
must be changed.</td>
- <td valign="top" valign="middle" rowspan="2">exactly one of the two</td>
+ <td valign="top" valign="middle" rowspan="2">exactly one of the two or
nested <code><fileset></code> elements.</td>
</tr>
<tr>
<td valign="top">dir</td>
@@ -937,12 +935,6 @@
must be changed.</td>
</tr>
<tr>
- <td valign="top">src</td>
- <td valign="top">the file or single directory of which the permissions
- must be changed (<b>deprecated</b>, use <i>file</i> instead).</td>
- <td valign="top" align="center">No</td>
- </tr>
- <tr>
<td valign="top">perm</td>
<td valign="top">the new permissions.</td>
<td valign="top" align="center">Yes</td>
@@ -977,6 +969,12 @@
("yes"/"no"). Default excludes are used when
omitted.</td>
<td valign="top" align="center">No</td>
</tr>
+ <tr>
+ <td valign="top">parallel</td>
+ <td valign="top">process all specified files using a single
+ <code>chmod</code> command. Defaults to true.</td>
+ <td valign="top" align="center">No</td>
+ </tr>
</table>
<h3>Examples</h3>
<blockquote>
@@ -985,12 +983,28 @@
</blockquote>
<p>makes the "start.sh" file readable and executable for anyone on
a
UNIX system.</p>
+<blockquote>
<pre>
<chmod dir="${dist}/bin" perm="ugo+rx"
includes="**/*.sh" />
</pre>
</blockquote>
<p>makes all ".sh" files below <code>${dist}/bin</code>
readable and executable for anyone on a UNIX system.</p>
+<blockquote>
+<pre>
+<chmod perm="g+w" />
+ <fileset dir="shared/sources1" >
+ <exclude name="**/trial/**" />
+ </fileset>
+ <filesetref refid="other.shared.sources" />
+</chmod>
+</pre>
+</blockquote>
+<p>makes all files below <code>shared/sources1</code> (except those
+below any directory named trial) writable for members of the same
+group on a UNIX system. In addition all files belonging to a FileSet
+with <code>ID</code> <code>other.shared.sources</code> get the same
+permissions.</p>
<hr>
<h2><a name="copydir">Copydir</a></h2>
<h3>Description</h3>
1.7 +1 -1
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Chmod.java
Index: Chmod.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Chmod.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Chmod.java 2000/08/01 09:18:39 1.6
+++ Chmod.java 2000/08/10 12:51:38 1.7
@@ -89,7 +89,7 @@
defaultSet.setDir(src);
}
- public void setSrc(File src) {
+ public void XsetSrc(File src) {
log("The src attribute is deprecated. " +
"Please use the file attribute.",
Project.MSG_WARN);