From e4f004d939e26bd63906121996b3dd5d50d76734 Mon Sep 17 00:00:00 2001
From: Stefan Bodewig
Date: Tue, 24 Jun 2003 09:16:10 +0000
Subject: [PATCH] Add support for nested dirsets to and thus to a
couple of subclass-tasks as well.
PR: 20687
Submitted by: Gus Heck
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274696 13f79535-47bb-0310-9956-ffa450edef68
---
WHATSNEW | 14 +++---
docs/manual/CoreTasks/apply.html | 17 ++++++--
docs/manual/CoreTasks/chmod.html | 43 +++++++++++++++----
docs/manual/OptionalTasks/attrib.html | 12 ++++--
docs/manual/OptionalTasks/chgrp.html | 38 +++++++++++++---
docs/manual/OptionalTasks/chown.html | 33 ++++++++++++--
.../apache/tools/ant/taskdefs/ExecuteOn.java | 35 +++++++++++++--
7 files changed, 154 insertions(+), 38 deletions(-)
diff --git a/WHATSNEW b/WHATSNEW
index 334839934..efe58a94c 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -335,13 +335,13 @@ Other changes:
* has a new attribute encoding. Bugzilla Report 15434.
* has new attributes user and password for SMTP auth.
-maillogger can also use this.
-The implementation only with JavaMail (encoding="MIME").
-Implementation with plain mail remains to do.
-Bugzilla Report 5969.
+ maillogger can also use this.
+ The implementation only works with JavaMail (encoding="MIME").
+ Implementation with plain mail remains to do.
+ Bugzilla Report 5969.
* and mailloger support SMTP over TLS/SSL
-Bugzilla Report 19180.
+ Bugzilla Report 19180.
* can now be defined in the main body of a project
and referred to with refid="xyz". Bugzilla Report 17007.
@@ -404,8 +404,8 @@ Bugzilla Report 19180.
* With the new addsourcefile attribute, you can make ommit the
source file names from the command line. Bugzilla Report 13654.
-* and now support nested s as well.
- Bugzilla Report 15929.
+* and now support nested s as well as s.
+ Bugzilla Reports 15929 and 20687.
* and will display a summary if you set the new
verbose attribute to true. Bugzilla Report 19883.
diff --git a/docs/manual/CoreTasks/apply.html b/docs/manual/CoreTasks/apply.html
index 1843f11fb..154fb42bc 100644
--- a/docs/manual/CoreTasks/apply.html
+++ b/docs/manual/CoreTasks/apply.html
@@ -15,9 +15,10 @@ compatibility.
the command is only executed when Ant is run on one of the specified operating
systems.
The files and/or directories of a number of FileSets or FileLists are passed as arguments
-to the system command.
+href="../CoreTypes/fileset.html">FileSets, DirSets (since Ant 1.6)
+or FileLists (since Ant
+1.6) are passed as arguments to the system command.
If you specify a nested mapper and the dest attribute,
the timestamp of each source file is compared to the timestamp of a
@@ -137,7 +138,10 @@ one mapper.
One of file, dir or
both. If set to file, only the names of plain
files will be sent to the command. If set to dir, only
- the names of directories are considered. |
+ the names of directories are considered.
+ Note: The type attribute does not apply to
+ nested dirsets - dirsets always implicitly
+ assume type to be dir.
No, default is file |
@@ -191,6 +195,11 @@ elements to define the files for this task and refer to
You can use any number of nested <filelist>
elements to define the files for this task and refer to
<filelist>
s defined elsewhere.
+dirset
+Since Ant 1.6
+You can use any number of nested <dirset>
+elements to define the directories for this task and refer to
+<dirset>
s defined elsewhere.
arg
Command line arguments should be specified as nested
<arg>
elements. See See the section on directory based
tasks, on how the inclusion/exclusion of files works, and how to
write patterns.
-This task holds an implicit FileSet and
-supports all of FileSet's attributes and nested elements
-directly. More FileSets can be specified using nested
-<fileset>
elements.
+
+This task holds an implicit FileSet and supports all of
+FileSet's attributes and nested elements directly. More sets can be
+specified using nested <fileset>
or
+<dirset>
(since Ant 1.6) elements.
Starting with Ant 1.6, this task also supports nested filelists.
@@ -75,7 +77,10 @@ href="../CoreTypes/filelist.html">filelists.
One of file, dir or
both. If set to file, only the permissions of
plain files are going to be changed. If set to dir, only
- the directories are considered. |
+ the directories are considered.
+ Note: The type attribute does not apply to
+ nested dirsets - dirsets always implicitly
+ assume type to be dir.
No, default is file |
@@ -100,7 +105,8 @@ href="../CoreTypes/filelist.html">filelists.
UNIX system.
- <chmod dir="${dist}/bin" perm="ugo+rx" includes="**/*.sh"/>
+<chmod dir="${dist}/bin" perm="ugo+rx"
+ includes="**/*.sh"/>
makes all ".sh" files below ${dist}/bin
@@ -120,8 +126,29 @@ 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 id
other.shared.sources
get the same
permissions.
-
Copyright © 2000-2003 Apache Software Foundation. All rights
-Reserved.
+
+
+
+<chmod perm="go-rwx" type="file">
+ <fileset dir="/web">
+ <include name="**/*.cgi"/>
+ <include name="**/*.old"/>
+ </fileset>
+ <dirset dir="/web">
+ <include name="**/private_*"/>
+ </dirset>
+</chmod>
+
+
+
+keeps non-owners from touching cgi scripts, files with a .old
+extension or directories begining with private_
. A directory
+ending in .old
or a file begining with private_ would remain
+unaffected.
+
+
+Copyright © 2000-2003 Apache Software Foundation.
+All rights Reserved.