From 94d36a9fe7ba4f1bcb18a0501d57f72b75883d44 Mon Sep 17 00:00:00 2001 From: Gintas Grigelionis Date: Thu, 8 Feb 2018 16:59:52 +0100 Subject: [PATCH] Tidy tag soup, remove inlined styling, adjust formatting --- manual/Types/antlib.html | 24 +- manual/Types/assertions.html | 31 +- manual/Types/classfileset.html | 36 +- manual/Types/custom-programming.html | 15 +- manual/Types/description.html | 8 +- manual/Types/dirset.html | 6 +- manual/Types/extension.html | 13 +- manual/Types/extensionset.html | 12 +- manual/Types/filelist.html | 29 +- manual/Types/fileset.html | 11 +- manual/Types/filterchain.html | 885 +++++++++++++-------------- manual/Types/filterset.html | 116 ++-- manual/Types/mapper.html | 103 ++-- manual/Types/multirootfileset.html | 6 +- manual/Types/namespace.html | 24 +- manual/Types/patternset.html | 19 +- manual/Types/permissions.html | 24 +- manual/Types/propertyset.html | 9 +- manual/Types/redirector.html | 12 +- manual/Types/regexp.html | 13 +- manual/Types/resources.html | 272 ++++---- manual/Types/selectors-program.html | 16 +- manual/Types/selectors.html | 339 +++++----- manual/Types/tarfileset.html | 18 +- manual/Types/xmlcatalog.html | 61 +- manual/Types/zipfileset.html | 34 +- manual/stylesheets/style.css | 9 + 27 files changed, 1007 insertions(+), 1138 deletions(-) diff --git a/manual/Types/antlib.html b/manual/Types/antlib.html index 925320ae7..0e738c053 100644 --- a/manual/Types/antlib.html +++ b/manual/Types/antlib.html @@ -17,13 +17,13 @@ - + AntLib -

Antlib

+

Antlib

Description

@@ -108,7 +108,7 @@ -

Antlib namespace

+

Antlib namespace

The name space URIs with the pattern antlib:java package are given special treatment. @@ -152,14 +152,14 @@

The requirement that the resource is in the default classpath - may be removed in future versions of Ant.

+ may be removed in future versions of Ant.

-

Load antlib from inside of the buildfile

+

Load antlib from inside of the buildfile

- If you want to separate the antlib from your local Ant installation, e.g. because you - want to hold that jar in your projects SCM system, you have to specify a classpath, so + If you want to separate the antlib from your local Ant installation, e.g. because you + want to hold that jar in your projects SCM system, you have to specify a classpath, so that Ant could find that jar. The best solution is loading the antlib with <taskdef>.

@@ -168,7 +168,7 @@ <taskdef uri="antlib:net.sf.antcontrib" resource="net/sf/antcontrib/antlib.xml" classpath="path/to/ant-contrib.jar"/> - + <target name="iterate"> <antcontrib:for param="file"> <fileset dir="."/> @@ -181,10 +181,7 @@
- - - -

Current namespace

+

Current namespace

Definitions defined in antlibs may be used in antlibs. However the namespace that definitions are placed in are dependent on @@ -258,9 +255,6 @@ </project> - - - diff --git a/manual/Types/assertions.html b/manual/Types/assertions.html index e168969fd..9942b4c7d 100644 --- a/manual/Types/assertions.html +++ b/manual/Types/assertions.html @@ -24,22 +24,22 @@ -

Assertions

+

Assertions

The assertions type enables or disables the Java 1.4 assertions feature, on a whole Java program, or components of a program. It can be used in <java> and -<junit> to add extra validation to code. +<junit> to add extra validation to code.

-Assertions are covered in the +Assertions are covered in the Java SE documentation, and the Java Language Specification.

The key points to note are that a java.lang.AssertionError -is thrown when an assertion fails, and that the facility is only available +is thrown when an assertion fails, and that the facility is only available on Java 1.4 and later. To enable assertions one must set source="1.4" (or later) in <javac> when the source is being compiled, and that the code must contain assert statements to be tested. The @@ -47,20 +47,16 @@ result of such an action is code that neither compiles or runs on earlier versions of Java. For this reason Apache Ant itself currently contains no assertions.

-When assertions are enabled (or disabled) in a task through nested -assertions elements, the class loader or command line is modified with the +When assertions are enabled (or disabled) in a task through nested +assertions elements, the class loader or command line is modified with the appropriate options. This means that the JVM executed must be a Java 1.4 or later JVM, even if there are no assertions in the code. Attempting to -enable assertions on earlier VMs will result in an "Unrecognized option" -error and the JVM will not start. +enable assertions on earlier VMs will result in an "Unrecognized option" +error and the JVM will not start.

Attributes

-

- - -

- +
@@ -75,7 +71,7 @@ error and the JVM will not start.

When system assertions have been neither enabled nor disabled, then the JVM is not given any assertion information - the default action of the - current JVMs is to disable system assertions. + current JVMs is to disable system assertions.

Note also that there is no apparent documentation for what parts of the JRE come with useful assertions. @@ -87,7 +83,7 @@ JRE come with useful assertions. Enable assertions in portions of code. If neither a package nor class is specified, assertions are turned on in all (user) code.

-
Attribute Description
+
@@ -113,7 +109,7 @@ If neither a package nor class is specified, assertions are turned on in all< Disable assertions in portions of code.

-
Attribute Description
+
@@ -138,7 +134,6 @@ Disable assertions in portions of code. Because assertions are disabled by default, it only makes sense to disable assertions where they have been enabled in a parent package. -

Examples

Example: enable assertions in all user classes
@@ -190,7 +185,6 @@ Disable system assertions; enable those in the anonymous package </assertions> -
Example: referenced assertions
This type is a datatype, so you can declare assertions and use them later @@ -203,6 +197,5 @@ This type is a datatype, so you can declare assertions and use them later <assertions refid="project.assertions"/> - diff --git a/manual/Types/classfileset.html b/manual/Types/classfileset.html index a83d26602..5e7642c44 100644 --- a/manual/Types/classfileset.html +++ b/manual/Types/classfileset.html @@ -22,9 +22,9 @@ -

ClassFileSet

-

A classfileset is a specialized type of fileset which, given a set of -"root" classes, will include all of the class files upon which the +

ClassFileSet

+

A classfileset is a specialized type of fileset which, given a set of +"root" classes, will include all of the class files upon which the root classes depend. This is typically used to create a jar with all of the required classes for a particular application.

@@ -37,14 +37,13 @@ is expected. This type requires the BCEL library.

-

Attributes

The class fileset support the following attributes in addition -to those supported by the -standard fileset: +to those supported by the +standard fileset:

- -
Attribute Description
+ +
@@ -64,7 +63,7 @@ to those supported by the When more than one root class is required, multiple nested <root> elements may be used

-
Attribute Description
+
@@ -79,9 +78,9 @@ may be used

RootFileSet

-A root fileset is used to add a set of root classes from a fileset. In this case the entries in -the fileset are expected to be Java class files. The name of the Java class is determined by the -relative location of the classfile in the fileset. So, the file +A root fileset is used to add a set of root classes from a fileset. In this case the entries in +the fileset are expected to be Java class files. The name of the Java class is determined by the +relative location of the classfile in the fileset. So, the file org/apache/tools/ant/Project.class corresponds to the Java class org.apache.tools.ant.Project.

@@ -92,9 +91,9 @@ relative location of the classfile in the fileset. So, the file </classfileset> -

This example creates a fileset containing all the class files upon which the -org.apache.tools.ant.Project class depends. This fileset could -then be used to create a jar. +

This example creates a fileset containing all the class files upon which the +org.apache.tools.ant.Project class depends. This fileset could +then be used to create a jar.

@@ -109,11 +108,8 @@ then be used to create a jar.
 </classfileset>
 
-

This example constructs the classfileset using all the class with names starting with Project -in the org.apache.tools.ant package

- - +

This example constructs the classfileset using all the class with names starting with Project +in the org.apache.tools.ant package

- diff --git a/manual/Types/custom-programming.html b/manual/Types/custom-programming.html index 96bade33c..3010b83c7 100644 --- a/manual/Types/custom-programming.html +++ b/manual/Types/custom-programming.html @@ -16,7 +16,7 @@ --> - + Custom Components @@ -57,7 +57,7 @@ After the class has been written, it is added to the ant system by using <typedef>.

-

Custom Conditions

+

Custom Conditions

Custom conditions are datatypes that implement org.apache.tools.ant.taskdefs.condition.Condition. @@ -112,7 +112,7 @@ public class AllUpperCaseCondition implements Condition { </condition> -

Custom Selectors

+

Custom Selectors

Custom selectors are datatypes that implement org.apache.tools.ant.types.selectors.FileSelector. @@ -265,12 +265,11 @@ public class MatchNumberSelectors extends BaseSelectorContainer { core selectors demonstrate how to do that because they can also be used as custom selectors.

-

Once that is written, you include it in your build file by using the <custom> tag.

-
Attribute Description
+
@@ -315,7 +314,6 @@ public class MatchNumberSelectors extends BaseSelectorContainer { </fileset> -

The core selectors that can also be used as custom selectors are

@@ -351,7 +349,7 @@ public class MatchNumberSelectors extends BaseSelectorContainer {

Selects all files in the base directory and one directory below that.

-

Custom Filter Readers

+

Custom Filter Readers

Custom filter readers selectors are datatypes that implement org.apache.tools.ant.types.filters.ChainableReader. @@ -408,8 +406,5 @@ public class AddLineNumber extends ChainableReaderFilter { - -


- diff --git a/manual/Types/description.html b/manual/Types/description.html index 85942be00..0445d6198 100644 --- a/manual/Types/description.html +++ b/manual/Types/description.html @@ -24,7 +24,7 @@ -

Description

+

Description

Description

Allows for a description of the project to be specified that will be included in the output of the ant ‑projecthelp @@ -33,14 +33,12 @@ command.

Parameters

(none)

Examples

-
  
+
 <description>
-This buildfile is used to build the Foo subproject within 
+This buildfile is used to build the Foo subproject within
 the large, complex Bar project.
 </description>
 
- - diff --git a/manual/Types/dirset.html b/manual/Types/dirset.html index 0434e9c22..24adf54f7 100644 --- a/manual/Types/dirset.html +++ b/manual/Types/dirset.html @@ -24,7 +24,7 @@ -

DirSet

+

DirSet

A DirSet is a group of directories. These directories can be found in a directory tree starting in a base directory and are matched by patterns taken from a number of PatternSets @@ -41,7 +41,7 @@ elements of <patternset> directly, as well as If any of the selectors within the DirSet do not select the directory, it is not considered part of the DirSet. This makes a DirSet equivalent to an <and> selector container.

-
Attribute Description
+
@@ -148,7 +148,5 @@ using the same patterns as the above example.

Selects all directories somewhere under ${workingdir} which contain a ${markerfile}.

- - diff --git a/manual/Types/extension.html b/manual/Types/extension.html index b05c0a65c..b54d8997d 100644 --- a/manual/Types/extension.html +++ b/manual/Types/extension.html @@ -22,7 +22,7 @@ -

Extension

+

Extension

Utility type that represents either an available "Optional Package" (formerly known as "Standard Extension") as described in the manifest of a JAR file, or the requirement for such an optional package.

@@ -32,14 +32,12 @@ works with extensions as defined by the "Optional Package" specification. Optional Package Versioning in the documentation bundle for your Java2 Standard Edition package, in file guide/extensions/versioning.html or the online - -Package Versioning documentation.

+
Package Versioning documentation.

Attributes

-

The extension type supports the following attributes: -

+

The extension type supports the following attributes:

-
Attribute Description
+
@@ -107,8 +105,5 @@ Package Versioning documentation.

Extension object that just species the specification details.

- - - diff --git a/manual/Types/extensionset.html b/manual/Types/extensionset.html index f38c1ed1d..a42d8f4f0 100644 --- a/manual/Types/extensionset.html +++ b/manual/Types/extensionset.html @@ -30,8 +30,7 @@ works with extensions as defined by the "Optional Package" specification. Optional Package Versioning in the documentation bundle for your Java2 Standard Edition package, in file guide/extensions/versioning.html or online at - -Package Versioning documentation.

+
Package Versioning documentation.

Nested Elements

@@ -39,13 +38,13 @@ Package Versioning documentation.

Extension object to add to set.

fileset

-

FileSets all files contained +

FileSets all files contained contained within set that are jars and implement an extension are added to extension set.

LibFileSet

-

All files contained contained within set that are jars and implement - an extension are added to extension set. However the extension information +

All files contained contained within set that are jars and implement + an extension are added to extension set. However the extension information may be modified by attributes of libfileset

Examples

@@ -76,8 +75,5 @@ Package Versioning documentation.

- - - diff --git a/manual/Types/filelist.html b/manual/Types/filelist.html index 57c981d35..3a3f61c4d 100644 --- a/manual/Types/filelist.html +++ b/manual/Types/filelist.html @@ -24,7 +24,7 @@ -

FileList

+

FileList

FileLists are explicitly named lists of files. Whereas FileSets act as filters, returning only those files that exist in the file @@ -36,7 +36,7 @@ included in the list unchanged). FileLists can appear inside tasks that support this feature or as stand-alone types.

-
Attribute Description
+
@@ -61,7 +61,7 @@ types. white space and commas.

Since Apache Ant 1.6.2

-
Attribute Description
+
@@ -72,13 +72,13 @@ types. -
Attribute DescriptionThe name of the file. Yes
+

Examples

-<filelist 
-    id="docfiles" 
+<filelist
+    id="docfiles"
     dir="${doc.src}"
-    files="foo.xml,bar.xml"/> 
+    files="foo.xml,bar.xml"/>
 

The files ${doc.src}/foo.xml and @@ -87,24 +87,24 @@ actually exist.

-<filelist 
-    id="docfiles" 
+<filelist
+    id="docfiles"
     dir="${doc.src}"
     files="foo.xml
-           bar.xml"/> 
+           bar.xml"/>
 

Same files as the example above.

-<filelist refid="docfiles"/> 
+<filelist refid="docfiles"/>
 

Same files as the example above.

-<filelist 
-    id="docfiles" 
+<filelist
+    id="docfiles"
     dir="${doc.src}">
     <file name="foo.xml"/>
     <file name="bar.xml"/>
@@ -113,8 +113,5 @@ actually exist.
 
 

Same files as the example above.

- - - diff --git a/manual/Types/fileset.html b/manual/Types/fileset.html index 3d901723a..47fcbec92 100644 --- a/manual/Types/fileset.html +++ b/manual/Types/fileset.html @@ -24,7 +24,7 @@ -

FileSet

+

FileSet

A FileSet is a group of files. These files can be found in a directory tree starting in a base directory and are matched by patterns taken from a number of If any of the selectors within the FileSet do not select the file, the file is not considered part of the FileSet. This makes a FileSet equivalent to an <and> selector container.

- +
@@ -115,7 +115,7 @@ equivalent to an <and> selector container.

Attribute Description
-

Note: All files/directories for which +

 <fileset dir="src" includes="main/" />
 
-

Selects all files in src/main (e.g. src/main/Foo.java or +

Selects all files in src/main (e.g. src/main/Foo.java or src/main/application/Bar.java).

- - - diff --git a/manual/Types/filterchain.html b/manual/Types/filterchain.html index 8f4066f10..7159185b7 100644 --- a/manual/Types/filterchain.html +++ b/manual/Types/filterchain.html @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. --> - - @@ -124,11 +122,11 @@ nested elements.
TailFilter
DeleteCharacters
ConcatFilter
+SortFilter
TokenFilter
FixCRLF
-SortFilter
-

FilterReader

+

FilterReader

The filterreader element is the generic way to define a filter. User defined filter elements are @@ -142,16 +140,16 @@ extend java.io.FilterReader. If the custom filter reader needs to be parameterized, it must implement org.apache.tools.type.Parameterizable. - +
- - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
classnameThe class name of the filter reader.YesclassnameThe class name of the filter reader.Yes
@@ -164,7 +162,7 @@ attributes - name, type and value. The following FilterReaders are supplied with the default distribution. -

ClassConstants

+

ClassConstants

This filters basic constants defined in a Java Class, and outputs them in lines composed of the format name=value. @@ -210,12 +208,12 @@ prepending the names with a prefix. </filterchain> </loadproperties>

-

EscapeUnicode

+

EscapeUnicode

This filter converts its input by changing all non US-ASCII characters into their equivalent unicode escape backslash u plus 4 digits.

-

since Ant 1.6

+

Since Ant 1.6

Example:

@@ -237,7 +235,7 @@ Convenience method: </loadproperties> -

ExpandProperties

+

ExpandProperties

If the data contains data that represents Ant properties (of the form ${...}), that is substituted @@ -290,28 +288,28 @@ Convenience method: </loadfile> -

HeadFilter

+

HeadFilter

This filter reads the first few lines from the data supplied to it. - +
- - - + + + - - + - + - - + - +
Parameter NameParameter ValueRequiredParameter NameParameter ValueRequired
linesNumber of lines to be read. + linesNumber of lines to be read. Defaults to "10"
A negative value means that all lines are passed (useful with skip)
NoNo
skipNumber of lines to be skipped (from the beginning). + skipNumber of lines to be skipped (from the beginning). Defaults to "0"NoNo

@@ -350,27 +348,27 @@ in the property src.file.head. (Means: lines 3-17) See the testcases for more examples (src\etc\testcases\filters\head-tail.xml in the source distribution). -

LineContains

+

LineContains

This filter includes only those lines that contain all the user-specified strings. - +
- - - + + + - - - + + + - - - + + +
Parameter TypeParameter ValueRequiredParameter TypeParameter ValueRequired
containsSubstring to be searched for.YescontainsSubstring to be searched for.Yes
negateWhether to select - non-matching lines only. Since Ant 1.7NonegateWhether to select + non-matching lines only. Since Ant 1.7No

@@ -409,38 +407,38 @@ Negation: </linecontains> -

LineContainsRegExp

+

LineContainsRegExp

Filter which includes only those lines that contain the user-specified regular expression matching strings. - +
- - - + + + - - + - + - - - + + + - - - + + +
Parameter TypeParameter ValueRequiredParameter TypeParameter ValueRequired
regexpRegular expression to be searched for.
+
regexpRegular expression to be searched for.
Starting with 1.10.2 this also works as an attribute on linecontainsregexp, in earlier versions of Ant you must use a nested element when using the convenience method.
YesYes
negateWhether to select - non-matching lines only. Since Ant 1.7NonegateWhether to select + non-matching lines only. Since Ant 1.7No
casesensitivePerform a case sensitive - match. Default is true. Since Ant 1.8.2NocasesensitivePerform a case sensitive + match. Default is true. Since Ant 1.8.2No
@@ -476,20 +474,20 @@ Negation: </linecontainsregexp> -

PrefixLines

+

PrefixLines

Attaches a prefix to every line. - +
- - - + + + - - - + + +
Parameter NameParameter ValueRequiredParameter NameParameter ValueRequired
prefixPrefix to be attached to lines.YesprefixPrefix to be attached to lines.Yes

@@ -507,22 +505,22 @@ Convenience method: <prefixlines prefix="Foo"/> -

SuffixLines

+

SuffixLines

Attaches a suffix to every line.

since Ant 1.8.0

- +
- - - + + + - - - + + +
Parameter NameParameter ValueRequiredParameter NameParameter ValueRequired
suffixSuffix to be attached to lines.YessuffixSuffix to be attached to lines.Yes

@@ -540,59 +538,59 @@ Convenience method: <suffixlines suffix="Foo"/> -

ReplaceTokens

+

ReplaceTokens

This filter reader replaces all strings that are sandwiched between begintoken and endtoken with user defined values. - +
- - - - + + + + - - - + + - + - - - + + - + - - - - + + + + - - - - + + + + - - - + + - + - - - - + + + +
Parameter TypeParameter NameParameter ValueRequiredParameter TypeParameter NameParameter ValueRequired
tokencharbegintokenString marking the + tokencharbegintokenString marking the beginning of a token. Defaults to @NoNo
tokencharendtokenString marking the + tokencharendtokenString marking the end of a token. Defaults to @NoNo
User defined String.tokenUser defined search String.YesUser defined String.tokenUser defined search String.Yes
Not applicable.propertiesfileProperties file to take tokens from.NoNot applicable.propertiesfileProperties file to take tokens from.No
Not applicable.propertiesResourceProperties resource to take tokens from. + Not applicable.propertiesResourceProperties resource to take tokens from. Note this only works is you use the "convenience" <replacetokens> syntax. since Ant 1.8.0NoNo
User defined String.valueReplace-value for the tokenNoUser defined String.valueReplace-value for the tokenNo

@@ -680,7 +678,7 @@ baz=xyzzy </loadfile> -

StripJavaComments

+

StripJavaComments

This filter reader strips away comments from the data, using Java syntax guidelines. This filter does not @@ -705,22 +703,22 @@ Convenience method: </loadfile> -

StripLineBreaks

+

StripLineBreaks

This filter reader strips away specific characters from the data supplied to it. - +
- - - + + + - - + - +
Parameter NameParameter ValueRequiredParameter NameParameter ValueRequired
linebreaksCharacters that are to + linebreaksCharacters that are to be stripped out. Defaults to "\r\n"NoNo

@@ -756,22 +754,22 @@ strips them. </loadfile> -

StripLineComments

+

StripLineComments

This filter removes all those lines that begin with strings that represent comments as specified by the user. - +
- - - + + + - - + - +
Parameter TypeParameter ValueRequiredParameter TypeParameter ValueRequired
commentStrings that identify a line as a comment + commentStrings that identify a line as a comment when they appear at the start of the line.YesYes

@@ -799,20 +797,20 @@ Convenience method: </striplinecomments> -

TabsToSpaces

+

TabsToSpaces

This filter replaces tabs with spaces - +
- - - + + + - - - + + +
Parameter NameParameter ValueRequiredParameter NameParameter ValueRequired
tablengthDefaults to "8"NotablengthDefaults to "8"No

@@ -836,28 +834,28 @@ Convenience method: </loadfile> -

TailFilter

+

TailFilter

This filter reads the last few lines from the data supplied to it. - +
- - - + + + - - + - + - - + - +
Parameter NameParameter ValueRequiredParameter NameParameter ValueRequired
linesNumber of lines to be read. + linesNumber of lines to be read. Defaults to "10"
A negative value means that all lines are passed (useful with skip)
NoNo
skipNumber of lines to be skipped (from the end). + skipNumber of lines to be skipped (from the end). Defaults to "0" NoNo

@@ -866,93 +864,70 @@ This filter reads the last few lines from the data supplied to it. With HeadFilter and TailFilter you can extract each part of a text file you want. This graphic shows the dependencies: - +
- - - - - + + - - - - - + - + - - + + + - + - - + - + - + - - + - + - - + + + - +
Content Filter ContentFilter
Line 1     - - - - + - - - - - - - - - - - - - - - - - -
 
<filterchain>
+ 
Line 1 +
<filterchain>
     <headfilter lines="2"/>
 </filterchain>
 
<filterchain>
-    <tailfilter lines="-1" skip="2"/>
-</filterchain>
 
<filterchain>
-    <headfilter lines="-1" skip="2"/>
-</filterchain>
 
<filterchain>
-    <headfilter lines="-1" skip="2"/>
+ 
+
<filterchain>
     <tailfilter lines="-1" skip="2"/>
-</filterchain>
 
<filterchain>
-    <tailfilter lines="2"/>
-</filterchain>
+</filterchain>
 
Line 2 Line 2
Line 3  Line 3 +
<filterchain>
+    <headfilter lines="-1" skip="2"/>
+</filterchain>
+
<filterchain>
+    <headfilter lines="-1" skip="2"/>
+    <tailfilter lines="-1" skip="2"/>
+</filterchain>
Line 4 Line 4
Line 5  Line 5
Lines ... Lines ...
Line 95 Line 95
Line 96  Line 96
Line 97 Line 97
Line 98  Line 98 +
<filterchain>
+    <tailfilter lines="2"/>
+</filterchain>
 
Line 99 Line 99
- -

Examples:

This stores the last 15 lines of the supplied data in the property ${src.file.tail} @@ -975,7 +950,6 @@ Convenience method: </loadfile> - This stores the last 5 lines of the first 15 lines of the supplied data in the property ${src.file.mid}
@@ -1001,7 +975,6 @@ Convenience method:
 </loadfile>
 
- This stores the last 10 lines, skipping the last 2 lines, of the supplied data in the property src.file.head. (Means: if supplied data contains 60 lines, lines 49-58 are extracted) @@ -1013,25 +986,25 @@ lines 49-58 are extracted) </loadfile> -

DeleteCharacters

+

DeleteCharacters

This filter deletes specified characters.

since Ant 1.6

This filter is only available in the convenience form.

- +
- - - + + + - - + - +
Parameter NameParameter ValueRequiredParameter NameParameter ValueRequired
chars + chars The characters to delete. This attribute is backslash enabled. YesYes

@@ -1042,28 +1015,28 @@ Delete tabs and returns from the data. <deletecharacters chars="\t\r"/> -

ConcatFilter

+

ConcatFilter

This filter prepends or appends the content file to the filtered files.

since Ant 1.6

- +
- - - + + + - - + - + - - + - +
Parameter NameParameter ValueRequiredParameter NameParameter ValueRequired
prepend + prepend The name of the file which content should be prepended to the file. NoNo
append + append The name of the file which content should be appended to the file. NoNo

@@ -1084,14 +1057,125 @@ Adds a license text before each java source: </filterchain> +

SortFilter

+

since Ant 1.8.0

+ +

The sort filter reads all lines and sorts them. The sort order can + be reversed and it is possible to specify a custom implementation of + the java.util.Comparator interface to get even more + control.

+ + + + + + + + + + + + + + + + +
Parameter NameParameter ValueRequired
reversewhether to reverse the sort order, + defaults to false. Note: this parameter is ignored if + the comparator parameter is present as well.No
comparatorClass name of a class that + implements java.util.Comparator for Strings. This + class will be used to determine the sort order of lines.No
+ +

This filter is also available using the + name sortfilter. The reverse parameter + becomes an attribute, comparator can be specified by + using a nested element.

+ +

Examples:

+ +
+  <copy todir="build">
+      <fileset dir="input" includes="*.txt"/>
+      <filterchain>
+          <sortfilter/>
+      </filterchain>
+  </copy>
+
+ +

+Sort all files *.txt from src location +into build location. The lines of each file are sorted in +ascendant order comparing the lines via the +String.compareTo(Object o) method. +

+ +
+  <copy todir="build">
+      <fileset dir="input" includes="*.txt"/>
+      <filterchain>
+          <sortfilter reverse="true"/>
+      </filterchain>
+  </copy>
+
+ +

+Sort all files *.txt from src location into reverse +order and copy them into build location. +

+ +
+  <copy todir="build">
+      <fileset dir="input" includes="*.txt"/>
+      <filterchain>
+          <filterreader classname="org.apache.tools.ant.filters.SortFilter">
+            <param name="comparator" value="org.apache.tools.ant.filters.EvenFirstCmp"/>
+          </filterreader>
+      </filterchain>
+  </copy>
+
+ +

+Sort all files *.txt from src location using as +sorting criterium EvenFirstCmp class, that sorts the file +lines putting even lines first then odd lines for example. The modified files +are copied into build location. The EvenFirstCmp, +has to an instanciable class via Class.newInstance(), +therefore in case of inner class has to be static. It also has to +implement java.util.Comparator interface, for example: +

+ +
+        package org.apache.tools.ant.filters;
+        ...(omitted)
+          public final class EvenFirstCmp implements <b>Comparator</b> {
+            public int compare(Object o1, Object o2) {
+            ...(omitted)
+            }
+          }
+
+ +

The example above is equivalent to:

+ +
+  <componentdef name="evenfirst"
+                classname="org.apache.tools.ant.filters.EvenFirstCmp"/>
+  <copy todir="build">
+      <fileset dir="input" includes="*.txt"/>
+      <filterchain>
+          <sortfilter>
+              <evenfirst/>
+          </sortfilter>
+      </filterchain>
+  </copy>
+
-

TokenFilter

+

TokenFilter

This filter tokenizes the inputstream into strings and passes these strings to filters of strings. Unlike the other filterreaders, this does not support params, only convenience methods are implemented. The tokenizer and the string filters are defined by nested elements. -

since Ant 1.6

+

Since Ant 1.6

Only one tokenizer element may be used, the LineTokenizer is the default if none are specified. A tokenizer @@ -1106,32 +1190,32 @@ outputs with its associated token delimiter (if one is present). The trailing delimiter may be overridden by the delimOutput attribute. +

Backslash interpretation

-backslash interpretation A number of attributes (including delimOutput) interpret backslash escapes. The following are understood: \n, \r, \f, \t and \\. +

- - +
- - - + + + - - + - +
AttributeDescriptionRequiredAttributeDescriptionRequired
delimOutput + delimOutput This overrides the tokendelimiter returned by the tokenizer if it is not empty. This attribute is backslash enabled. NoNo

- - The following tokenizers are provided by the default distribution. + The following tokenizers are provided by the default distribution. +

LineTokenizer
FileTokenizer
@@ -1155,42 +1239,45 @@ and \\.

ScriptFilter

- +

+ Custom tokenizers and string filters can be + declared using typedef task. +

+

Some of the filters may be used directly within a filter chain. In this case a tokenfilter is created implicitly. An extra attribute "byline" is added to the filter to specify whether to use a linetokenizer (byline="true") or a filetokenizer (byline="false"). The default is "true". -

+

-

LineTokenizer

+

LineTokenizer

This tokenizer splits the input into lines. The tokenizer delimits lines by "\r", "\n" or "\r\n". This is the default tokenizer. - +
- - - + + + - - + - +
AttributeDescriptionRequiredAttributeDescriptionRequired
includeDelims + includeDelims Include the line endings in the token. Default is false. NoNo
-

Examples:

+
Examples:
Convert input current line endings to unix style line endings.
 <tokenfilter delimoutput="\n"/>
 
- Remove blank lines.
 <tokenfilter>
@@ -1199,10 +1286,10 @@ Remove blank lines.
 
 
-

FileTokenizer

+

FileTokenizer

This tokenizer treats all the input as a token. So be careful not to use this on very large input. -

Examples:

+
Examples:
Replace the first occurrence of package with //package.
@@ -1214,7 +1301,7 @@ Replace the first occurrence of package with //package.
 </tokenfilter>
 
-

StringTokenizer

+

StringTokenizer

This tokenizer is based on java.util.StringTokenizer. It splits up the input into strings separated by white space, or by a specified list of delimiting characters. @@ -1222,19 +1309,19 @@ If the stream starts with delimiter characters, the first token will be the empty string (unless the delimsaretokens attribute is used). - +
- - - + + + - - + - + @@ -1253,16 +1340,16 @@ attribute is used). - - + - +
AttributeDescriptionRequiredAttributeDescriptionRequired
delimsThe delimiter characters. White space + delimsThe delimiter characters. White space is used if this is not set. (White space is defined in this case by java.lang.Character.isWhitespace()). NoNo
delimsaretokensNo
includeDelims + includeDelims Include the delimiters in the token. Default is false. NoNo
-

Examples:

+
Examples:
Surround each non space token with a "[]". @@ -1274,20 +1361,20 @@ Surround each non space token with a "[]". -

ReplaceString

+

ReplaceString

This is a simple filter to replace strings. This filter may be used directly within a filterchain. - +
- - - + + + - - - + + + @@ -1298,7 +1385,7 @@ This filter may be used directly within a filterchain.
AttributeDescriptionRequiredAttributeDescriptionRequired
fromThe string that must be replaced.YesfromThe string that must be replaced.Yes
to
-

Examples:

+
Examples:
Replace "sun" with "moon". @@ -1308,24 +1395,24 @@ Replace "sun" with "moon". </tokenfilter> -

ContainsString

+

ContainsString

This is a simple filter to filter tokens that contains a specified string. - +
- - - + + + - - - + + +
AttributeDescriptionRequiredAttributeDescriptionRequired
containsThe string that the token must contain.YescontainsThe string that the token must contain.Yes
-

Examples:

+
Examples:
Include only lines that contain "foo"; @@ -1336,7 +1423,7 @@ Include only lines that contain "foo"; -

ReplaceRegex

+

ReplaceRegex

This string filter replaces regular expressions. This filter may be used directly within a filterchain.

@@ -1344,33 +1431,33 @@ This filter may be used directly within a filterchain. concerning the choice of the implementation.

- +
- - - + + + - - + - + - - + - + - - + - +
AttributeDescriptionRequiredAttributeDescriptionRequired
patternThe regular expression pattern to match in + patternThe regular expression pattern to match in the token.YesYes
replaceThe substitution pattern to replace the matched + replaceThe substitution pattern to replace the matched regular expression. When omitted an empty string is used.NoNo
flagsSee + flagsSee ReplaceRegexp for an explanation of regex flags.NoNo
-

Examples:

+
Examples:
Replace all occurrences of "hello" with "world", ignoring case. @@ -1381,7 +1468,7 @@ Replace all occurrences of "hello" with "world", ignoring case. -

ContainsRegex

+

ContainsRegex

This filters strings that match regular expressions. The filter may optionally replace the matched regular expression. This filter may be used directly within a filterchain. @@ -1390,35 +1477,35 @@ See Regexp Type concerning the choice of regular expression implementation.

- +
- - - + + + - - + - + - - + - + - - + - +
AttributeDescriptionRequiredAttributeDescriptionRequired
patternThe regular expression pattern to match in + patternThe regular expression pattern to match in the token.YesYes
replaceThe substitution pattern to replace the matched + replaceThe substitution pattern to replace the matched regular expression. When omitted the original token is returned. NoNo
flagsSee + flagsSee ReplaceRegexp for an explanation of regex flags.NoNo
-

Examples:

+
Examples:
Filter lines that contain "hello" or "world", ignoring case. @@ -1440,31 +1527,33 @@ This example replaces lines like "SUITE(TestSuite, bits);" with </tokenfilter> -

Trim

+

Trim

This filter trims whitespace from the start and end of tokens. This filter may be used directly within a filterchain. -

IgnoreBlank

+ +

IgnoreBlank

This filter removes empty tokens. This filter may be used directly within a filterchain. -

DeleteCharacters

+ +

DeleteCharacters

This filter deletes specified characters from tokens. - +
- - - + + + - - + - +
AttributeDescriptionRequiredAttributeDescriptionRequired
charsThe characters to delete. This attribute + charsThe characters to delete. This attribute is backslash enabled.YesYes
-

Examples:

+
Examples:
Delete tabs from lines, trim the lines and removes empty lines. @@ -1477,14 +1566,14 @@ Delete tabs from lines, trim the lines and removes empty lines. -

UniqFilter

+

UniqFilter

Suppresses all tokens that match their ancestor token. It is most useful if combined with a sort filter.

This filter may be used directly within a filterchain.

-

Example:

+
Example:
This suppresses duplicate lines.
@@ -1493,31 +1582,31 @@ This suppresses duplicate lines.
 </tokenfilter>
 
-

Native2AsciiFilter

+

Native2AsciiFilter

Uses the "builtin" implementation of the native2ascii task.

Replaces non-ascii characters by their Unicode-escapes or - vice-versa. Since Ant 1.9.8.

+ vice-versa. Since Ant 1.9.8

This filter may be used directly within a filterchain.

- +
- - - + + + - - + - +
AttributeDescriptionRequiredAttributeDescriptionRequired
reverseReverse the sense of the conversion, + reverseReverse the sense of the conversion, i.e. convert from ASCII to native.NoNo
-

Example:

+
Example:

This replaces all non-ASCII characters by their Unicode-escapes.

@@ -1526,12 +1615,14 @@ This suppresses duplicate lines.
 </tokenfilter>
 
-

ScriptFilter

+

ScriptFilter

+

This is an optional filter that executes a script in a Apache BSF or JSR 223 supported language.

+

See the Script task for an explanation of scripts and dependencies.

@@ -1543,17 +1634,17 @@ method replaces the current token.

This filter may be used directly within a filterchain.

- +
- - - + + + - - + - + @@ -1565,20 +1656,20 @@ Must be a supported Apache BSF or JSR 223 language - - + - + - + + global variables in the script. Since Ant 1.8.0 @@ -1600,7 +1691,7 @@ Must be a supported Apache BSF or JSR 223 language See the script task on how to use this element.

-

Examples:

+
Examples:
Convert to uppercase:
@@ -1628,13 +1719,13 @@ copying text files:
     
-

Custom tokenizers and string filters

+

Custom tokenizers and string filters

Custom string filters and tokenizers may be plugged in by extending the interfaces org.apache.tools.ant.filters.TokenFilter.Filter and org.apache.tools.ant.util.Tokenizer respectly. -They are defined the build file using <typedef/>. For +They are defined in the build file using <typedef/>. For example a string filter that capitalizes words may be declared as:
 package my.customant;
@@ -1666,118 +1757,4 @@ This may be used as follows:
   </copy>
 
- -

SortFilter

-

since Ant 1.8.0

- -

The sort filter reads all lines and sorts them. The sort order can - be reversed and it is possible to specify a custom implementation of - the java.util.Comparator interface to get even more - control.

- -
AttributeDescriptionRequiredAttributeDescriptionRequired
language The programming language the script is written in. + language The programming language the script is written in. Must be a supported Apache BSF or JSR 223 languageYesYes
manager No - default is "auto"
srcThe location of the script as a file, if not inline + srcThe location of the script as a file, if not inline NoNo
encodingThe encoding of the script as a file. since Ant 1.10.2.The encoding of the script as a file. Since Ant 1.10.2 No - defaults to default JVM encoding
setbeans whether to have all properties, references and targets as - global variables in the script. since Ant 1.8.0 No, default is "true".
- - - - - - - - - - - - - - - -
Parameter NameParameter ValueRequired
reversewhether to reverse the sort order, - defaults to false. Note: this parameter is ignored if - the comparator parameter is present as well.No
comparatorClass name of a class that - implements java.util.Comparator for Strings. This - class will be used to determine the sort order of lines.No
- -

This filter is also available using the - name sortfilter. The reverse parameter - becomes an attribute, comparator can be specified by - using a nested element.

- -

Examples:

- -
-  <copy todir="build">
-      <fileset dir="input" includes="*.txt"/>
-      <filterchain>
-          <sortfilter/>
-      </filterchain>
-  </copy>
-
- -

-Sort all files *.txt from src location -into build location. The lines of each file are sorted in -ascendant order comparing the lines via the -String.compareTo(Object o) method. -

- -
-  <copy todir="build">
-      <fileset dir="input" includes="*.txt"/>
-      <filterchain>
-          <sortfilter reverse="true"/>
-      </filterchain>
-  </copy>
-
- -

-Sort all files *.txt from src location into reverse -order and copy them into build location. -

- -
-  <copy todir="build">
-      <fileset dir="input" includes="*.txt"/>
-      <filterchain>
-          <filterreader classname="org.apache.tools.ant.filters.SortFilter">
-            <param name="comparator" value="org.apache.tools.ant.filters.EvenFirstCmp"/>
-          </filterreader>
-      </filterchain>
-  </copy>
-
- -

-Sort all files *.txt from src location using as -sorting criterium EvenFirstCmp class, that sorts the file -lines putting even lines first then odd lines for example. The modified files -are copied into build location. The EvenFirstCmp, -has to an instanciable class via Class.newInstance(), -therefore in case of inner class has to be static. It also has to -implement java.util.Comparator interface, for example: -

- -
-        package org.apache.tools.ant.filters;
-        ...(omitted)
-          public final class EvenFirstCmp implements <b>Comparator</b> {
-            public int compare(Object o1, Object o2) {
-            ...(omitted)
-            }
-          }
-
- -

The example above is equivalent to:

- -
-  <componentdef name="evenfirst"
-                classname="org.apache.tools.ant.filters.EvenFirstCmp"/>
-  <copy todir="build">
-      <fileset dir="input" includes="*.txt"/>
-      <filterchain>
-          <sortfilter>
-              <evenfirst/>
-          </sortfilter>
-      </filterchain>
-  </copy>
-
- diff --git a/manual/Types/filterset.html b/manual/Types/filterset.html index 8b0dfe185..a50d750ad 100644 --- a/manual/Types/filterset.html +++ b/manual/Types/filterset.html @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. --> - - @@ -23,13 +21,13 @@ -

FilterSet

+

FilterSet

FilterSets are groups of filters. Filters can be defined as token-value -pairs -or be read in from a file. FilterSets can appear inside tasks that support this +pairs +or be read in from a file. FilterSets can appear inside tasks that support this feature or at the same level as <target> - i.e., as -children of +children of <project>.

FilterSets support the id and refid @@ -40,9 +38,9 @@ filtersets into filtersets to get a set union of the contained filters.

In addition, FilterSets can specify -begintoken and/or +begintoken and/or endtoken attributes to define what to match.

-

Filtersets are used for doing +

Filtersets are used for doing replacements in tasks such as <copy>, etc.

Filters can also by specified by one or more nested propertysets, the @@ -52,96 +50,96 @@ replacements in tasks such as <copy>, etc.

defined within a filterset will be used.

-Note: When a filterset is used in an operation, the files are +Note: When a filterset is used in an operation, the files are processed in text mode and the filters applied line by line. This means that the copy operations will typically corrupt binary files. When applying filters you should ensure that the set of files being filtered are all text files.

-

Filterset

+

Filterset

- +
- - - - + + + + - - + - - + + - - + - - + + - - - - + + + + - - - - + + + + - - - - + + + +
AttributeDescriptionDefaultRequiredAttributeDescriptionDefaultRequired
begintokenThe string marking the beginning of a token (eg., + begintokenThe string marking the beginning of a token (eg., @DATE@).@No@No
endtokenThe string marking the end of a token (eg., + endtokenThe string marking the end of a token (eg., @DATE@).@No@No
filtersfileSpecify a single filtersfile.noneNofiltersfileSpecify a single filtersfile.noneNo
recurseIndicates whether the replacement text of tokens - should be searched for more tokens. Since Ant 1.6.3trueNorecurseIndicates whether the replacement text of tokens + should be searched for more tokens. Since Ant 1.6.3trueNo
onmissingfiltersfileIndicate behavior when a nonexistent filtersfile - is specified. One of "fail", "warn", "ignore". Since Ant 1.7"fail"NoonmissingfiltersfileIndicate behavior when a nonexistent filtersfile + is specified. One of "fail", "warn", "ignore". Since Ant 1.7"fail"No
-

Filter

- +

Filter

+
- - - + + + - - - + + + - - + - +
AttributeDescriptionRequiredAttributeDescriptionRequired
tokenThe token to replace (eg., @DATE@)YestokenThe token to replace (eg., @DATE@)Yes
valueThe value to replace it with + valueThe value to replace it with (eg., Thursday, April 26, 2001).YesYes
-

Filtersfile

- +

Filtersfile

+
- - - + + + - - + - +
AttributeDescriptionRequiredAttributeDescriptionRequired
fileA properties file of + fileA properties file of name-value pairs from which to load the tokens.YesYes

Examples

You are copying the version.txt file to the dist -directory from the build directory +directory from the build directory but wish to replace the token @DATE@ with today's date.

 <copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt">
@@ -152,7 +150,7 @@ but wish to replace the token @DATE@ with today's date.

You are copying the version.txt file to the dist -directory from the build directory +directory from the build directory but wish to replace the token %DATE* with today's date.

 <copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt">
@@ -186,7 +184,7 @@ but wish to replace the token %DATE* with today's date.

You are copying the version.txt file to the dist -directory from the build directory +directory from the build directory but wish to replace the token @project.date@ with the property of the same name.

 <copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt">
diff --git a/manual/Types/mapper.html b/manual/Types/mapper.html
index b5573604f..38c3824d4 100644
--- a/manual/Types/mapper.html
+++ b/manual/Types/mapper.html
@@ -24,7 +24,7 @@
 
 
 
-

Mapping File Names

+

Mapping File Names

Some tasks take source files and create target files. Depending on the task, it may be quite obvious which name a target file will have (using javac, you know there will be @@ -40,7 +40,7 @@ that can be parameterized with from and to attributes - the exact meaning of which is implementation-dependent.

These instances are defined in <mapper> elements with the following attributes:

- +
@@ -93,17 +93,16 @@ instead.

The classpath can be specified via a nested <classpath>, as well - that is, a path-like structure.

-

Since Ant 1.7.0, nested File Mappers can +

Since Ant 1.7.0, nested File Mappers can be supplied via either <mapper> elements or <typedef>'d implementations of org.apache.tools.ant.util.FileNameMapper. If nested File Mappers are specified by either means, the mapper will be implicitly configured as a composite mapper.

-
-

The built-in mapper types are:

+

The built-in mapper types

All built-in mappers are case-sensitive.

-

As of Ant 1.7.0, each of the built-in mapper implementation +

Since Ant 1.7.0, each of the built-in mapper implementation types is directly accessible using a specific tagname. This makes it possible for filename mappers to support attributes in addition to the generally available to and from.
@@ -114,7 +113,7 @@ implicitly configured as a composite mapper. -

identity

+

identity

The target file name is identical to the source file name. Both to and from will be ignored.

Examples: @@ -122,7 +121,7 @@ implicitly configured as a composite mapper. <mapper type="identity"/> <identitymapper/> -
Attribute Description
+
@@ -149,7 +148,7 @@ implicitly configured as a composite mapper. -

flatten

+

flatten

The target file name is identical to the source file name, with all leading directory information stripped off. Both to and from will be ignored.

@@ -158,7 +157,7 @@ leading directory information stripped off. Both to and <mapper type="flatten"/> <flattenmapper/> -
Source file name Target file name
+
@@ -185,7 +184,7 @@ leading directory information stripped off. Both to and -

merge

+

merge

The target file name will always be the same, as defined by to - from will be ignored.

Examples:
@@ -193,7 +192,7 @@ leading directory information stripped off. Both to and <mapper type="merge" to="archive.tar"/> <mergemapper to="archive.tar"/> -
Source file name Target file name
+
@@ -220,7 +219,7 @@ leading directory information stripped off. Both to and -

glob

+

glob

Both to and from are required and define patterns that may contain at most one *. For each source file that matches the from pattern, a target file name will be constructed @@ -233,7 +232,7 @@ that don't match the from pattern will be ignored.

<mapper type="glob" from="*.java" to="*.java.bak"/> <globmapper from="*.java" to="*.java.bak"/> -
Source file name Target file name
+
@@ -259,7 +258,7 @@ that don't match the from pattern will be ignored.

<mapper type="glob" from="C*ies" to="Q*y"/> <globmapper from="C*ies" to="Q*y"/> -
Source file name Target file name
+
@@ -284,7 +283,7 @@ that don't match the from pattern will be ignored.

The globmapper mapper can take the following extra attributes.

-
Source file name Target file name
+
@@ -295,7 +294,7 @@ that don't match the from pattern will be ignored.

@@ -306,7 +305,7 @@ that don't match the from pattern will be ignored.

directory separator characters - \ and /. This attribute can be true or false, the default is false. This attribute is useful for cross-platform build files. - Since Ant 1.6.3. + Since Ant 1.6.3
Attribute Description If this is false, the mapper will ignore case when matching the glob pattern. This attribute can be true or false, the default is true. - Since Ant 1.6.3. + Since Ant 1.6.3 No
No
@@ -344,12 +343,11 @@ that don't match the from pattern will be ignored.

will output "x is f/j.java".

- -

regexp

+

regexp

Both to and from are required and define regular expressions. If the source file name (as a whole or in part) @@ -371,9 +369,9 @@ another dollar-sign in Ant.

The regexp mapper needs a supporting library and an implementation of org.apache.tools.ant.util.regexp.RegexpMatcher that - hides the specifics of the library. Since Ant 1.8.0 Ant - requires Java 1.4 to run, so the implementation based on - the java.util.regex package will always be available. + hides the specifics of the library. Since Ant 1.8.0, + Java 1.4 or later is required, so the implementation based on + the java.util.regex package is always be available. You can still use the now retired Jakarta ORO or Jakarta Regex instead if your provide the corresponding jar in your CLASSPATH.

@@ -410,7 +408,7 @@ should be used. <mapper type="regexp" from="^(.*)\.java$$" to="\1.java.bak"/> <regexpmapper from="^(.*)\.java$$" to="\1.java.bak"/>
- +
@@ -436,7 +434,7 @@ should be used. <mapper type="regexp" from="^(.*)/([^/]+)/([^/]*)$$" to="\1/\2/\2-\3"/> <regexpmapper from="^(.*)/([^/]+)/([^/]*)$$" to="\1/\2/\2-\3"/> -
Source file name Target file name
+
@@ -462,7 +460,7 @@ should be used. <mapper type="regexp" from="^(.*)\.(.*)$$" to="\2.\1"/> <regexpmapper from="^(.*)\.(.*)$$" to="\2.\1"/> -
Source file name Target file name
+
@@ -488,7 +486,7 @@ should be used. <mapper type="regexp" from="^(.*?)(\$$[^/\\\.]*)?\.class$$" to="\1.java"/> <regexpmapper from="^(.*?)(\$$[^/\\\.]*)?\.class$$" to="\1.java"/> -
Source file name Target file name
+
@@ -513,7 +511,7 @@ should be used.

The regexpmapper mapper can take the following extra attributes.

-
Source file name Target file name
+
@@ -524,7 +522,7 @@ should be used. @@ -535,7 +533,7 @@ should be used. as a / for the purposes of matching. This attribute can be true or false, the default is false. This attribute is useful for cross-platform build files. - Since Ant 1.6.3. + Since Ant 1.6.3
Attribute Description If this is false, the mapper will ignore case when matching the pattern. This attribute can be true or false, the default is true. - Since Ant 1.6.3. + Since Ant 1.6.3 No
No
@@ -574,7 +572,7 @@ should be used. -

package

+

package

Sharing the same syntax as the glob mapper, the package mapper replaces directory separators found in the matched source pattern with dots in the target @@ -586,7 +584,7 @@ with <uptodate> and <junit> output.

<mapper type="package" from="*Test.java" to="TEST-*Test.xml"/> <packagemapper from="*Test.java" to="TEST-*Test.xml"/> - +
@@ -605,7 +603,7 @@ with <uptodate> and <junit> output.

-

unpackage (since Ant 1.6.0)

+

unpackage (since Ant 1.6.0)

This mapper is the inverse of the package mapper. It replaces the dots in a package name with directory separators. This is useful for matching XML formatter results against their JUnit test @@ -618,7 +616,7 @@ with <uptodate> and <junit> output.

<mapper type="unpackage" from="TEST-*Test.xml" to="${test.src.dir}/*Test.java"> <unpackagemapper from="TEST-*Test.xml" to="${test.src.dir}/*Test.java"> -
Source file name Target file name
+
@@ -633,7 +631,7 @@ with <uptodate> and <junit> output.

-

composite (since Ant 1.7.0)

+

composite (since Ant 1.7.0)

This mapper implementation can contain multiple nested mappers. File mapping is performed by passing the source filename to each nested <mapper> in turn, returning all results. @@ -648,7 +646,7 @@ with <uptodate> and <junit> output.

<packagemapper from="*.java" to="*"/> </compositemapper> -
Source file name Target file name
+
@@ -669,7 +667,7 @@ with <uptodate> and <junit> output.

-

chained (since Ant 1.7.0)

+

chained (since Ant 1.7.0)

This mapper implementation can contain multiple nested mappers. File mapping is performed by passing the source filename to the first nested mapper, its results to the second, and so on. The target filenames @@ -686,7 +684,7 @@ with <uptodate> and <junit> output.

</mapper> </chainedmapper> -
Source file name Target file names
+
@@ -714,7 +712,7 @@ with <uptodate> and <junit> output.

-

filtermapper (since Ant 1.6.3)

+

filtermapper (since Ant 1.6.3)

This mapper implementation applies a filterchain to the source file name. @@ -726,7 +724,7 @@ with <uptodate> and <junit> output.

</filtermapper> -
Source file name Target file names
+
@@ -744,7 +742,7 @@ with <uptodate> and <junit> output.

</filtermapper> -
Source file name Target file names
+
@@ -763,12 +761,13 @@ with <uptodate> and <junit> output.

-

scriptmapper (since Ant 1.7)

+

scriptmapper (since Ant 1.7)

This mapper executes a script written in Apache BSF or JSR 223 supported language, once per file to map.

+

The script can be declared inline or in a specified file.

@@ -776,7 +775,7 @@ See the Script task for an explanation of scripts and dependencies.

-
Source file name Target file names
+
@@ -807,13 +806,13 @@ an explanation of scripts and dependencies. - + + global variables in the script. Since Ant 1.8.0 @@ -846,7 +845,7 @@ an explanation of scripts and dependencies. </scriptmapper> -
Attribute Description
encodingThe encoding of the script as a file. since Ant 1.10.2.The encoding of the script as a file. Since Ant 1.10.2 No - defaults to default JVM encoding
setbeans whether to have all properties, references and targets as - global variables in the script. since Ant 1.8.0 No, default is "true".
+
@@ -866,7 +865,7 @@ and the ability to return multiple mappings. Here are the relevant beans and their methods. The script is called once for every source file, with the list of mapped names reset after every invocation. -
Source file name Target file names
+
@@ -901,7 +900,7 @@ list of mapped names reset after every invocation. <mapper type> attribute.

-

firstmatchmapper (since Ant 1.8.0)

+

firstmatchmapper (since Ant 1.8.0)

This mapper supports an arbitrary number of nested mappers and returns the results of the first mapper that matches. This is @@ -915,7 +914,7 @@ list of mapped names reset after every invocation. </firstmatchmapper> -

Script bean Description
+
@@ -934,7 +933,7 @@ list of mapped names reset after every invocation. <mapper type> attribute.

-

cutdirsmapper (since Ant 1.8.2)

+

cutdirsmapper (since Ant 1.8.2)

This mapper strips a configured number of leading directories from the source file name.

@@ -944,7 +943,7 @@ list of mapped names reset after every invocation. <cutdirsmapper dirs="1"/> -
Source file name Target file names
+
@@ -958,7 +957,7 @@ list of mapped names reset after every invocation.

The cutdirsmapper has no corresponding <mapper type> attribute.

-
Source file name Target file names
+
diff --git a/manual/Types/multirootfileset.html b/manual/Types/multirootfileset.html index 29a4f5482..cbe1fdcd0 100644 --- a/manual/Types/multirootfileset.html +++ b/manual/Types/multirootfileset.html @@ -24,7 +24,7 @@ -

MultiRootFileSet

+

MultiRootFileSet

Since Ant 1.9.4

@@ -41,7 +41,7 @@ that share the same patterns and selectors.

MultiRootFileSet supports all attributes and nested elements of FileSet and DirSet except for the "dir" attribute.

-
Attribute Description
+
@@ -141,7 +141,6 @@ an <and> selector container.

nested basedir elements that have a single file attribute.

-

Examples

@@ -170,4 +169,3 @@ an <and> selector container.

- diff --git a/manual/Types/namespace.html b/manual/Types/namespace.html index 3adfa80ce..5488022e5 100644 --- a/manual/Types/namespace.html +++ b/manual/Types/namespace.html @@ -14,14 +14,16 @@ See the License for the specific language governing permissions and limitations under the License. --> - - -XmlNamespaceSupport + + + +XmlNamespaceSupport + -

XML Namespace Support

- Apache Ant 1.6 introduces support for XML namespaces. +

XML Namespace Support

+ Apache Ant 1.6 introduces support for XML namespaces.

History

- +

All releases of Ant prior to Ant 1.6 do not support XML namespaces. No support basically implies two things here: @@ -72,7 +74,7 @@ and another time to actually map the namespace to occurrences of elements from that namespace, by using the 'xmlns' attribute. This mapping can happen at any level in the build file: -

 <project name="test" xmlns:my="http://example.org/tasks"> 
+    

 <project name="test" xmlns:my="http://example.org/tasks">
    <typedef resource="org/example/tasks.properties" uri="http://example.org/tasks"/>
    <my:task>
      ...
@@ -82,7 +84,7 @@
     

Use of a namespace prefix is of course optional. Therefore the example could also look like this: -

 <project name="test"> 
+    

 <project name="test">
    <typedef resource="org/example/tasks.properties" uri="http://example.org/tasks"/>
    <task xmlns="http://example.org/tasks">
      ...
@@ -104,8 +106,6 @@
 </task>
     
- -

Namespaces and Nested Elements

@@ -132,14 +132,14 @@ From Ant 1.6.2, elements nested inside a namespaced element may also be in Ant's default namespace. This means that the following is now allowed:

-

 <typedef resource="org/example/tasks.properties"
+    
 <typedef resource="org/example/tasks.properties"
    uri="http://example.org/tasks"/>
  <my:task xmlns:my="http://example.org/tasks">
    <config a="foo" b="bar"/>
    ...
  </my:task>
 
- +

Namespaces and Attributes

diff --git a/manual/Types/patternset.html b/manual/Types/patternset.html index 4ad433dbc..e06cfc253 100644 --- a/manual/Types/patternset.html +++ b/manual/Types/patternset.html @@ -24,7 +24,7 @@ -

PatternSet

+

PatternSet

Patterns can be grouped to sets and later be referenced by their id attribute. They are defined via a patternset element, which can appear @@ -36,7 +36,7 @@ the same level as target — i.e., as children of target.

Patterns can be specified by nested <include>, or <exclude> elements or the following attributes.

-
Attribute Description
+
@@ -71,7 +71,7 @@ or the following attributes.

include and exclude

Each such element defines a single pattern for files to include or exclude.

-
Attribute Description
+
@@ -102,7 +102,7 @@ attributes or elements. Using the attribute, you can only specify a single file of each type, while the nested elements can be specified more than once - the nested elements also support if/unless attributes you can use to test the existence of a property.

-
Attribute Description
+
@@ -169,24 +169,21 @@ that it should be used only if a property is not set.

and

 <patternset>
-  <includesfile name="some-file"/> 
+  <includesfile name="some-file"/>
 <patternset/>
 

are identical. The include patterns will be read from the file some-file, one pattern per line.

 <patternset>
-  <includesfile name="some-file"/> 
-  <includesfile name="${some-other-file}" 
-                if="some-other-file"
-  /> 
+  <includesfile name="some-file"/>
+  <includesfile name="${some-other-file}"
+                if="some-other-file"/>
 <patternset/>
 

will also read include patterns from the file the property some-other-file points to, if a property of that name has been defined.

- - diff --git a/manual/Types/permissions.html b/manual/Types/permissions.html index f7b90b783..a1438e535 100644 --- a/manual/Types/permissions.html +++ b/manual/Types/permissions.html @@ -24,26 +24,26 @@ -

Permissions

+

Permissions

Permissions represents a set of security permissions granted or revoked to a specific part code executed in the JVM where Apache Ant is running in. The actual Permissions are specified via a set of nested permission items either <grant>ed or <revoke>d.

-In the base situation a base set of permissions granted. +In the base situation a base set of permissions granted. Extra permissions can be granted. A granted permission can be overruled by revoking a permission. -The security manager installed by the permissions will throw an +The security manager installed by the permissions will throw an SecurityException if -the code subject to these permissions try to use an permission that has not been +the code subject to these permissions try to use an permission that has not been granted or that has been revoked.

Nested elements

grant

-Indicates a specific permission is always granted. Its attributes indicate which +Indicates a specific permission is always granted. Its attributes indicate which permissions are granted.

-
Attribute Description
+
@@ -62,7 +62,7 @@ permissions are granted.

- @@ -77,7 +77,7 @@ Permission class.

revoke

Indicates a specific permission is revoked.

-
Attribute Description
actionsThe actions allowed. The actual contents depend on the + The actions allowed. The actual contents depend on the Permission class and name. No
+
@@ -96,7 +96,7 @@ Indicates a specific permission is revoked.

- @@ -105,14 +105,14 @@ Indicates a specific permission is revoked.

Implied permissions are not resolved and therefore also not revoked.

-The name can handle the * wildcard at the end of the name, in which case all +The name can handle the * wildcard at the end of the name, in which case all permissions of the specified class of which the name starts with the specified name (excluding the *) are revoked. Note that the - wildcard often supported by the granted properties is not supported. If the name is left empty all names match, and are revoked. If the actions are left empty all actions match, and are revoked.

-

Base set

+

Base set

A permissions set implicitly contains the following permissions:
 <grant class="java.net.SocketPermission" name="localhost:1024-" actions="listen">
@@ -136,7 +136,7 @@ A permissions set implicitly contains the following permissions:
 <grant class="java.util.PropertyPermission" name="java.vm.version" actions="read">
 <grant class="java.util.PropertyPermission" name="java.vm.vendor" actions="read">
 <grant class="java.util.PropertyPermission" name="java.vm.name" actions="read">
-
+ These permissions can be revoked via <revoke> elements if necessary.

Examples

diff --git a/manual/Types/propertyset.html b/manual/Types/propertyset.html index 81d491e0b..922723609 100644 --- a/manual/Types/propertyset.html +++ b/manual/Types/propertyset.html @@ -24,13 +24,13 @@ -

PropertySet

+

PropertySet

Since Apache Ant 1.6

Groups a set of properties to be used by reference in a task that supports this.

-
Attribute Description
actionsThe actions allowed. The actual contents depend on the + The actions allowed. The actual contents depend on the Permission class and name. No
+
@@ -59,7 +59,7 @@ supports this.

Selects properties from the current project to be included in the set.

-
Attribute Description
+
@@ -136,8 +136,5 @@ changes the names to start with "bar" instead.

If supplied, the nested mapper will be applied subsequent to any negation of matched properties.

- - - diff --git a/manual/Types/redirector.html b/manual/Types/redirector.html index d0e368388..56264a51f 100644 --- a/manual/Types/redirector.html +++ b/manual/Types/redirector.html @@ -24,7 +24,7 @@ -

I/O redirection

+

I/O redirection

For many tasks, input and output can be defined in a fairly straightforward fashion. The exec task, used to execute an external process, stands as a very @@ -36,7 +36,7 @@ of redirecting input and output featuring the use of File Mappers to specify source (input) and destination (output/error) files. Since Apache Ant 1.6.2

The <redirector> element accepts the following attributes:

-
Attribute Description
+
@@ -124,7 +124,7 @@ source (input) and destination (output/error) files. Since Apache Ant 1.6.2 @@ -132,7 +132,7 @@ source (input) and destination (output/error) files. Since Apache Ant 1.6.2 @@ -142,7 +142,7 @@ source (input) and destination (output/error) files. Since Apache Ant 1.6.2 output into lines - which it will usually do in order to separate error from normal output. This setting will not prevent binary output from getting corrupted if you also specify filter chains. - Since Ant 1.9.4. + Since Ant 1.9.4 @@ -187,7 +187,5 @@ Tasks known to support I/O redirection: dependent on the supporting task. Any possible points of confusion should be noted at the task level.

- - diff --git a/manual/Types/regexp.html b/manual/Types/regexp.html index 0628bb9ba..5e01ec3e3 100644 --- a/manual/Types/regexp.html +++ b/manual/Types/regexp.html @@ -24,11 +24,11 @@ -

Regexp

+

Regexp

Regexp represents a regular expression.

Parameters

-
Attribute Description
alwayslog Always send to the log in addition to - any other destination. Since Ant 1.6.3. + any other destination. Since Ant 1.6.3 No, default is false
loginputstring Controls the display of inputstring's value in log messages. Set to false when sending sensitive data - (e.g. passwords) to external processes. Since Ant 1.6.3. + (e.g. passwords) to external processes. Since Ant 1.6.3 No, default is true
No, default is false
+
@@ -54,7 +54,7 @@ Defines a regular expression for later use with id myregexp.

Use the regular expression with id myregexp.

-

Choice of regular expression implementation

+

Choice of regular expression implementation

Apache Ant comes with wrappers for @@ -65,7 +65,7 @@ See installation dependencies concerning the supporting libraries.

The property ant.regexp.regexpimpl governs which regular expression implementation will be chosen. -Possible values for this property are : + Possible values for this property are:

  • org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp @@ -77,20 +77,21 @@ org.apache.tools.ant.util.regexp.JakartaOroRegexp org.apache.tools.ant.util.regexp.JakartaRegexpRegexp
-It can also be another implementation of the interface org.apache.tools.ant.util.regexp.Regexp. +

It can also be another implementation of the interface org.apache.tools.ant.util.regexp.Regexp. If ant.regexp.regexpimpl is not defined, Ant uses Jdk14Regexp as this is always available.

There are cross-platform issues for matches related to line terminator. For example if you use $ to anchor your regular expression on the end of a line the results might be very different depending on both your platform and the regular expression library you use. It is 'highly recommended' that you test your pattern on -both Unix and Windows platforms before you rely on it. + both Unix and Windows platforms before you rely on it.

  • Jakarta Oro defines a line terminator as '\n' and is consistent with Perl.
  • Jakarta RegExp uses a system-dependent line terminator.
  • JDK 1.4 uses '\n', '\r\n', '\u0085', '\u2028', '\u2029' as a default but is configured in the wrapper to use only '\n' (UNIX_LINE)
+

We used to recommend that you use Jakarta ORO but since its development has been retired Java's built-in regex package is likely the best choice going forward. diff --git a/manual/Types/resources.html b/manual/Types/resources.html index b90ee23cc..d16650a9d 100644 --- a/manual/Types/resources.html +++ b/manual/Types/resources.html @@ -24,7 +24,7 @@ -

Resources

+

Resources

A file-like entity can be abstracted to the concept of a resource. In addition to providing access to file-like attributes, a resource @@ -53,7 +53,7 @@ explicit use beginning in Ant 1.7.

  • zipentry - an entry in a zip file.
  • -

    resource

    +

    resource

    A basic resource. Other resource types derive from this basic type; as such all its attributes are available, though in most cases @@ -62,7 +62,7 @@ implementations are also usable as single-element Resource Collections.

    -
    Attribute Description
    +
    @@ -95,11 +95,11 @@ implementations are also usable as single-element
    Attribute Description
    -

    file

    +

    file

    Represents a file accessible via local filesystem conventions.

    - +
    @@ -119,11 +119,11 @@ implementations are also usable as single-element
    Attribute Description
    -

    javaresource

    +

    javaresource

    Represents a resource loadable via a Java classloader.

    - +
    @@ -167,13 +167,12 @@ implementations are also usable as single-element where <classpath> is a path-like structure.

    - -

    javaconstant

    -

    Loads the value of a java constant. As a specialisation of +

    javaconstant

    +

    Loads the value of a java constant. As a specialisation of javaresource all of its attributes and nested elements are supported. A constant must be specified as public static otherwise it could not be loaded.

    -
    Attribute Description
    +
    @@ -206,15 +205,14 @@ of that constant (build.xml). <javaconstant name="org.apache.tools.ant.Main.DEFAULT_BUILD_FILENAME"/> </copy> - -

    zipentry

    +

    zipentry

    Represents an entry in a ZIP archive. The archive can be specified using the archive attribute or a nested single-element resource collection. zipentry only supports file system resources as nested elements.

    -
    Attribute Description
    +
    @@ -239,13 +237,13 @@ as nested elements.

    Attribute Description
    -

    tarentry

    +

    tarentry

    Represents an entry in a TAR archive. The archive can be specified using the archive attribute or a nested single-element resource collection.

    - +
    @@ -264,21 +262,21 @@ collection.

    Attribute Description
    -

    gzipresource

    +

    gzipresource

    This is not a stand-alone resource, but a wrapper around another resource providing compression of the resource's contents on the fly. A single element resource collection must be specified as a nested element.

    -

    bzip2resource

    +

    bzip2resource

    This is not a stand-alone resource, but a wrapper around another resource providing compression of the resource's contents on the fly. A single element resource collection must be specified as a nested element.

    -

    xzresource

    +

    xzresource

    This is not a stand-alone resource, but a wrapper around another resource providing compression of the resource's contents on the fly. @@ -290,11 +288,11 @@ depends on external libraries not included in the Ant distribution. See Library Dependencies for more information.

    -

    url

    +

    url

    Represents a URL.

    - +
    @@ -321,12 +319,12 @@ Dependencies for more information.

    Attribute Description
    -

    string

    +

    string

    Represents a Java String. It can be written to, but only once, after which it will be an error to write to again.

    - +
    @@ -346,14 +344,12 @@ it will be an error to write to again.

    self.log("Ant version =${ant.version}"); </string> - -

    -

    propertyresource

    +

    propertyresource

    Represents an Ant property.

    -
    Attribute Description
    +
    @@ -366,12 +362,13 @@ it will be an error to write to again.

    Attribute Description
    -
    -

    Resource Collections

    +
    +

    Resource Collections

    A Resource Collection is an abstraction of an entity that groups together a number of resources. Several of Ant's "legacy" datatypes have been modified to behave as Resource Collections: +

    • fileset, dirset, @@ -392,8 +389,7 @@ Ant's "legacy" datatypes have been modified to behave as Resource Collections: exposes property resources
    -

    -

    Strangely, some tasks can even legitimately behave as resource collections: +

    Strangely, some tasks can even legitimately behave as resource collections:

    • concat exposes a concatenated resource, and adds e.g. @@ -401,7 +397,6 @@ Ant's "legacy" datatypes have been modified to behave as Resource Collections: to Ant's resource-related capabilities.
    -

    The additional built-in resource collections are:

    • resources - generic resource collection
    • @@ -434,7 +429,8 @@ Ant's "legacy" datatypes have been modified to behave as Resource Collections:
    • resourcelist - a collection of resources whose names have been read from another resource.
    -

    resources

    + +

    resources

    A generic resource collection, designed for use with references. For example, if a third-party Ant task generates a Resource Collection @@ -445,7 +441,7 @@ Ant's "legacy" datatypes have been modified to behave as Resource Collections: duplicate resources (contrast with union).

    - +
    @@ -459,7 +455,7 @@ Ant's "legacy" datatypes have been modified to behave as Resource Collections:
    Attribute Description
    -

    files

    +

    files

    A group of files. These files are matched by absolute patterns taken from a number of PatternSets. These can be specified as nested <patternset> @@ -483,7 +479,7 @@ Ant's "legacy" datatypes have been modified to behave as Resource Collections: the file has been included based on pattern-based selection.

    - +
    @@ -532,17 +528,16 @@ Ant's "legacy" datatypes have been modified to behave as Resource Collections:
    Attribute Description
    -

    Note: All files/directories for which +

    -

    restrict

    +

    restrict

    Restricts a nested resource collection using resource selectors: -

    - +
    @@ -555,11 +550,11 @@ platforms.
    Attribute DescriptionNo, default true
    -

    Parameters specified as nested elements

    +
    Parameters specified as nested elements

    A single resource collection is required.

    Nested resource selectors are used to "narrow down" the included - resources, combined via a logical AND. These are patterned - after file selectors but are, + resources, combined via a logical AND. These are patterned + after file selectors but are, unsurprisingly, targeted to resources. Several built-in resource selectors are available in the internal antlib @@ -583,7 +578,7 @@ platforms. by a majority of nested resource selectors.

  • modified - select resources which content has changed.
  • -
  • contains - select resources +
  • contains - select resources containing a particular text string.
  • containsregexp - select resources whose contents match a particular regular expression.
  • @@ -595,9 +590,9 @@ platforms. Select files (resources must be files) if they are writable. -

    name

    +
    name

    Selects resources by name.

    - +
    @@ -626,17 +621,17 @@ platforms. resource name or name attribute as a / for the purposes of matching. This attribute can be true or false, the default is false. - Since Ant 1.8.0. + Since Ant 1.8.0
    Attribute Description No
    -

    exists

    +
    exists

    Selects existing resources.

    -

    date

    +
    date

    Selects resources by date.

    - +
    @@ -675,9 +670,9 @@ platforms.
    Attribute Description
    -

    type

    +
    type

    Selects resources by type (file or directory).

    - +
    @@ -685,14 +680,14 @@ platforms. - +
    Attribute Description
    typeOne of "file", "dir", "any" (since Ant 1.8)One of "file", "dir", "any" (since Ant 1.8) Yes
    -

    size

    +
    size

    Selects resources by size.

    - +
    @@ -711,9 +706,9 @@ platforms.
    Attribute Description
    -

    instanceof

    +
    instanceof

    Selects resources by type.

    - +
    @@ -736,25 +731,25 @@ platforms.
    Attribute Description
    -

    and

    +
    and

    Selects a resource if it is selected by all nested resource selectors.

    -

    or

    +
    or

    Selects a resource if it is selected by at least one nested resource selector.

    -

    not

    +
    not

    Negates the selection result of the single nested resource selector allowed.

    -

    none

    +
    none

    Selects a resource if it is selected by no nested resource selectors.

    -

    majority

    +
    majority

    Selects a resource if it is selected by the majority of nested resource selectors.

    - +
    @@ -768,10 +763,10 @@ platforms.
    Attribute Description
    -

    compare

    +
    compare

    Selects a resource based on its comparison to one or more "control" resources using nested resource comparators.

    - +
    @@ -790,15 +785,15 @@ platforms.
    Attribute DescriptionNo, default "all"
    -

    Parameters specified as nested elements

    +
    Parameters specified as nested elements

    The resources against which comparisons will be made must be specified using the nested <control> element, which denotes a resources collection.

    -

    Examples

    -

    Assuming the namespace settings +

    Examples
    +

    Assuming the namespace settings

      rsel="antlib:org.apache.tools.ant.types.resources.selectors"
       rcmp="antlib:org.apache.tools.ant.types.resources.comparators"
    -

    +
     <restrict>
       <fileset dir="src" includes="a,b,c,d,e,f,g" />
    @@ -858,15 +853,12 @@ platforms.
       which are not present. Finally we use the toString: pathshortcut for
       getting them in a readable form: [echo] These files are missed: ....foo.txt;....bar.txt

    -
    - -

    sort

    +

    sort

    Sorts a nested resource collection according to the resources' natural order, or by one or more nested resource comparators:

    -
    - +
    @@ -879,7 +871,7 @@ platforms.
    Attribute DescriptionNo, default true
    -

    Parameters specified as nested elements

    +
    Parameters specified as nested elements

    A single resource collection is required.

    The sort can be controlled and customized by specifying one or more resource comparators. Resources can be sorted according to multiple @@ -888,7 +880,7 @@ platforms. are available in the internal antlib org.apache.tools.ant.types.resources.comparators:

    -

    Resource Comparators:

    +
    Resource Comparators:
    • name - sort resources by name
    • exists - sort resources by existence
    • @@ -900,26 +892,26 @@ platforms. or that of a single nested resource comparator
    -

    name

    +
    name

    Sort resources by name.

    -

    exists

    +
    exists

    Sort resources by existence. Not existing is considered "less than" existing.

    -

    date

    +
    date

    Sort resources by date.

    -

    type

    +
    type

    Sort resources by type (file or directory). Because directories contain files, they are considered "greater".

    -

    size

    +
    size

    Sort resources by size.

    -

    content

    +
    content

    Sort resources by content.

    - +
    @@ -928,16 +920,16 @@ platforms.
    Attribute Description
    binary Whether content should be compared in binary mode. - If false, content will be compared without regard to + If false, content will be compared without regard to platform-specific line-ending conventions. No, default true
    -

    reverse

    +
    reverse

    Reverse the natural sort order, or that of a single nested comparator.

    -

    Examples

    +
    Examples
         <property name="eol" value="${line.separator}" />
         <pathconvert property="sorted" pathsep="${eol}">
    @@ -948,10 +940,10 @@ platforms.
             </tokens>
           </sort>
         </pathconvert>
    -

    The resource of type string "foo bar etc baz" is split into four tokens by +

    The resource of type string "foo bar etc baz" is split into four tokens by the stringtokenizer. These tokens are sorted and there sorted gets the value of "bar baz etc foo".

    - +
         <sort>
           <fileset dir="foo" />
    @@ -966,15 +958,12 @@ platforms.
          their namespace must be set explicitly.
       

    -
    - -

    first

    +

    first

    Includes the first count resources from a nested resource collection. This can be used in conjunction with the sort collection, for example, to select the first few oldest, largest, etc. resources from a larger collection.

    -
    - +
    @@ -992,17 +981,15 @@ larger collection.

    Attribute Description No, default true
    -

    Parameters specified as nested elements

    +
    Parameters specified as nested elements

    A single resource collection is required.

    -
    -

    last

    +

    last

    Includes the last count resources from a nested resource collection. This can be used in conjunction with the sort collection, for example, to select the last few oldest, largest, etc. resources from a -larger collection. Since Ant 1.7.1.

    -
    - +larger collection. Since Ant 1.7.1

    +
    @@ -1020,18 +1007,16 @@ larger collection. Since Ant 1.7.1.

    Attribute Description No, default true
    -

    Parameters specified as nested elements

    +
    Parameters specified as nested elements

    A single resource collection is required.

    -
    -

    allbutfirst

    +

    allbutfirst

    Includes all elements except for the first count resources from a nested resource collection. This can be used in conjunction with the sort collection, for example, to select all but the first few oldest, largest, etc. resources from a larger -collection. Since Ant 1.9.5.

    -
    - +collection. Since Ant 1.9.5

    +
    @@ -1049,18 +1034,16 @@ collection. Since Ant 1.9.5.

    Attribute Description No, default true
    -

    Parameters specified as nested elements

    +
    Parameters specified as nested elements

    A single resource collection is required.

    -
    -

    allbutlast

    +

    allbutlast

    Includes all elements except for the last count resources from a nested resource collection. This can be used in conjunction with the sort collection, for example, to select all but the last few oldest, largest, etc. resources from a larger -collection. Since Ant 1.9.5.

    -
    - +collection. Since Ant 1.9.5

    +
    @@ -1078,19 +1061,17 @@ collection. Since Ant 1.9.5.

    Attribute Description No, default true
    -

    Parameters specified as nested elements

    +
    Parameters specified as nested elements

    A single resource collection is required.

    -
    -

    tokens

    +

    tokens

    Includes the string tokens gathered from a nested resource collection. Uses the same tokenizers supported by the TokenFilter. Imaginative use of this resource collection can implement equivalents for such Unix functions as sort, grep -c, wc and wc -l.

    -
    - +
    @@ -1108,14 +1089,14 @@ collection. Since Ant 1.9.5.

    Attribute Description No, default true
    -

    Parameters specified as nested elements

    +
    Parameters specified as nested elements
    • A single resource collection is required.
    • One nested tokenizer may be specified. If omitted, a LineTokenizer will be used.
    -

    Examples

    +
    Examples
    <concat>
       <union>
         <sort>
    @@ -1128,10 +1109,8 @@ collection. Since Ant 1.9.5.

    </concat>

    Implements Unix sort -u against resource collection input.

    -
    -

    Set operations

    -
    +

    Set operations

    The following resource collections implement set operations:

    -

    union

    +

    union

    Union of nested resource collections.

    -

    intersect

    +

    intersect

    Intersection of nested resource collections.

    -

    difference

    +

    difference

    Difference of nested resource collections.

    The following attributes apply to all set-operation resource collections:

    - +
    @@ -1163,8 +1142,8 @@ collection. Since Ant 1.9.5.

    Attribute Description No, default true
    - -

    Examples

    + +
    Examples
         <resources id="A">
             <string value="a"/>
    @@ -1186,9 +1165,8 @@ collection. Since Ant 1.9.5.

    difference: ${toString:difference} = a;c </echo>
    -
    -

    mappedresources

    +

    mappedresources

    Since Ant 1.8.0

    @@ -1201,10 +1179,9 @@ collection. Since Ant 1.9.5.

    use mappedresources with tasks that only allow file-system based resources.

    -
    -

    Parameters specified as attributes

    +
    Parameters specified as attributes
    - +
    @@ -1222,18 +1199,18 @@ collection. Since Ant 1.9.5.

    If true the the collection will use all the mappings for a given source path. If false the it will only process the first resource. - since Ant 1.8.1. + since Ant 1.8.1
    Attribute Description No - defaults to false.
    -

    Parameters specified as nested elements

    +
    Parameters specified as nested elements

    A single resource collection is required.

    A single mapper can be used to map names. If no mapper has been given (which doesn't make any sense, honestly), an identity mapper will be used.

    -

    Examples

    +
    Examples

    Copies all files from a given directory to a target directory adding ".bak" as an extension. Note this could be done with a @@ -1265,10 +1242,9 @@ collection. Since Ant 1.9.5.

    </chainedmapper> </mappedresources> </war> - -
    + -

    archives

    +

    archives

    Since Ant 1.8.0

    @@ -1284,8 +1260,7 @@ collection. Since Ant 1.9.5.

    archives doesn't support any attributes.

    -
    -

    Parameters specified as nested elements

    +
    Parameters specified as nested elements

    <archives> has two nested elements <zips> and @@ -1296,7 +1271,7 @@ collection. Since Ant 1.9.5.

    The nested resources of <zips> are treated as ZIP archives, the nested resources of <tars> as TAR archives.

    -

    Examples

    +
    Examples

    Copies all files from all jars that are on the classpath to ${target}.

    @@ -1313,9 +1288,8 @@ collection. Since Ant 1.9.5.

    </archives> </copy> -
    -

    resourcelist

    +

    resourcelist

    Since Ant 1.8.0

    @@ -1335,8 +1309,7 @@ collection. Since Ant 1.9.5.

    <resourcelist> is a generalization of <filelist>.

    -
    - +
    @@ -1348,10 +1321,8 @@ collection. Since Ant 1.9.5.

    Attribute Description No, default is platform default
    -
    -
    -

    Parameters specified as nested elements

    +
    Parameters specified as nested elements

    <resourcelist> accepts arbitrary many resource(collection)s as nested elements.

    @@ -1362,7 +1333,7 @@ collection. Since Ant 1.9.5.

    expanded. Such a nested element corresponds to a filterchain.

    -

    Examples

    +
    Examples

    The following example copies a file from the first URL of several alternatives that can actually be reached. It assumes @@ -1375,7 +1346,7 @@ http://second.best.mirror.example.org/mirror/of/best/ https://yet.another.mirror/ http://the.original.site/ - +

         <copy todir="${target}">
           <first>
    @@ -1388,7 +1359,6 @@ http://the.original.site/
           </first>
         </copy>
       
    -
    diff --git a/manual/Types/selectors-program.html b/manual/Types/selectors-program.html index 074a54263..55698fcfc 100644 --- a/manual/Types/selectors-program.html +++ b/manual/Types/selectors-program.html @@ -169,9 +169,7 @@
  • verify the work
  • - - -

    An example test would be:

    +    

    An example test would be:

     package org.apache.tools.ant.types.selectors;
     
     public class MySelectorTest {
    @@ -182,7 +180,6 @@ public class MySelectorTest {
         @Test
         public void testCase1() {
     
    -
             // Configure the selector
             MySelector s = new MySelector();
             s.addParam("key1", "value1");
    @@ -203,7 +200,7 @@ public class MySelectorTest {
         [junit] expected:<FTTTFTTTF...> but was:<TTTTTTTTT...>
         [junit]     at junit.framework.Assert.assertEquals(Assert.java:81)
         [junit]     at org.apache.tools.ant.types.selectors.BaseSelectorTest.performTest(BaseSelectorTest.java:194)
    -    

    +

    Described above the test class should provide a getInstance() method. But that isn't used here. The used getSelector() method is @@ -213,7 +210,6 @@ public class MySelectorTest { ability to use its own Project object (getProject()), for example for logging.

    -

    Logging

    During development and maybe later you sometimes need the output of information. @@ -221,7 +217,7 @@ public class MySelectorTest { BaseSelector it is an Ant DataType and therefore a ProjectComponent.
    That means that you have access to the project object and its logging capability. ProjectComponent itself provides log methods which will do the - access to the project instance. Logging is therefore done simply with: + access to the project instance. Logging is therefore done simply with:

             log( "message" );
         
    @@ -229,16 +225,14 @@ public class MySelectorTest {
             log( "message" , loglevel );
         
    - where the loglevel is one of the values
      + where the loglevel is one of the values +
      • org.apache.tools.ant.Project.MSG_ERR
      • org.apache.tools.ant.Project.MSG_WARN
      • org.apache.tools.ant.Project.MSG_INFO (= default)
      • org.apache.tools.ant.Project.MSG_VERBOSE
      • org.apache.tools.ant.Project.MSG_DEBUG
      -

      - - diff --git a/manual/Types/selectors.html b/manual/Types/selectors.html index db2ec4881..a302081db 100644 --- a/manual/Types/selectors.html +++ b/manual/Types/selectors.html @@ -46,7 +46,7 @@ Core Selectors.

      -

      Core Selectors

      +

      Core Selectors

      Core selectors are the ones that come standard with Ant. They can be used within a fileset and can be contained @@ -82,12 +82,10 @@ the return value of the configured algorithm is different from that stored in a cache.

    • <signedselector> - Select files if - they are signed, and optionally if they have a signature of a certain name. -
    • -
    • <scriptselector> - + they are signed, and optionally if they have a signature of a certain name.
    • +
    • <scriptselector> - Use a BSF or JSR 223 scripting language to create - your own selector -
    • + your own selector
    • <readable> - Select files if they are readable.
    • <writable> - @@ -100,7 +98,7 @@ Select files if they are owned by a given user.
    -

    Contains Selector

    +

    Contains Selector

    The <contains> tag in a FileSet limits the files defined by that fileset to only those which contain the @@ -111,7 +109,7 @@ <restrict> ResourceCollection).

    - +
    @@ -145,7 +143,7 @@ Required in practice if the encoding of the files being selected is different from the default encoding of the JVM where Ant is running. - Since Ant 1.9.0 + Since Ant 1.9.0 @@ -162,15 +160,14 @@

    Selects all the HTML files that contain the string script.

    - -

    Date Selector

    +

    Date Selector

    The <date> tag in a FileSet will put a limit on the files specified by the include tag, so that tags whose last modified date does not meet the date limits specified by the selector will not end up being selected.

    -
    Attribute Description No
    +
    @@ -220,7 +217,7 @@ @@ -244,8 +241,7 @@

    Selects all JAR files which were last modified before midnight January 1, 2001.

    - -

    Depend Selector

    +

    Depend Selector

    The <depend> tag selects files whose last modified date is later than another, equivalent file in @@ -259,7 +255,7 @@

    The <depend> selector is case-sensitive.

    -
    Attribute DescriptionThe SimpleDateFormat-compatible pattern to use when interpreting the datetime attribute using the current locale. - Since Ant 1.6.2 + Since Ant 1.6.2 No
    +
    @@ -296,15 +292,14 @@ 1.5 release.

    - -

    Depth Selector

    +

    Depth Selector

    The <depth> tag selects files based on how many directory levels deep they are in relation to the base directory of the fileset.

    -
    Attribute Description
    +
    @@ -338,8 +333,7 @@

    Selects all files in the base directory and one directory below that.

    - -

    Different Selector

    +

    Different Selector

    The <different> selector will select a file if it is deemed to be 'different' from an equivalent file in @@ -351,10 +345,10 @@ mapper) the file is selected.

  • If a file is only present in targetdir (or after applying the mapper) it is ignored. -
  • Files with different lengths are different. -
  • If ignoreFileTimes is turned off, then differing file +
  • Files with different lengths are different. +
  • If ignoreFileTimes is turned off, then differing file timestamps will cause files to be regarded as different. -
  • Unless ignoreContents is set to true, +
  • Unless ignoreContents is set to true, a byte-for-byte check is run against the two files. @@ -374,7 +368,7 @@ <mapper> element is specified, the identity type mapper is used.

    -
  • Attribute Description
    +
    @@ -399,7 +393,7 @@ @@ -427,7 +421,7 @@ and selects those who are different, disregarding file times.

    -

    Filename Selector

    +

    Filename Selector

    The <filename> tag acts like the <include> and <exclude> @@ -439,7 +433,7 @@

    The <filename> selector is case-sensitive.

    -
    Attribute DescriptionignoreContents Whether to do a byte per byte compare. Default is false (contents are compared). - Since Ant 1.6.3 + Since Ant 1.6.3 No
    +
    @@ -484,8 +478,7 @@

    Selects all the cascading style sheet files.

    - -

    Present Selector

    +

    Present Selector

    The <present> tag selects files that have an equivalent file in another directory tree.

    @@ -498,7 +491,7 @@

    The <present> selector is case-sensitive.

    -
    Attribute Description
    +
    @@ -543,7 +536,7 @@ 1.5 release.

    -

    Regular Expression Selector

    +

    Regular Expression Selector

    The <containsregexp> tag in a FileSet limits the files defined by that fileset to only those which contents contain a @@ -554,7 +547,7 @@ <restrict> ResourceCollection).

    -
    Attribute Description
    +
    @@ -569,14 +562,14 @@ + true. Since Ant 1.8.2 + Default is false. Since Ant 1.8.2 @@ -585,7 +578,7 @@ This allows '.' to match new lines. SingleLine is not to be confused with multiline, SingleLine is a perl regex term, it corresponds to dotall in java regex. - Default is false. since Ant 1.8.2 + Default is false. Since Ant 1.8.2
    Attribute Description
    casesensitive Perform a case sensitive match. Default is - true. since Ant 1.8.2 No
    multiline Perform a multi line match. - Default is false. since Ant 1.8.2 No
    No
    @@ -601,15 +594,14 @@

    Selects all the text files that match the regular expression (have a 4,5 or 6 followed by a period and a number from 0 to 9). - -

    Size Selector

    +

    Size Selector

    The <size> tag in a FileSet will put a limit on the files specified by the include tag, so that tags which do not meet the size limits specified by the selector will not end up being selected.

    - +
    @@ -662,12 +654,12 @@

    Selects all JAR files that are larger than 4096 bytes.

    -

    Type Selector

    +

    Type Selector

    The <type> tag selects files of a certain type: directory or regular.

    -
    Attribute Description
    +
    @@ -708,19 +700,18 @@ </fileset> - -

    Modified Selector

    +

    Modified Selector

    The <modified> selector computes a value for a file, compares that to the value stored in a cache and select the file, if these two values differ.

    Because this selector is highly configurable the order in which the selection is done is:

      -
    1. get the absolute path for the file
    2. -
    3. get the cached value from the configured cache (absolute path as key)
    4. -
    5. get the new value from the configured algorithm
    6. -
    7. compare these two values with the configured comparator
    8. -
    9. update the cache if needed and requested
    10. -
    11. do the selection according to the comparison result
    12. +
    13. get the absolute path for the file
    14. +
    15. get the cached value from the configured cache (absolute path as key)
    16. +
    17. get the new value from the configured algorithm
    18. +
    19. compare these two values with the configured comparator
    20. +
    21. update the cache if needed and requested
    22. +
    23. do the selection according to the comparison result

    The comparison, computing of the hashvalue and the store is done by implementation of special interfaces. Therefore they may provide additional parameters.

    @@ -734,178 +725,171 @@ to (attention!) copy the content into a local file for computing the hashvalue.

    -
    Attribute Description
    +
    - - + - + - - + - + - - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + + when used as ResourceSelector. - - + - +
    Attribute Description Required
    algorithm The type of algorithm should be used. + algorithmThe type of algorithm should be used. Acceptable values are (further information see later):
      -
    • hashvalue - HashvalueAlgorithm
    • -
    • digest - DigestAlgorithm
    • -
    • checksum - ChecksumAlgorithm
    • +
    • hashvalue - HashvalueAlgorithm
    • +
    • digest - DigestAlgorithm
    • +
    • checksum - ChecksumAlgorithm
    No, defaults to digest No, defaults to digest
    cache The type of cache should be used. + cacheThe type of cache should be used. Acceptable values are (further information see later):
      -
    • propertyfile - PropertyfileCache
    • +
    • propertyfile - PropertyfileCache
    No, defaults to propertyfile No, defaults to propertyfile
    comparator The type of comparator should be used. + comparatorThe type of comparator should be used. Acceptable values are (further information see later):
      -
    • equal - EqualComparator
    • -
    • rule - java.text.RuleBasedCollator +
    • equal - EqualComparator
    • +
    • rule - java.text.RuleBasedCollator - (see note for restrictions) -
    • + (see note for restrictions)
    No, defaults to equal No, defaults to equal
    algorithmclass Classname of custom algorithm implementation. Lower - priority than algorithm. No algorithmclassClassname of custom algorithm implementation. Lower + priority than algorithm.No
    cacheclass Classname of custom cache implementation. Lower - priority than cache. No cacheclassClassname of custom cache implementation. Lower + priority than cache. No
    comparatorclass Classname of custom comparator implementation. Lower - priority than comparator. No comparatorclassClassname of custom comparator implementation. Lower + priority than comparator. No
    update Should the cache be updated when values differ? (boolean) No, defaults to true updateShould the cache be updated when values differ? (boolean) No, defaults to true
    seldirs Should directories be selected? (boolean) No, defaults to true seldirsShould directories be selected? (boolean) No, defaults to true
    selres Should Resources without an InputStream, and - therefore without checking, be selected? (boolean) selresShould Resources without an InputStream, and + therefore without checking, be selected? (boolean) No, defaults to true. Only relevant - when used as ResourceSelector.
    delayupdate If set to true, the storage of the cache will be delayed until the + delayupdateIf set to true, the storage of the cache will be delayed until the next finished BuildEvent; task finished, target finished or build finished, whichever comes first. This is provided for increased performance. If set to false, the storage of the cache will happen with each change. This attribute depends upon the update attribute. (boolean) No, defaults to true No, defaults to true
    -

    These attributes can be set with nested <param/> tags. With <param/> - tags you can set other values too - as long as they are named according to - the following rules:

      -
    • algorithm : same as attribute algorithm
    • -
    • cache : same as attribute cache
    • -
    • comparator : same as attribute comparator
    • -
    • algorithmclass : same as attribute algorithmclass
    • -
    • cacheclass : same as attribute cacheclass
    • -
    • comparatorclass : same as attribute comparatorclass
    • -
    • update : same as attribute update
    • -
    • seldirs : same as attribute seldirs
    • -
    • algorithm.* : Value is transferred to the algorithm via its - setXX-methods
    • -
    • cache.* : Value is transferred to the cache via its - setXX-methods
    • -
    • comparator.* : Value is transferred to the comparator via its - setXX-methods
    • -
    +
    Parameters specified as nested elements
    - - - +

    The <modified> selector supports a nested + <classpath> element that represents a + PATH like structure for finding custom interface implementations.

    + +

    All attributes of a <modified> selector an be set with + nested <param/> tags. Additional values can be set + with <param/> tags according to the rules below.

    + +
    algorithm
    + Same as algorithm attribute, with the following additional values: +
    Algorithm options
    + - - + + - - + - - + - +
    Name Description
    hashvalue Reads the content of a file into a java.lang.String - and use thats hashValue(). No additional configuration required. - hashvalueReads the content of a file into a java.lang.String + and use that hashValue(). No additional configuration required.
    digest Uses java.security.MessageDigest. This Algorithm supports + digestUses java.security.MessageDigest. This Algorithm supports the following attributes:
    • algorithm.algorithm (optional): Name of the Digest algorithm - (e.g. 'MD5' or 'SHA', default = MD5)
    • + (e.g. 'MD5' or 'SHA', default = MD5)
    • algorithm.provider (optional): Name of the Digest provider - (default = null)
    • + (default = null)
    checksum Uses java.util.zip.Checksum. This Algorithm supports + checksumUses java.util.zip.Checksum. This Algorithm supports the following attributes:
    • algorithm.algorithm (optional): Name of the algorithm - (e.g. 'CRC' or 'ADLER', default = CRC)
    • + (e.g. 'CRC' or 'ADLER', default = CRC)
    Cache options
    +
    cache
    + Same as cache attribute, with the following additional values: + + + + + - - + - - - - - - - - -
    NameDescription
    propertyfile Use the java.util.Properties class and its possibility + propertyfileUse the java.util.Properties class and its possibility to load and store to file. This Cache implementation supports the following attributes:
    • cache.cachefile (optional): Name of the properties-file - (default = cache.properties)
    • + (default = cache.properties)
    Comparator options
    equal Very simple object comparison.
    rule Uses java.text.RuleBasedCollator for Object - comparison. - - (see note for restrictions) -
    - -

    The <modified> selector supports a nested - <classpath> element that represents a - PATH like structure for finding custom interface implementations.

    - +
    comparator
    + Same as comparator attribute. +
    algorithmclass
    + Same as algorithmclass attribute. +
    comparatorclass
    + Same as comparatorclass attribute. +
    cacheclass
    + Same as cacheclass attribute. +
    update
    + Same as update attribute. +
    seldirs
    + Same as comparatorclass attribute. + +
    Examples

    Here are some examples of how to use the Modified Selector:

    @@ -981,12 +965,12 @@
         

    Uses com.mycompany.MyCache from a jar outside of Ants own classpath as cache implementation

    -

    Note on RuleBasedCollator

    +

    Note on RuleBasedCollator

    The RuleBasedCollator needs a format for its work, but its needed while instantiation. There is a problem in the initialization algorithm for this case. Therefore you should not use this (or tell me the workaround :-).

    -

    Signed Selector

    +

    Signed Selector

    The <signedselector> tag selects signed files and optionally @@ -995,7 +979,7 @@

    This selector has been added in Apache Ant 1.7.

    - +
    @@ -1003,12 +987,12 @@ - +
    Attribute Description
    name The signature name to check for.The signature name to check for. no
    -

    Readable Selector

    +

    Readable Selector

    The <readable> selector selects only files that are readable. Ant only invokes @@ -1016,15 +1000,15 @@ but the Java VM cannot detect this state, this selector will still select the file.

    -

    Writable Selector

    +

    Writable Selector

    The <writable> selector selects only files that are writable. Ant only invokes - java.io.File#canWrite so if a file is unwritable + java.io.File#canWrite so if a file is nonwritable but the Java VM cannot detect this state, this selector will still select the file.

    -

    Executable Selector

    +

    Executable Selector

    The <executable> selector selects only files that are executable. Ant only invokes @@ -1034,7 +1018,7 @@

    Since Ant 1.10.0

    -

    Symlink Selector

    +

    The <symlink> selector selects only files that are symbolic links. Ant only invokes @@ -1044,7 +1028,7 @@

    Since Ant 1.10.0

    -

    OwnedBy Selector

    +

    OwnedBy Selector

    The <ownedBy> selector selects only files that are owned by the given user. Ant only invokes @@ -1054,7 +1038,7 @@

    Since Ant 1.10.0

    - +
    @@ -1067,7 +1051,7 @@
    Attribute Description
    -

    Script Selector

    +

    Script Selector

    The <scriptselector> element enables you @@ -1082,7 +1066,7 @@

    This selector was added in Apache Ant 1.7.

    - +
    @@ -1109,7 +1093,7 @@ - + @@ -1152,7 +1136,7 @@ The following beans are configured for every script, alongside the classic set of project, properties, and targets. -
    Attribute Description
    encodingThe encoding of the script as a file. since Ant 1.10.2.The encoding of the script as a file. since Ant 1.10.2 No - defaults to default JVM encoding
    +
    @@ -1185,7 +1169,7 @@ attributes. Only the selected flag is writable, the rest are read only via their getter methods. -
    Bean Description
    +
    @@ -1232,7 +1216,7 @@ Select files whose filename length is even. -

    Selector Containers

    +

    Selector Containers

    To create more complex selections, a variety of selectors that contain other selectors are available for your use. They combine the @@ -1283,7 +1267,7 @@ Select files whose filename length is even.

  • <size>
  • -

    And Selector

    +

    And Selector

    The <and> tag selects files that are selected by all of the elements it contains. It returns as @@ -1306,15 +1290,14 @@ Select files whose filename length is even. since the last millennium.

    - -

    Majority Selector

    +

    Majority Selector

    The <majority> tag selects files provided that a majority of the contained elements also select it. Ties are dealt with as specified by the allowtie attribute.

    -
    Attribute Description
    +
    @@ -1330,7 +1313,6 @@ Select files whose filename length is even.
    Attribute Description
    -

    Here is an example of how to use the Majority Selector:

    @@ -1348,8 +1330,7 @@ Select files whose filename length is even.
         match case exactly).
         

    - -

    None Selector

    +

    None Selector

    The <none> tag selects files that are not selected by any of the elements it contains. It returns as @@ -1374,8 +1355,7 @@ Select files whose filename length is even. class files in the dest directory.

    - -

    Not Selector

    +

    Not Selector

    The <not> tag reverses the meaning of the single selector it contains. @@ -1395,8 +1375,7 @@ Select files whose filename length is even. string "test".

    - -

    Or Selector

    +

    Or Selector

    The <or> tag selects files that are selected by any one of the elements it contains. It returns as @@ -1421,8 +1400,7 @@ Select files whose filename length is even. image files below it.

    - -

    Selector Reference

    +

    Selector Reference

    The <selector> tag is used to create selectors that can be reused through references. It is the only selector which can @@ -1440,7 +1418,7 @@ Select files whose filename length is even. <exclude> tags within a <patternset>.

    - +
    @@ -1519,7 +1497,7 @@ Select files whose filename length is even.

    A fileset that conditionally contains Java source files and Test source and class files.

    -

    Custom Selectors

    +

    Custom Selectors

    You can write your own selectors and use them within the selector containers by specifying them within the <custom> tag.

    @@ -1535,7 +1513,7 @@ Select files whose filename length is even. the <custom> tag.

    -
    Attribute Description
    +
    @@ -1614,8 +1592,5 @@ Select files whose filename length is even.

    For more details concerning writing your own selectors, consult Programming Selectors in Ant.

    - - - diff --git a/manual/Types/tarfileset.html b/manual/Types/tarfileset.html index 499ed7984..6a726ff4b 100644 --- a/manual/Types/tarfileset.html +++ b/manual/Types/tarfileset.html @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. --> - @@ -22,7 +21,7 @@ TarFileSet Type -

    TarFileSet

    +

    TarFileSet

    TarFileSet has been added as a stand-alone type in Apache Ant 1.7.

    @@ -54,7 +53,7 @@ style="font-style: italic;">refid attribute. This is also true for tarfileset which has been added in Ant 1.7.

    Parameters

    -
    Attribute Description
    +
    @@ -63,13 +62,13 @@ for tarfileset which has been added in Ant 1.7.
    - - @@ -82,15 +81,15 @@ in the archive. - - @@ -177,6 +176,5 @@ some-dir and discards the rest of the archive. File timestamps will be compared between the archive's entries and files inside the target directory, no files get overwritten unless they are out-of-date.

    - diff --git a/manual/Types/xmlcatalog.html b/manual/Types/xmlcatalog.html index a0ddafc0f..5c8bc14fc 100644 --- a/manual/Types/xmlcatalog.html +++ b/manual/Types/xmlcatalog.html @@ -24,16 +24,16 @@ -

    XMLCatalog

    +

    XMLCatalog

    An XMLCatalog is a catalog of public resources such as DTDs or entities that are referenced in an XML document. Catalogs are typically used to make web references to resources point to a locally cached copy of the resource.

    -

    This allows the XML Parser, XSLT Processor or other consumer of XML +

    This allows the XML Parser, XSLT Processor or other consumer of XML documents -to efficiently allow a local substitution for a resource available on the +to efficiently allow a local substitution for a resource available on the web.

    Note: This task uses, but does not depend on external @@ -49,30 +49,30 @@ the org.xml.sax.EntityResolver and javax.xml.transform.URIResolver interfaces as defined in the Java API for XML Processing (JAXP) Specification.

    -

    For example, in a web.xml file, the DTD is referenced as: +

    For example, in a web.xml file, the DTD is referenced as:

     <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
       "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
     
    -The XML processor, without XMLCatalog support, would need to retrieve the +

    +The XML processor, without XMLCatalog support, would need to retrieve the DTD from the URL specified whenever validation of the document was required.

    This can be very time consuming during the build process, especially where network throughput is limited. Alternatively, you -can do the following: +can do the following:

    1. Copy web-app_2_2.dtd onto your local disk somewhere (either in the filesystem or even embedded inside a jar or zip file on the classpath).
    2. -
    3. Create an <xmlcatalog> with a <dtd> +
    4. Create an <xmlcatalog> with a <dtd> element whose location attribute points to the file.
    5. Success! The XML processor will now use the local copy instead of calling out to the internet.
    -

    XMLCatalogs can appear inside tasks that support this feature or at the same level as target -- i.e., as children of project for reuse across different +- i.e., as children of project for reuse across different tasks, e.g. XML Validation and XSLT Transformation. The XML Validate task uses XMLCatalogs for entity resolution. The XSLT Transformation @@ -101,7 +101,7 @@ href="http://oasis-open.org/committees/entity/background/9401.html"> plain text format or XML format. If the xml-commons resolver library is not found in the -classpath, external catalog files, specified in catalogpath, +classpath, external catalog files, specified in catalogpath, will be ignored and a warning will be logged. In this case, however, processing of inline entries will proceed normally.

    @@ -109,10 +109,10 @@ proceed normally.

    <entity> elements may be specified inline; these roughly correspond to OASIS catalog entry types PUBLIC and URI respectively. By contrast, external catalog files -may use any of the entry types defined in the +may use any of the entry types defined in the +OASIS specification.

    -

    Entity/DTD/URI Resolution Algorithm

    +

    Entity/DTD/URI Resolution Algorithm

    When an entity, DTD, or URI is looked up by the XML processor, the XMLCatalog searches its list of entries to see if any match. That is, @@ -142,7 +142,6 @@ contains foo/bar/blat.dtd it will resolve an entity whose will not resolve an entity whose location is blat.dtd. -

    3a. Apache xml-commons resolver lookup

    What happens next depends on whether the resolver library from @@ -169,7 +168,7 @@ configuration, further resolution failures may or may not result in fatal (i.e. build-ending) errors.

    XMLCatalog attributes

    -
    Attribute
    prefixall files in the fileset are prefixed with that + all files in the fileset are prefixed with that path in the archive. No
    fullpaththe file described by the fileset is placed at + the file described by the fileset is placed at that exact location in the archive. No
    filemodeA 3 digit octal string, specify the user, group -and other modes in the standard Unix fashion. Only applies to + A 3 digit octal string, specify the user, group +and other modes in the standard Unix fashion. Only applies to plain files. Default is 644. No
    dirmodeA 3 digit octal string, specify the user, group -and other modes in the standard Unix fashion. Only applies to + A 3 digit octal string, specify the user, group +and other modes in the standard Unix fashion. Only applies to directories. Default is 755. No
    +
    @@ -177,14 +176,14 @@ fatal (i.e. build-ending) errors.

    - - @@ -195,7 +194,7 @@ contents

    dtd/entity

    The dtd and entity elements used to specify XMLCatalogs are identical in their structure

    -
    Attribute Description
    ida unique name for an XMLCatalog, used for referencing + a unique name for an XMLCatalog, used for referencing the XMLCatalog's contents from another XMLCatalog No
    refidthe id of another XMLCatalog whose + the id of another XMLCatalog whose contents you would like to be used for this XMLCatalog No
    +
    @@ -203,17 +202,17 @@ XMLCatalogs are identical in their structure

    - -
    Attribute Description
    publicIdThe public identifier used when defining a dtd or + The public identifier used when defining a dtd or entity, - e.g. "-//Sun Microsystems, Inc.//DTD Web Application + e.g. "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" Yes
    locationThe location of the local replacement to be used for -the public identifier specified. This may be specified as a file name, + The location of the local replacement to be used for +the public identifier specified. This may be specified as a file name, resource name found on the classpath, or a URL. Relative paths will be resolved according to the base, which by default is the Ant project basedir. @@ -239,12 +238,12 @@ resolver library from xml-commons is not available in the classpath, all catalogpaths will be ignored and a warning will be logged.

    Examples

    -

    Set up an XMLCatalog with a single dtd referenced locally in a user's -home +

    Set up an XMLCatalog with a single dtd referenced locally in a user's +home directory:

         <xmlcatalog>
    -        <dtd 
    +        <dtd
                 publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
                 location="/home/dion/downloads/docbook/docbookx.dtd"/>
         </xmlcatalog>
    @@ -254,10 +253,10 @@ filesystem (relative to the Ant project basedir) or in the classpath:
     

         <xmlcatalog id="commonDTDs">
    -        <dtd 
    +        <dtd
                 publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
                 location="docbook/docbookx.dtd"/>
    -        <dtd 
    +        <dtd
                 publicId="-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
                 location="web-app_2_2.dtd"/>
         </xmlcatalog>
    @@ -269,19 +268,19 @@ formats:

         <xmlcatalog id="allcatalogs">
    -        <dtd 
    +        <dtd
                 publicId="-//ArielPartners//DTD XML Article V1.0//EN"
                 location="com/arielpartners/knowledgebase/dtd/article.dtd"/>
    -        <entity 
    +        <entity
                 publicId="LargeLogo"
                 location="com/arielpartners/images/ariel-logo-large.gif"/>
             <xmlcatalog refid="commonDTDs"/>
                 <catalogpath>
                     <pathelement location="/etc/sgml/catalog"/>
    -                <fileset 
    +                <fileset
                         dir="/anetwork/drive"
                         includes="**/catalog"/>
    -                <fileset 
    +                <fileset
                         dir="/my/catalogs"
                         includes="**/catalog.xml"/>
                 </catalogpath>
    @@ -300,7 +299,5 @@ formats:

    </xslt>
    - - diff --git a/manual/Types/zipfileset.html b/manual/Types/zipfileset.html index 955e2718e..3e28a00b1 100644 --- a/manual/Types/zipfileset.html +++ b/manual/Types/zipfileset.html @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. --> - @@ -22,7 +21,7 @@ ZipFileSet Type -

    ZipFileSet

    +

    ZipFileSet

    A <zipfileset> is a special form of a <fileset> which can behave in 2 @@ -31,7 +30,7 @@ different ways :

    • When the src attribute is used - or a nested resource collection has been specified - (since Apache Ant 1.7), the zipfileset is populated with + (since Apache Ant 1.7), the zipfileset is populated with zip entries found in the file src.
    • @@ -46,12 +45,12 @@ is used, the zipfileset is populated with filesystem files found under -

      Since Ant 1.6, a zipfileset can be defined with the Since Ant 1.6, a zipfileset can be defined with the id attribute and referred to with the refid attribute.

      Parameters

      - +
      @@ -60,13 +59,13 @@ the refid attribute.
      - - @@ -79,16 +78,16 @@ in the archive. - + - + @@ -132,17 +131,20 @@ single element resource collection

      Examples

      -
        <zip destfile="${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"/>
      </zip>
      +
        <zip destfile="${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"/>
      +  </zip>

      zips all files in the htdocs/manual directory into the docs/user-guide directory in the archive, adds the file ChangeLog27.txt in the current directory as docs/ChangeLog.txt, and includes all the html files in examples.zip under docs/examples. The archive might end up containing the files:

      - docs/user-guide/html/index.html
      + docs/user-guide/html/index.html
      docs/ChangeLog.txt
      docs/examples/index.html
      - diff --git a/manual/stylesheets/style.css b/manual/stylesheets/style.css index f1e8f8479..3e1f10cf5 100644 --- a/manual/stylesheets/style.css +++ b/manual/stylesheets/style.css @@ -52,6 +52,15 @@ h5 + p, h6 + p { margin-bottom: .5rem; } +h1 > a, h2 > a, h3 > a, h4 > a, h5 > a, h6 > a { + color: white; +} + +h1 > a:visited, h2 > a:visited, h3 > a:visited, h4 > a:visited, h5 > a:visited, h6 > a:visited, +h1 > a:hover, h2 > a:hover, h3 > a:hover, h4 > a:hover, h5 > a:hover, h6 > a:hover { + color: lightskyblue; +} + td { background-color: #eeeeee; color: black;
      Attribute
      prefixall files in the fileset are prefixed with that + all files in the fileset are prefixed with that path in the archive. No
      fullpaththe file described by the fileset is placed at + the file described by the fileset is placed at that exact location in the archive. No
      filemodeA 3 digit octal string, specify the user, group -and other modes in the standard Unix fashion. Only applies to -plain files. Default is 644. since Ant 1.5.2.A 3 digit octal string, specify the user, group +and other modes in the standard Unix fashion. Only applies to +plain files. Default is 644. Since Ant 1.5.2 No
      dirmodeA 3 digit octal string, specify the user, group -and other modes in the standard Unix fashion. Only applies to -directories. Default is 755. since Ant 1.5.2.A 3 digit octal string, specify the user, group +and other modes in the standard Unix fashion. Only applies to +directories. Default is 755. Since Ant 1.5.2 No