portable) dash. Submitted by: Jesse Glick <Jesse.Glick@netbeans.com> git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268781 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -31,7 +31,7 @@ | |||||
| <tr> | <tr> | ||||
| <td valign="top">append</td> | <td valign="top">append</td> | ||||
| <td valign="top">Append to an existing file?</td> | <td valign="top">Append to an existing file?</td> | ||||
| <td valign="top" align="center">No – default is false.</td> | |||||
| <td valign="top" align="center">No - default is false.</td> | |||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| <h3>Examples</h3> | <h3>Examples</h3> | ||||
| @@ -25,7 +25,7 @@ inclusion/exclusion of files works, and how to write patterns.</p> | |||||
| attributes of <code><fileset></code> (<code>dir</code> becomes <code>basedir</code>) | attributes of <code><fileset></code> (<code>dir</code> becomes <code>basedir</code>) | ||||
| as well as the nested <code><include></code>, <code><exclude></code> | as well as the nested <code><include></code>, <code><exclude></code> | ||||
| and <code><patternset></code> elements.</p> | and <code><patternset></code> elements.</p> | ||||
| <p>Style supports the use of a <param> element which is use to pass values | |||||
| <p>Style supports the use of a <param> element which is used to pass values | |||||
| to an <xsl:param> declaration.</p> | to an <xsl:param> declaration.</p> | ||||
| <h3>Parameters</h3> | <h3>Parameters</h3> | ||||
| <table border="1" cellpadding="2" cellspacing="0"> | <table border="1" cellpadding="2" cellspacing="0"> | ||||
| @@ -41,7 +41,7 @@ inclusion/exclusion of files works, and how to write patterns.</p> | |||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td valign="top">destdir</td> | <td valign="top">destdir</td> | ||||
| <td valign="top">directory where to store the results.</td> | |||||
| <td valign="top">directory in which to store the results.</td> | |||||
| <td align="center" valign="top">Yes</td> | <td align="center" valign="top">Yes</td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| @@ -13,7 +13,7 @@ directory tree starting in a base directory and are matched by | |||||
| patterns taken from a number of <a | patterns taken from a number of <a | ||||
| href="patternset.html">PatternSets</a>. FileSets can appear inside tasks | href="patternset.html">PatternSets</a>. FileSets can appear inside tasks | ||||
| that support this feature or at the same level as <code>target</code> | that support this feature or at the same level as <code>target</code> | ||||
| – i.e., as children of <code>project</code>.</p> | |||||
| - i.e., as children of <code>project</code>.</p> | |||||
| <p>PatternSets can be specified as nested | <p>PatternSets can be specified as nested | ||||
| <code><patternset></code> | <code><patternset></code> | ||||
| elements. In addition, FileSet holds an implicit PatternSet and | elements. In addition, FileSet holds an implicit PatternSet and | ||||
| @@ -11,16 +11,16 @@ | |||||
| <p>Some tasks take source files and create target files. Depending on | <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 | 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 | (using <a href="../CoreTasks/javac.html">javac</a>, you know there will be | ||||
| <code>.class</code> files for your <code>.java</code> files) – in | |||||
| <code>.class</code> files for your <code>.java</code> files) - in | |||||
| other cases you may want to specify the target files, either to help | other cases you may want to specify the target files, either to help | ||||
| Ant or to get an extra bit of functionality.</p> | Ant or to get an extra bit of functionality.</p> | ||||
| <p>While source files are usually specified as <a | <p>While source files are usually specified as <a | ||||
| href="fileset.html">fileset</a>s, you don't specify target files directly – | |||||
| 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 | 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 | instance of <code>org.apache.tools.ant.util.FileNameMapper</code> is | ||||
| responsible for this. It constructs target file names based on rules | responsible for this. It constructs target file names based on rules | ||||
| that can be parameterized with <code>from</code> and <code>to</code> | that can be parameterized with <code>from</code> and <code>to</code> | ||||
| attributes – the exact meaning of which is implementation-dependent.</p> | |||||
| attributes - the exact meaning of which is implementation-dependent.</p> | |||||
| <p>These instances are defined in <code><mapper></code> elements | <p>These instances are defined in <code><mapper></code> elements | ||||
| with the following attributes:</p> | with the following attributes:</p> | ||||
| <table border="1" cellpadding="2" cellspacing="0"> | <table border="1" cellpadding="2" cellspacing="0"> | ||||
| @@ -64,7 +64,7 @@ with the following attributes:</p> | |||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| <p>The classpath can be specified via a nested | <p>The classpath can be specified via a nested | ||||
| <code><classpath></code>, as well – that is, | |||||
| <code><classpath></code>, as well - that is, | |||||
| a <a href="../using.html#path">path</a>-like structure.</p> | a <a href="../using.html#path">path</a>-like structure.</p> | ||||
| <p>The built-in mapper types are:</p> | <p>The built-in mapper types are:</p> | ||||
| <h4><a name="identity-mapper">identity</a></h4> | <h4><a name="identity-mapper">identity</a></h4> | ||||
| @@ -128,7 +128,7 @@ leading directory information stripped off. Both <code>to</code> and | |||||
| </table> | </table> | ||||
| <h4><a name="merge-mapper">merge</a></h4> | <h4><a name="merge-mapper">merge</a></h4> | ||||
| <p>The target file name will always be the same, as defined by | <p>The target file name will always be the same, as defined by | ||||
| <code>to</code> – <code>from</code> will be ignored.</p> | |||||
| <code>to</code> - <code>from</code> will be ignored.</p> | |||||
| <h5>Examples:</h5> | <h5>Examples:</h5> | ||||
| <blockquote><pre> | <blockquote><pre> | ||||
| <mapper type="merge" to="archive.tar"/> | <mapper type="merge" to="archive.tar"/> | ||||
| @@ -26,7 +26,7 @@ any primitive type (they are converted for you from their String-representation | |||||
| in the buildfile) | in the buildfile) | ||||
| </li> | </li> | ||||
| <li> | <li> | ||||
| boolean – your method will be passed the value | |||||
| boolean - your method will be passed the value | |||||
| <i>true</i> if the value specified in the buildfile is one of <code>true</code>, | <i>true</i> if the value specified in the buildfile is one of <code>true</code>, | ||||
| <code>yes</code>, or <code>on</code>) | <code>yes</code>, or <code>on</code>) | ||||
| </li> | </li> | ||||
| @@ -62,7 +62,7 @@ For example: | |||||
| <code>/test/**</code> matches all files/directories under <code>/test/</code>, | <code>/test/**</code> matches all files/directories under <code>/test/</code>, | ||||
| such as <code>/test/x.java</code>, | such as <code>/test/x.java</code>, | ||||
| or <code>/test/foo/bar/xyz.html</code>, but not <code>/xyz.xml</code>.</p> | or <code>/test/foo/bar/xyz.html</code>, but not <code>/xyz.xml</code>.</p> | ||||
| <p>There is one "shorthand" – if a pattern ends | |||||
| <p>There is one "shorthand" - if a pattern ends | |||||
| with <code>/</code> | with <code>/</code> | ||||
| or <code>\</code>, then <code>**</code> | or <code>\</code>, then <code>**</code> | ||||
| is appended. | is appended. | ||||
| @@ -222,7 +222,7 @@ property</a> task. | |||||
| Just pass <nobr><code>-DMYVAR=%MYVAR%</code></nobr> (Windows) or | Just pass <nobr><code>-DMYVAR=%MYVAR%</code></nobr> (Windows) or | ||||
| <nobr><code>-DMYVAR=$MYVAR</code></nobr> (Unix) | <nobr><code>-DMYVAR=$MYVAR</code></nobr> (Unix) | ||||
| to Ant – you can then access | |||||
| to Ant - you can then access | |||||
| these variables inside your buildfile as <code>${MYVAR}</code>.</p> | these variables inside your buildfile as <code>${MYVAR}</code>.</p> | ||||
| <p>Two more options are: <nobr><code>-quiet</code></nobr>, | <p>Two more options are: <nobr><code>-quiet</code></nobr>, | ||||
| @@ -301,7 +301,6 @@ command. This example assumes you have set your classpath to include:</p> | |||||
| install directory's <code>lib</code> directory if you are using the | install directory's <code>lib</code> directory if you are using the | ||||
| indicated feature. Note that only one of the regexp libraries is | indicated feature. Note that only one of the regexp libraries is | ||||
| needed for use with the mappers.</p> | needed for use with the mappers.</p> | ||||
| <p/> | |||||
| <table border="1" cellpadding="2" cellspacing="0"> | <table border="1" cellpadding="2" cellspacing="0"> | ||||
| <tr> | <tr> | ||||
| @@ -38,7 +38,7 @@ Task interface.</p> | |||||
| <p>Granted, this removes some of the expressive power that is inherent in being | <p>Granted, this removes some of the expressive power that is inherent in being | ||||
| able to construct a shell command such as | able to construct a shell command such as | ||||
| <nobr><code>`find . -name foo -exec rm {}`</code></nobr>, but it | <nobr><code>`find . -name foo -exec rm {}`</code></nobr>, but it | ||||
| gives you the ability to be cross-platform – to work anywhere and | |||||
| gives you the ability to be cross-platform - to work anywhere and | |||||
| everywhere. And | everywhere. And | ||||
| hey, if you really need to execute a shell command, Ant has an | hey, if you really need to execute a shell command, Ant has an | ||||
| <exec> task that | <exec> task that | ||||
| @@ -54,7 +54,7 @@ for example, and a target for creating a distributable. You can only build a | |||||
| distributable when you have compiled first, so the distribute target | distributable when you have compiled first, so the distribute target | ||||
| <i>depends on</i> the compile target. Ant resolves these dependencies.</p> | <i>depends on</i> the compile target. Ant resolves these dependencies.</p> | ||||
| <p>It should be noted, however, that Ant's <code>depends</code> attribute | <p>It should be noted, however, that Ant's <code>depends</code> attribute | ||||
| only specifies the <i>order</i> in which targets should be executed – it | |||||
| only specifies the <i>order</i> in which targets should be executed - it | |||||
| does not affect whether the target that specifies the dependency(s) gets | does not affect whether the target that specifies the dependency(s) gets | ||||
| executed if the dependent target(s) did not (need to) run. | executed if the dependent target(s) did not (need to) run. | ||||
| </p> | </p> | ||||
| @@ -265,7 +265,7 @@ programming and scripting languages, as well as with documentation systems.</p> | |||||
| is found in a file, but no | is found in a file, but no | ||||
| filter is associated with that token, no changes take place; | filter is associated with that token, no changes take place; | ||||
| therefore, no escaping | therefore, no escaping | ||||
| method is available – but as long as you choose appropriate names for your | |||||
| method is available - but as long as you choose appropriate names for your | |||||
| tokens, this should not cause problems.</p> | tokens, this should not cause problems.</p> | ||||
| <p><b>Warning:</b> If you copy binary files with filtering turned on, you can corrupt the | <p><b>Warning:</b> If you copy binary files with filtering turned on, you can corrupt the | ||||
| files. This feature should be used with text files <em>only</em>.</p> | files. This feature should be used with text files <em>only</em>.</p> | ||||
| @@ -289,7 +289,7 @@ be used. This takes the general form of:</p> | |||||
| directory relative to the project's base directory (or an absolute | directory relative to the project's base directory (or an absolute | ||||
| filename), while the <code>path</code> attribute accepts colon- | filename), while the <code>path</code> attribute accepts colon- | ||||
| or semicolon-separated lists of locations. The <code>path</code> | or semicolon-separated lists of locations. The <code>path</code> | ||||
| attribute is intended to be used with predefined paths – in any other | |||||
| attribute is intended to be used with predefined paths - in any other | |||||
| case, multiple elements with <code>location</code> attributes should be | case, multiple elements with <code>location</code> attributes should be | ||||
| preferred.</p> | preferred.</p> | ||||
| <p>As a shortcut, the <code><classpath></code> tag | <p>As a shortcut, the <code><classpath></code> tag | ||||
| @@ -323,7 +323,7 @@ by the <code>classes</code> directory.</p> | |||||
| <p>If you want to use the same path-like structure for several tasks, | <p>If you want to use the same path-like structure for several tasks, | ||||
| you can define them with a <code><path></code> element at the | you can define them with a <code><path></code> element at the | ||||
| same level as <i>target</i>s, and reference them via their | same level as <i>target</i>s, and reference them via their | ||||
| <i>id</i> attribute – see <a href="#references">References</a> for an | |||||
| <i>id</i> attribute - see <a href="#references">References</a> for an | |||||
| example.</p> | example.</p> | ||||
| <p>A path-like structure can include a reference to another path-like | <p>A path-like structure can include a reference to another path-like | ||||
| structure via nested <code><path></code> elements:</p> | structure via nested <code><path></code> elements:</p> | ||||
| @@ -405,7 +405,7 @@ that contain space characters, nested <code>arg</code> elements can be used.</p> | |||||
| <h3><a name="references">References</a></h3> | <h3><a name="references">References</a></h3> | ||||
| <p>The <code>id</code> attribute of the buildfile's elements can be | <p>The <code>id</code> attribute of the buildfile's elements can be | ||||
| used to refer to them. This can useful if you are going to replicate | used to refer to them. This can useful if you are going to replicate | ||||
| the same snippet of XML over and over again – using a | |||||
| the same snippet of XML over and over again - using a | |||||
| <code><classpath></code> structure more than once for | <code><classpath></code> structure more than once for | ||||
| example.</p> | example.</p> | ||||
| <p>The following example:</p> | <p>The following example:</p> | ||||