Update of /cvsroot/tm4j/tm4j/lib/ant/apache-ant-1.7.0/docs/manual/CoreTypes In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv12860/lib/ant/apache-ant-1.7.0/docs/manual/CoreTypes Added Files: antlib.html assertions.html custom-programming.html description.html dirset.html filelist.html fileset.html filterchain.html filterset.html mapper.html namespace.html patternset.html permissions.html propertyset.html redirector.html regexp.html resources.html selectors-program.html selectors.html tarfileset.html xmlcatalog.html zipfileset.html Log Message: Update 4 years old ant. --- NEW FILE: redirector.html --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> <title>Redirector Type</title> </head> <body> <h2><a name="redirector">I/O redirection</a></h2> <p>For many tasks, input and output can be defined in a fairly straightforward fashion. The <a href="../CoreTasks/exec.html">exec</a> task, used to execute an external process, stands as a very basic example. The executed process may accept input, produce output, or do either or both depending upon various circumstances. Output may be classified as "output" or as "error output." The <code><redirector></code> type provides a concrete means of redirecting input and output featuring the use of <a href="./mapper.html">File Mapper</a>s to specify source (input) and destination (output/error) files. <em>Since Ant 1.6.2</em> <p>The <code><redirector></code> element accepts the following attributes:</p> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">output</td> <td valign="top">Name of a file to which output should be written. If the error stream is not also redirected to a file or property, it will appear in this output.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">error</td> <td valign="top">The file to which the standard error of the command should be redirected.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">logError</td> <td valign="top">This attribute is used when you wish to see error output in Ant's log and you are redirecting output to a file/property. The error output will not be included in the output file/property. If you redirect error with the <i>error</i> or <i>errorProperty</i> attributes, this will have no effect.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">append</td> <td valign="top">Whether output and error files should be appended to rather than overwritten. Defaults to <code>false</code>.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">createemptyfiles</td> <td valign="top">Whether output and error files should be created even when empty. Defaults to <code>true</code>.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">outputproperty</td> <td valign="top">The name of a property in which the output of the command should be stored. Unless the error stream is redirected to a separate file or stream, this property will include the error output.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">errorproperty</td> <td valign="top">The name of a property in which the standard error of the command should be stored.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">input</td> <td valign="top">A file from which the executed command's standard input is taken. This attribute is mutually exclusive with the <i>inputstring</i> attribute.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">inputstring</td> <td valign="top">A string which serves as the input stream for the executed command. This attribute is mutually exclusive with the <i>input</i> attribute.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">inputencoding</td> <td valign="top">The input encoding.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">outputencoding</td> <td valign="top">The output encoding.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">errorencoding</td> <td valign="top">The error encoding.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">alwayslog</td> <td valign="top">Always send to the log in addition to any other destination. <i>Since Ant 1.6.3</i>. </td> <td align="center" valign="top">No, default is <code>false</code></td> </tr> <tr> <td valign="top">loginputstring</td> <td valign="top">Controls the display of <i>inputstring</i>'s value in log messages. Set to <code>false</code> when sending sensitive data (e.g. passwords) to external processes. <i>Since Ant 1.6.3</i>. </td> <td align="center" valign="top">No, default is <code>true</code></td> </tr> </table> <h3>Parameters specified as nested elements</h3> <h4>inputmapper</h4> <p>A single <a href="./mapper.html">File Mapper</a> used to redirect process input. Multiple mapping results should concatenate all mapped files as input. Mapping will ordinarily be performed on a task-specified sourcefile; consult the documentation of the individual task for more details. A nested <code><inputmapper></code> is not compatible with either of the <i>input</i> or <i>inputstring</i> attributes.</p> <h4>outputmapper</h4> <p>A single <a href="./mapper.html">File Mapper</a> used to redirect process output. Mapping will ordinarily be performed on a task-specified sourcefile; consult the documentation of the individual task for more details. A nested <code><outputmapper></code> is not compatible with the <i>output</i> attribute.</p> <h4>errormapper</h4> <p>A single <a href="./mapper.html">File Mapper</a> used to redirect error output. Mapping will ordinarily be performed on a task-specified sourcefile; consult the documentation of the individual task for more details. A nested <code><errormapper></code> is not compatible with the <i>error</i> attribute.</p> <h4>inputfilterchain</h4> <p>A <a href="./filterchain.html">FilterChain</a> can be applied to the process input.</p> <h4>outputfilterchain</h4> <p>A <a href="./filterchain.html">FilterChain</a> can be applied to the process output.</p> <h4>errorfilterchain</h4> <p>A <a href="./filterchain.html">FilterChain</a> can be applied to the error output.</p> <h3>Usage</h3> Tasks known to support I/O redirection: <ul> <li><a href="../CoreTasks/exec.html">Exec</a></li> <li><a href="../CoreTasks/apply.html">Apply</a></li> <li><a href="../CoreTasks/java.html">Java</a></li> </ul> <p>The expected behavior of a <code><redirector></code> is to a great degree dependent on the supporting task. Any possible points of confusion should be noted at the task level.</p> </body> </html> --- NEW FILE: permissions.html --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> <title>Permissions type</title> </head> <body> <h2><a name="permissions">Permissions</a></h2> <p> Permissions represents a set of security permissions granted or revoked to a specific part code executed in the JVM where ant is running in. The actual Permissions are specified via a set of nested permission items either <code><grant></code>ed or <code><revoke></code>d.</p> <p> In the base situation a <a href="#baseset">base set</a> 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 <code>SecurityException</code> if the code subject to these permissions try to use an permission that has not been granted or that has been revoked.</p> <h3>Nested elements</h3> <h4>grant</h4> <p> Indicates a specific permission is always granted. Its attributes indicate which permissions are granted.</p> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">class</td> <td valign="top">The fully qualified name of the Permission class.</td> <td valign="top" align="center">Yes</td> </tr> <tr> <td valign="top">name</td> <td valign="top">The name of the Permission. The actual contents depends on the Permission class.</td> <td valign="top" align="center">No</td> </tr> <tr> <td valign="top">actions</td> <td valign="top">The actions allowed. The actual contents depend on the Permission class and name.</td> <td valign="top" align="center">No</td> </tr> </table> <p> Implied permissions are granted. </p> <p> Please note that some Permission classes may actually need a name and / or actions in order to function properly. The name and actions are parsed by the actual Permission class. </p> <h4>revoke</h4> <p> Indicates a specific permission is revoked.</p> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">class</td> <td valign="top">The fully qualified name of the Permission class.</td> <td valign="top" align="center">Yes</td> </tr> <tr> <td valign="top">name</td> <td valign="top">The name of the Permission. The actual contents depends on the Permission class.</td> <td valign="top" align="center">No</td> </tr> <tr> <td valign="top">actions</td> <td valign="top">The actions allowed. The actual contents depend on the Permission class and name.</td> <td valign="top" align="center">No</td> </tr> </table> <p> Implied permissions are not resolved and therefore also not revoked. </p> <p> 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. </p> <h3><a name="baseset">Base set</a></h3> A permissions set implictly contains the following permissions: <blockquote><pre> <grant class="java.net.SocketPermission" name="localhost:1024-" actions="listen"> <grant class="java.util.PropertyPermission" name="java.version" actions="read"> <grant class="java.util.PropertyPermission" name="java.vendor" actions="read"> <grant class="java.util.PropertyPermission" name="java.vendor.url" actions="read"> <grant class="java.util.PropertyPermission" name="java.class.version" actions="read"> <grant class="java.util.PropertyPermission" name="os.name" actions="read"> <grant class="java.util.PropertyPermission" name="os.version" actions="read"> <grant class="java.util.PropertyPermission" name="os.arch" actions="read"> <grant class="java.util.PropertyPermission" name="file.encoding" actions="read"> <grant class="java.util.PropertyPermission" name="file.separator" actions="read"> <grant class="java.util.PropertyPermission" name="path.separator" actions="read"> <grant class="java.util.PropertyPermission" name="line.separator" actions="read"> <grant class="java.util.PropertyPermission" name="java.specification.version" actions="read"> <grant class="java.util.PropertyPermission" name="java.specification.vendor" actions="read"> <grant class="java.util.PropertyPermission" name="java.specification.name" actions="read"> <grant class="java.util.PropertyPermission" name="java.vm.specification.version" actions="read"> <grant class="java.util.PropertyPermission" name="java.vm.specification.vendor" actions="read"> <grant class="java.util.PropertyPermission" name="java.vm.specification.name" actions="read"> <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"> </blockquote></pre> These permissions can be revoked via <code><revoke></code> elements if necessary. <h3>Examples</h3> <blockquote><pre> <permissions> <grant class="java.security.AllPermission"/> <revoke class="java.util.PropertyPermission"/> </permissions> </pre></blockquote> <p> Grants all permissions to the code except for those handling Properties. </p> <blockquote><pre> <permissions> <grant class="java.net.SocketPermission" name="foo.bar.com" action="connect"/> <grant class="java.util.PropertyPermission" name="user.home" action="read,write"/> </permissions> </pre></blockquote> <p> Grants the base set of permissions with the addition of a SocketPermission to connect to foo.bar.com and the permission to read and write the user.home system property. </p> </body> </html> --- NEW FILE: antlib.html --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <html> <head> <meta http-equiv="Content-Language" content="en-us"></meta> <link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> <title>AntLib</title> </head> <body> <h2><a name="antlib">Antlib</a></h2> <h3>Description</h3> <p> An antlib file is an xml file with a root element of "antlib". Antlib's elements are ant definition tasks - like and <a href="../CoreTasks/taskdef.html">Taskdef</a>, or any ant task that extends <code>org.apache.tools.ant.taskdefs.AntlibDefinition</code>. </p> <p> The current set of declarations bundled with Ant that do this are: </p> <ol> <li><a href="../CoreTasks/typedef.html">Typedef</a> </li> <li><a href="../CoreTasks/taskdef.html">Taskdef</a> </li> <li><a href="../CoreTasks/macrodef.html">Macrodef</a> </li> <li><a href="../CoreTasks/presetdef.html">Presetdef</a> </li> <li><a href="../OptionalTasks/scriptdef.html">Scriptdef</a> </li> </ol> <p> A group of tasks and types may be defined together in an antlib file. For example the file <i>sample.xml</i> contains the following: </p> <blockquote> <pre> <?xml version="1.0"?> <antlib> <typedef name="if" classname="org.acme.ant.If"/> <typedef name="scriptpathmapper" classname="org.acme.ant.ScriptPathMapper" onerror="ignore"/> <macrodef name="print"> <attribute name="file"/> <sequential> <concat taskname="print"> <fileset dir="." includes="@{file}"/> </concat> </sequential> </macrodef> </antlib> </pre> </blockquote> <p> It defines two types or tasks, <i>if</i> and <i>scriptpathmapper</i>. This antlib file may be used in a build script as follows: </p> <blockquote> <pre> <typedef file="sample.xml"/> </pre> </blockquote> <p> The other attributes of <code><typedef></code> may be used as well. For example, assuming that the <i>sample.xml</i> is in a jar file <i>sample.jar</i> also containing the classes, the following build fragment will define the <i>if</i> and <i>scriptpathmapper</i> tasks/types and place them in the namespace uri <i>samples:/acme.org</i>. </p> <blockquote> <pre> <typedef resource="org/acme/ant/sample.xml" uri="samples:/acme.org"/> </pre> </blockquote> <p> The definitions may then be used as follows: </p> <blockquote> <pre> <sample:if valuetrue="${props}" xmlns:sample="samples:/acme.org"> <sample:scriptpathmapper language="beanshell"> some bean shell </sample:scriptpathmapper> </sample:if> </pre> </blockquote> <h3><a name="antlibnamespace">Antlib namespace</a></h3> <p> The name space URIs with the pattern <b>antlib:<i>java package</i></b> are given special treatment. </p> <p> When ant encounters a element with a namespace URI with this pattern, it will check to see if there is a resource of the name <i>antlib.xml</i> in the package directory in the default classpath. </p> <p> For example, assuming that the file <i>antcontrib.jar</i> has been placed in the directory <i>/Users/antoine/dev/asf/ant-core/bootstrap/lib</i> and it contains the resource <i>net/sf/antcontrib/antlib.xml</i> which has all antcontrib's definitions defined, the following build file will automatically load the antcontrib definitions at location <i>HERE</i>: </p> <blockquote> <pre> <project default="deletetest" xmlns:antcontrib="antlib:net.sf.antcontrib"> <macrodef name="showdir"> <attribute name="dir"/> <sequential> <antcontrib:shellscript shell="bash"> <!-- HERE --> ls -Rl @{dir} </antcontrib:shellscript> </sequential> </macrodef> <target name="deletetest"> <delete dir="a" quiet="yes"/> <mkdir dir="a/b"/> <touch file="a/a.txt"/> <touch file="a/b/b.txt"/> <delete> <fileset dir="a"/> </delete> <showdir dir="a"/> </target> </project> </pre> </blockquote> <p> The requirement that the resource is in the default classpath may be removed in future versions of Ant.</p> </p> <h3><a name="loadFromInside">Load antlib from inside of the buildfile</a></h3> <p> If you want to seperate 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 <tt><taskdef></tt>. </p> <blockquote> <pre> <project xmlns:<font color="green">antcontrib</font>="<font color="red">antlib:net.sf.antcontrib</font>"> <taskdef uri="<font color="red">antlib:net.sf.antcontrib</font>" resource="net/sf/antcontrib/antlib.xml" classpath="path/to/ant-contrib.jar"/> <target name="iterate"> <<font color="green">antcontrib</font>:for param="file"> <fileset dir="."/> <sequential> <echo message="- @{file}"/> </sequential> </antcontrib:for> </target> </project> </pre> </blockquote> <h3><a name="currentnamespace">Current namespace</a></h3> <p> Definitions defined in antlibs may be used in antlibs. However the namespace that definitions are placed in are dependent on the <code><typedef></code> that uses the antlib. To deal with this problem, the definitions are placed in the namepace URI <i>ant:current</i> for the duration of the antlib execution. For example the following antlib defines the task <code><if></code>, the type <code><isallowed></code> and a macro <code><ifallowed></code> that makes use of the task and type: </p> <blockquote> <pre> <antlib xmlns:current="ant:current"> <taskdef name="if" classname="org.acme.ant.If"/> <typedef name="isallowed" classname="org.acme.ant.Isallowed"/> <macrodef name="ifallowed"> <attribute name="action"/> <element name="do"/> <sequential> <current:if> <current:isallowed test="@{action}"/> <current:then> <do/> </current:then> </current:if> </sequential> </macrodef> </antlib> </pre> </blockquote> <h3>Other examples and comments</h3> <p> Antlibs may make use of other antlibs. </p> <p> As the names defined in the antlib are in the namespace uri as specified by the calling <code><typedef></code> or by automatic element resolution, one may reuse names from core ant types and tasks, provided the caller uses a namespace uri. For example, the following antlib may be used to define defaults for various tasks: </p> <blockquote> <pre> <antlib xmlns:antcontrib="antlib:net.sf.antcontrib"> <presetdef name="javac"> <javac deprecation="false" debug="true"/> </presetdef> <presetdef name="delete"> <delete quiet="yes"/> </presetdef> <presetdef name="shellscript"> <antcontrib:shellscript shell="bash"/> </presetdef> </antlib> </pre> </blockquote> <p> This may be used as follows: </p> <blockquote> <pre> <project xmlns:local="localpresets"> <typedef file="localpresets.xml" uri="localpresets"/> <local:shellscript> echo "hello world" </local:shellscript> </project> </pre> </blockquote> </body> </html> --- NEW FILE: dirset.html --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> <title>DirSet Type</title> </head> <body> <h2><a name="dirset">DirSet</a></h2> <p>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 <a href="patternset.html">PatternSets</a> and <a href="selectors.html">Selectors</a>. </p> <p>PatternSets can be specified as nested <code><patternset></code> elements. In addition, DirSet holds an implicit PatternSet and supports the nested <code><include></code>, <code><includesfile></code>, <code><exclude></code> and <code><excludesfile></code> elements of <code><patternset></code> directly, as well as <code><patternset></code>'s attributes.</p> <p>Selectors are available as nested elements within the DirSet. 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 <code><and></code> selector container.</p> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">dir</td> <td valign="top">The root of the directory tree of this DirSet.</td> <td valign="top" align="center">Yes</td> </tr> <tr> <td valign="top">includes</td> <td valign="top">A comma- or space-separated list of patterns of directories that must be included; all directories are included when omitted.</td> <td valign="top" align="center">No</td> </tr> <tr> <td valign="top">includesfile</td> <td valign="top">The name of a file; each line of this file is taken to be an include pattern.</td> <td valign="top" align="center">No</td> </tr> <tr> <td valign="top">excludes</td> <td valign="top">A comma- or space-separated list of patterns of directories that must be excluded; no directories are excluded when omitted.</td> <td valign="top" align="center">No</td> </tr> <tr> <td valign="top">excludesfile</td> <td valign="top">The name of a file; each line of this file is taken to be an exclude pattern.</td> <td valign="top" align="center">No</td> </tr> <tr> <td valign="top">casesensitive</td> <td valign="top">Specifies whether case-sensitivity should be applied (<code>true</code>|<code>yes</code>|<code>on</code> or <code>false</code>|<code>no</code>|<code>off</code>).</td> <td valign="top" align="center">No; defaults to true.</td> </tr> <tr> <td valign="top">followsymlinks</td> <td valign="top">Shall symbolic links be followed? Defaults to true. See <a href="fileset.html#symlink">fileset's documentation</a>.</td> <td valign="top" align="center">No</td> </tr> </table> <h4>Examples</h4> <blockquote><pre> <dirset dir="build"> <include name="apps/**/classes"/> <exclude name="apps/**/*Test*"/> </dirset> </pre></blockquote> <p>Groups all directories named <code>classes</code> found under the <code>apps</code> subdirectory of <code>build</code>, except those that have the text <code>Test</code> in their name.</p> <blockquote><pre> <dirset dir="build"> <patternset id="non.test.classes"> <include name="apps/**/classes"/> <exclude name="apps/**/*Test*"/> </patternset> </dirset> </pre></blockquote> <p>Groups the same directories as the above example, but also establishes a PatternSet that can be referenced in other <code><dirset></code> elements, rooted at a different directory.</p> <blockquote><pre> <dirset dir="${debug_build.dir}"> <patternset refid="non.test.classes"/> </dirset> </pre></blockquote> <p>Groups all directories in directory <code>${debug_build.dir}</code>, using the same patterns as the above example.</p> </body> </html> --- NEW FILE: selectors.html --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <html> <head> <meta http-equiv="Content-Language" content="en-us"> [...1489 lines suppressed...] <blockquote><pre> <fileset dir="${doc.path}" includes="**/*"> <custom classname="org.apache.tools.ant.types.selectors.DepthSelector"> <param name="max" value="1"/> </custom> </fileset> </pre></blockquote> <p>Selects all files in the base directory and one directory below that.</p> <p>For more details concerning writing your own selectors, consult <a href="selectors-program.html">Programming Selectors in Ant</a>.</p> </body> </html> --- NEW FILE: filelist.html --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> <title>FileList Type</title> </head> <body> <h2><a name="filelist">FileList</a></h2> <p>FileLists are explicitly named lists of files. Whereas FileSets act as filters, returning only those files that exist in the file system and match specified patterns, FileLists are useful for specifying files that may or may not exist. Multiple files are specified as a list of files, relative to the specified directory, with no support for wildcard expansion (filenames with wildcards will be included in the list unchanged). FileLists can appear inside tasks that support this feature or as stand-alone types. </p> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">dir</td> <td valign="top">The base directory of this FileList.</td> <td valign="top" align="center">Yes</td> </tr> <tr> <td valign="top">files</td> <td valign="top">The list of file names. This is a list of file name separated by whitespace, or by commas.</td> <td valign="top" align="center"> Yes, unless there is a nested file element</td> </tr> </table> <h4>Nested Element: file</h4> <p> This represents a file name. The nested element allows filenames containing white space and commas. </p> <p><em>Since Ant 1.6.2</em></p> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">name</td> <td valign="top">The name of the file.</td> <td valign="top" align="center">Yes</td> </tr> </table> <h4>Examples</h4> <blockquote><pre> <filelist id="docfiles" dir="${doc.src}" files="foo.xml,bar.xml"/> </pre></blockquote> <p>The files <code>${doc.src}/foo.xml</code> and <code>${doc.src}/bar.xml</code>. Note that these files may not (yet) actually exist. </p> <blockquote><pre> <filelist id="docfiles" dir="${doc.src}" files="foo.xml bar.xml"/> </pre></blockquote> <p>Same files as the example above.</p> <blockquote><pre> <filelist refid="docfiles"/> </pre></blockquote> <p>Same files as the example above.</p> <blockquote><pre> <filelist id="docfiles" dir="${doc.src}"> <file name="foo.xml"/> <file name="bar.xml"/> </filelist> </pre></blockquote> <p>Same files as the example above.</p> </body> </html> --- NEW FILE: regexp.html --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> <title>Regexp Type</title> </head> <body> <h2><a name="regexp">Regexp</a></h2> <p> Regexp represents a regular expression. <h3>Parameters</h3> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">pattern</td> <td valign="top">regular expression pattern</td> <td valign="top" align="center">Yes</td> </tr> </table> <h3>Examples</h3> <blockquote><pre> <regexp id="myregexp" pattern="alpha(.+)beta"/><br> </pre></blockquote> <p> Defines a regular expression for later use with id myregexp. </p> <blockquote><pre> <regexp refid="myregexp"/><br> </pre></blockquote> <p> Use the regular expression with id myregexp. </p> <h3><a name="implementation">Choice of regular expression implementation</a></h3> <p> Ant comes with wrappers for <a href="http://java.sun.com/j2se/1.4/docs/api/java/util/regex/package-summary.html" target="_top">the java.util.regex package of JDK 1.4</a>, <a href="http://jakarta.apache.org/regexp/" target="_top">jakarta-regexp</a> and <a href="http://jakarta.apache.org/oro/" target="_top">jakarta-ORO</a>, See <a href="../install.html#librarydependencies">installation dependencies</a> concerning the supporting libraries.</p> <p> The property <code>ant.regexp.regexpimpl</code> governs which regular expression implementation will be chosen. Possible values for this property are : <ul> <li> org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp </li> <li> org.apache.tools.ant.util.regexp.JakartaOroRegexp </li> <li> org.apache.tools.ant.util.regexp.JakartaRegexpRegexp </li> </ul> It can also be another implementation of the interface <code>org.apache.tools.ant.util.regexp.Regexp</code>. If <code>ant.regexp.regexpimpl</code> is not defined, ant checks in the order Jdk14Regexp, JakartaOroRegexp, JakartaRegexp for the availability of the corresponding library. The first of these 3 which is found will be used.</p> <p> 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. <ul> <li>Jakarta Oro defines a line terminator as '\n' and is consistent with Perl.</li> <li>Jakarta RegExp uses a system-dependant line terminator.</li> <li>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)</li> </ul> <em>We <b>strongly</b> recommend that you use Jakarta Oro.</em> </p> <h3>Usage</h3> The following tasks and types use the Regexp type : <ul> <li><a href="../OptionalTasks/replaceregexp.html">ReplaceRegExp task</a></li> <li><a href="filterchain.html#linecontainsregexp">LineContainsRegexp filter</a></li> </ul> <p> These string filters also use the mechanism of regexp to choose a regular expression implementation : </p> <ul> <li><a href="filterchain.html#containsregex">ContainsRegex string filter</a></li> <li><a href="filterchain.html#replaceregex">ReplaceRegex string filter</a></li> </ul> </body> </html> --- NEW FILE: filterset.html --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> <title>FilterSet Type</title> </head> <body> <h2><a name="filterset">FilterSet</a></h2> <p>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 feature or at the same level as <code><target></code> - i.e., as children of <code><project></code>.</p> <p>FilterSets support the <code>id</code> and <code>refid</code> attributes. You can define a FilterSet with an <code>id</code> attribute and then refer to that definition from another FilterSet with a <code>refid</code> attribute. It is also possible to nest filtersets into filtersets to get a set union of the contained filters.</p> <p>In addition, FilterSets can specify <code>begintoken</code> and/or <code>endtoken</code> attributes to define what to match.</p> <p>Filtersets are used for doing replacements in tasks such as <code><copy></code>, etc.</p> <p> <strong>Note: </strong>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. </p> <h2>Filterset</h2> <table cellSpacing=0 cellPadding=2 border=1> <tr> <td vAlign=top><b>Attribute</b></td> <td vAlign=top><b>Description</b></td> <td vAlign=top><b>Default</b></td> <td vAlign=top align="center"><b>Required</b></td> </tr> <tr> <td vAlign=top>begintoken</td> <td vAlign=top>The string marking the beginning of a token (eg., <code>@DATE@</code>).</td> <td vAlign=top>@</td> <td vAlign=top align="center">No</td> </tr> <tr> <td vAlign=top>endtoken</td> <td vAlign=top>The string marking the end of a token (eg., <code>@DATE@</code>).</td> <td vAlign=top>@</td> <td vAlign=top align="center">No</td> </tr> <tr> <td vAlign=top>filtersfile</td> <td vAlign=top>Specify a single filtersfile.</td> <td vAlign=top><i>none</i></td> <td vAlign=top align="center">No</td> </tr> <tr> <td vAlign=top>recurse</td> <td vAlign=top>Indicates whether the replacement text of tokens should be searched for more tokens. <b>Since Ant 1.6.3</b></td> <td vAlign=top><i>true</i></td> <td vAlign=top align="center">No</td> </tr> <tr> <td vAlign=top>onmissingfiltersfile</td> <td vAlign=top>Indicate behavior when a nonexistent <i>filtersfile</i> is specified. One of "fail", "warn", "ignore". <b>Since Ant 1.7</b></td> <td vAlign=top>"fail"</td> <td vAlign=top align="center">No</td> </tr> </table> <h2>Filter</h2> <table cellSpacing=0 cellPadding=2 border=1> <tr> <td vAlign=top><b>Attribute</b></td> <td vAlign=top><b>Description</b></td> <td vAlign=top align="center"><b>Required</b></td> </tr> <tr> <td vAlign=top>token</td> <td vAlign=top>The token to replace (eg., <code>@DATE@</code>)</td> <td vAlign=top align="center">Yes</td> </tr> <tr> <td vAlign=top>value</td> <td vAlign=top>The value to replace it with (eg., <code>Thursday, April 26, 2001</code>).</td> <td vAlign=top align="center">Yes</td> </tr> </table> <h2>Filtersfile</h2> <table cellSpacing=0 cellPadding=2 border=1> <tr> <td vAlign=top><b>Attribute</b></td> <td vAlign=top><b>Description</b></td> <td vAlign=top align="center"><b>Required</b></td> </tr> <tr> <td vAlign=top>file</td> <td vAlign=top>A properties file of name-value pairs from which to load the tokens.</td> <td vAlign=top align="center">Yes</td> </tr> </table> <h4>Examples</h4> <p>You are copying the <code>version.txt</code> file to the <code>dist</code> directory from the <code>build</code> directory but wish to replace the token <code>@DATE@</code> with today's date.</p> <blockquote><pre> <copy file="build/version.txt" toFile="apache-ant-1.7.0/version.txt"> <filterset> <filter token="DATE" value="December 13 2006"/> </filterset> </copy> </pre></blockquote> <p>You are copying the <code>version.txt</code> file to the <code>dist</code> directory from the build directory but wish to replace the token <code>%DATE*</code> with today's date.</p> <blockquote><pre> <copy file="build/version.txt" toFile="apache-ant-1.7.0/version.txt"> <filterset begintoken="%" endtoken="*"> <filter token="DATE" value="December 13 2006"/> </filterset> </copy> </pre></blockquote> <p>Copy all the docs but change all dates and appropriate notices as stored in a file.</p> <blockquote><pre> <copy toDir="apache-ant-1.7.0/docs"> <fileset dir="build/docs"> <include name="**/*.html"> </fileset> <filterset begintoken="%" endtoken="*"> <filtersfile file="/Users/antoine/dev/asf/ant-core/dist.properties"/> </filterset> </copy> </pre></blockquote> <p>Define a FilterSet and reference it later.</p> <blockquote><pre> <filterset id="myFilterSet" begintoken="%" endtoken="*"> <filter token="DATE" value="December 13 2006"/> </filterset> <copy file="build/version.txt" toFile="apache-ant-1.7.0/version.txt"> <filterset refid="myFilterSet"/> </copy> </pre></blockquote> </body></html> --- NEW FILE: mapper.html --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> <title>Mapper Type</title> </head> <body> <h2><a name="mapper">Mapping File Names</a></h2> <p>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 <a href="../CoreTasks/javac.html">javac</a>, you know there will be <code>.class</code> files for your <code>.java</code> files) - in other cases you may want to specify the target files, either to help Ant or to get an extra bit of functionality.</p> <p>While source files are usually specified as <a href="fileset.html">fileset</a>s, you don't specify target files directly - instead, you tell Ant how to find the target file(s) for one source file. An instance of <code>org.apache.tools.ant.util.FileNameMapper</code> is responsible for this. It constructs target file names based on rules that can be parameterized with <code>from</code> and <code>to</code> attributes - the exact meaning of which is implementation-dependent.</p> <p>These instances are defined in <code><mapper></code> elements with the following attributes:</p> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">type</td> <td valign="top">specifies one of the built-in implementations.</td> <td rowspan="2" align="center" valign="middle">Exactly one of these</td> </tr> <tr> <td valign="top">classname</td> <td valign="top">specifies the implementation by class name.</td> </tr> <tr> <td valign="top">classpath</td> <td valign="top">the classpath to use when looking up <code>classname</code>.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">classpathref</td> <td valign="top">the classpath to use, given as <a href="../using.html#references">reference</a> to a path defined elsewhere.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">from</td> <td valign="top">the <code>from</code> attribute for the given implementation.</td> <td align="center" valign="top">Depends on implementation.</td> </tr> <tr> <td valign="top">to</td> <td valign="top">the <code>to</code> attribute for the given implementation.</td> <td align="center" valign="top">Depends on implementation.</td> </tr> </table> <p>Note that Ant will not automatically convert / or \ characters in the <code>to</code> and <code>from</code> attributes to the correct directory separator of your current platform. If you need to specify this separator, use <code>/</code> instead. For the regexpmapper, <code>/</code> will not work, as on windows it is the '\' character, and this is an escape character for regular expressions, one should use the <code>handledirsep</code> attribute instead. </p> <h3>Parameters specified as nested elements</h3> <p>The classpath can be specified via a nested <code><classpath></code>, as well - that is, a <a href="../using.html#path">path</a>-like structure.</p> <p><b>Since Ant 1.6.2,</b> nested File Mappers can be supplied via either <CODE><mapper></CODE> elements or <a href="../CoreTasks/typedef.html"><code><typedef></code></a>'d implementations of <CODE>org.apache.tools.ant.util.FileNameMapper</CODE>. If nested File Mappers are specified by either means, the mapper will be implicitly configured as a <a href="#composite-mapper">composite mapper</a>. </p> <hr> <h3>The built-in mapper types are:</h3> <p>All built-in mappers are case-sensitive.</p> <p><b>As of Ant 1.6.2,</b> 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 <i>to</i> and <i>from</i>.<br> The <code><mapper type|classname="..."></code> usage form remains valid for reasons of backward compatibility.</p> <h4><a name="identity-mapper">identity</a></h4> <p>The target file name is identical to the source file name. Both <code>to</code> and <code>from</code> will be ignored.</p> <b>Examples:</b> <blockquote><pre> <mapper type="identity"/> <identitymapper/> </pre></blockquote> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Source file name</b></td> <td valign="top"><b>Target file name</b></td> </tr> <tr> <td valign="top"><code>A.java</code></td> <td valign="top"><code>A.java</code></td> </tr> <tr> <td valign="top"><code>foo/bar/B.java</code></td> <td valign="top"><code>foo/bar/B.java</code></td> </tr> <tr> <td valign="top"><code>C.properties</code></td> <td valign="top"><code>C.properties</code></td> </tr> <tr> <td valign="top"><code>Classes/dir/dir2/A.properties</code></td> <td valign="top"><code>Classes/dir/dir2/A.properties</code></td> </tr> </table> <h4><a name="flatten-mapper">flatten</a></h4> <p>The target file name is identical to the source file name, with all leading directory information stripped off. Both <code>to</code> and <code>from</code> will be ignored.</p> <b>Examples:</b> <blockquote><pre> <mapper type="flatten"/> <flattenmapper/> </pre></blockquote> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Source file name</b></td> <td valign="top"><b>Target file name</b></td> </tr> <tr> <td valign="top"><code>A.java</code></td> <td valign="top"><code>A.java</code></td> </tr> <tr> <td valign="top"><code>foo/bar/B.java</code></td> <td valign="top"><code>B.java</code></td> </tr> <tr> <td valign="top"><code>C.properties</code></td> <td valign="top"><code>C.properties</code></td> </tr> <tr> <td valign="top"><code>Classes/dir/dir2/A.properties</code></td> <td valign="top"><code>A.properties</code></td> </tr> </table> <h4><a name="merge-mapper">merge</a></h4> <p>The target file name will always be the same, as defined by <code>to</code> - <code>from</code> will be ignored.</p> <h5>Examples:</h5> <blockquote><pre> <mapper type="merge" to="archive.tar"/> <mergemapper to="archive.tar"/> </pre></blockquote> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Source file name</b></td> <td valign="top"><b>Target file name</b></td> </tr> <tr> <td valign="top"><code>A.java</code></td> <td valign="top"><code>archive.tar</code></td> </tr> <tr> <td valign="top"><code>foo/bar/B.java</code></td> <td valign="top"><code>archive.tar</code></td> </tr> <tr> <td valign="top"><code>C.properties</code></td> <td valign="top"><code>archive.tar</code></td> </tr> <tr> <td valign="top"><code>Classes/dir/dir2/A.properties</code></td> <td valign="top"><code>archive.tar</code></td> </tr> </table> <h4><a name="glob-mapper">glob</a></h4> <p>Both <code>to</code> and <code>from</code> define patterns that may contain at most one <code>*</code>. For each source file that matches the <code>from</code> pattern, a target file name will be constructed from the <code>to</code> pattern by substituting the <code>*</code> in the <code>to</code> pattern with the text that matches the <code>*</code> in the <code>from</code> pattern. Source file names that don't match the <code>from</code> pattern will be ignored.</p> <b>Examples:</b> <blockquote><pre> <mapper type="glob" from="*.java" to="*.java.bak"/> <globmapper from="*.java" to="*.java.bak"/> </pre></blockquote> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Source file name</b></td> <td valign="top"><b>Target file name</b></td> </tr> <tr> <td valign="top"><code>A.java</code></td> <td valign="top"><code>A.java.bak</code></td> </tr> <tr> <td valign="top"><code>foo/bar/B.java</code></td> <td valign="top"><code>foo/bar/B.java.bak</code></td> </tr> <tr> <td valign="top"><code>C.properties</code></td> <td valign="top">ignored</td> </tr> <tr> <td valign="top"><code>Classes/dir/dir2/A.properties</code></td> <td valign="top">ignored</td> </tr> </table> <blockquote><pre> <mapper type="glob" from="C*ies" to="Q*y"/> <globmapper from="C*ies" to="Q*y"/> </pre></blockquote> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Source file name</b></td> <td valign="top"><b>Target file name</b></td> </tr> <tr> <td valign="top"><code>A.java</code></td> <td valign="top">ignored</td> </tr> <tr> <td valign="top"><code>foo/bar/B.java</code></td> <td valign="top">ignored</td> </tr> <tr> <td valign="top"><code>C.properties</code></td> <td valign="top"><code>Q.property</code></td> </tr> <tr> <td valign="top"><code>Classes/dir/dir2/A.properties</code></td> <td valign="top"><code>Qlasses/dir/dir2/A.property</code></td> </tr> </table> <p> The globmapper mapper can take the following extra attributes. </p> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">casesensitive</td> <td valign="top"> 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. <em>Since Ant 1.6.3.</em> </td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">handledirsep</td> <td valign="top"> If this is specified, the mapper will ignore the difference between the normal directory separator characters - \ and /. This attribute can be true or false, the default is false. This attribute is useful for cross-platform build files. <em>Since Ant 1.6.3.</em> <td align="center" valign="top">No</td> </tr> </table> <p> An example: </p> <pre> <pathconvert property="x" targetos="unix"> <path path="Aj.Java"/> <mapper> <chainedmapper> <flattenmapper/> <globmapper from="a*.java" to="*.java.bak" casesensitive="no"/> </chainedmapper> </mapper> </pathconvert> <echo>x is ${x}</echo> </pre> <p> will output "x is j.java.bak". </p> <p> and </p> <pre> <pathconvert property="x" targetos="unix"> <path path="d/e/f/j.java"/> <mapper> <globmapper from="/Users/antoine/dev/asf/ant-core\d/e\*" to="*" ignoredirchar="yes"/> </mapper> </pathconvert> <echo>x is ${x}</echo> </pre> <p> will output "x is f/j.java". </p> <h4><a name="regexp-mapper">regexp</a></h4> <p>Both <code>to</code> and <code>from</code> define regular expressions. If the source file name matches the <code>from</code> pattern, the target file name will be constructed from the <code>to</code> pattern, using <code>\0</code> to <code>\9</code> as back-references for the full match (<code>\0</code>) or the matches of the subexpressions in parentheses. Source files not matching the <code>from</code> pattern will be ignored.</p> <p>Note that you need to escape a dollar-sign (<code>$</code>) with another dollar-sign in Ant.</p> <p>The regexp mapper needs a supporting library and an implementation of <code>org.apache.tools.ant.util.regexp.RegexpMatcher</code> that hides the specifics of the library. Ant comes with implementations for <a href="http://java.sun.com/j2se/1.4/docs/api/java/util/regex/package-summary.html" target="_top">the java.util.regex package of JDK 1.4 or higher</a>, <a href="http://jakarta.apache.org/regexp/" target="_top">jakarta-regexp</a> and <a href="http://jakarta.apache.org/oro/" target="_top">jakarta-ORO</a>. If you compile from sources and plan to use one of them, make sure the libraries are in your <code>CLASSPATH</code>. For information about using <a href="http://www.cacas.org/~wes/java/" target="_top">gnu.regexp</a> or <a href="http://www.crocodile.org/~sts/Rex/" target="_top">gnu.rex</a> with Ant, see <a href="http://marc.theaimsgroup.com/?l=ant-dev&m=97550753813481&w=2" target="_top">this</a> article.</p> <p>This means, you need one of the supported regular expression libraries <strong>and</strong> the corresponding <code>ant-[jakarta-oro, jakarta-regexp, apache-oro, apache-regexp}.jar</code> from the Ant release you are using. Make sure, both will be loaded from the same classpath, that is either put them into your <code>CLASSPATH</code>, <code>ANT_HOME/lib</code> directory or a nested <code><classpath></code> element of the mapper - you cannot have <code>ant-[jakarta-oro, jakarta-regexp, apache-oro, apache-regexp].jar</code> in <code>ANT_HOME/lib</code> and the library in a nested <code><classpath></code>.</p> <p>Ant will choose the regular-expression library based on the following algorithm:</p> <ul> <li>If the syste... [truncated message content] |