Browse Source

Chop off redundant blockquotes

master
Gintas Grigelionis 7 years ago
parent
commit
7eeb33d5e8
87 changed files with 899 additions and 1194 deletions
  1. +16
    -16
      manual/Tasks/ant.html
  2. +4
    -4
      manual/Tasks/antcall.html
  3. +2
    -2
      manual/Tasks/antlr.html
  4. +1
    -3
      manual/Tasks/antstructure.html
  5. +8
    -9
      manual/Tasks/antversion.html
  6. +12
    -12
      manual/Tasks/apply.html
  7. +4
    -10
      manual/Tasks/attrib.html
  8. +10
    -10
      manual/Tasks/available.html
  9. +6
    -6
      manual/Tasks/basename.html
  10. +6
    -8
      manual/Tasks/bindtargets.html
  11. +4
    -4
      manual/Tasks/buildnumber.html
  12. +8
    -8
      manual/Tasks/cab.html
  13. +18
    -22
      manual/Tasks/ccm.html
  14. +11
    -11
      manual/Tasks/checksum.html
  15. +7
    -8
      manual/Tasks/chgrp.html
  16. +5
    -13
      manual/Tasks/chmod.html
  17. +3
    -9
      manual/Tasks/chown.html
  18. +26
    -26
      manual/Tasks/clearcase.html
  19. +42
    -42
      manual/Tasks/conditions.html
  20. +2
    -4
      manual/Tasks/copyfile.html
  21. +1
    -2
      manual/Tasks/dependset.html
  22. +9
    -19
      manual/Tasks/echoproperties.html
  23. +10
    -23
      manual/Tasks/exec.html
  24. +3
    -5
      manual/Tasks/genkey.html
  25. +8
    -8
      manual/Tasks/image.html
  26. +21
    -25
      manual/Tasks/jar.html
  27. +2
    -2
      manual/Tasks/javac.html
  28. +2
    -2
      manual/Tasks/javacc.html
  29. +1
    -6
      manual/Tasks/jdepend.html
  30. +22
    -38
      manual/Tasks/jjdoc.html
  31. +0
    -3
      manual/Tasks/jjtree.html
  32. +7
    -10
      manual/Tasks/junitreport.html
  33. +0
    -14
      manual/Tasks/macrodef.html
  34. +6
    -6
      manual/Tasks/mail.html
  35. +2
    -4
      manual/Tasks/manifestclasspath.html
  36. +3
    -5
      manual/Tasks/netrexxc.html
  37. +8
    -8
      manual/Tasks/pack.html
  38. +2
    -16
      manual/Tasks/presetdef.html
  39. +8
    -8
      manual/Tasks/propertyfile.html
  40. +3
    -5
      manual/Tasks/renameextensions.html
  41. +7
    -7
      manual/Tasks/replace.html
  42. +13
    -22
      manual/Tasks/replaceregexp.html
  43. +4
    -4
      manual/Tasks/rexec.html
  44. +14
    -18
      manual/Tasks/script.html
  45. +2
    -2
      manual/Tasks/scriptdef.html
  46. +4
    -4
      manual/Tasks/setpermissions.html
  47. +8
    -9
      manual/Tasks/signjar.html
  48. +1
    -4
      manual/Tasks/sound.html
  49. +5
    -9
      manual/Tasks/splash.html
  50. +18
    -18
      manual/Tasks/sql.html
  51. +4
    -4
      manual/Tasks/sync.html
  52. +8
    -8
      manual/Tasks/telnet.html
  53. +7
    -19
      manual/Tasks/unpack.html
  54. +2
    -3
      manual/Tasks/verifyjar.html
  55. +24
    -28
      manual/Tasks/vss.html
  56. +6
    -6
      manual/Tasks/waitfor.html
  57. +6
    -6
      manual/Tasks/whichresource.html
  58. +18
    -43
      manual/Types/antlib.html
  59. +6
    -6
      manual/Types/classfileset.html
  60. +27
    -53
      manual/Types/custom-programming.html
  61. +10
    -11
      manual/Types/dirset.html
  62. +6
    -6
      manual/Types/extension.html
  63. +2
    -3
      manual/Types/extensionset.html
  64. +8
    -8
      manual/Types/filelist.html
  65. +12
    -12
      manual/Types/fileset.html
  66. +140
    -141
      manual/Types/filterchain.html
  67. +12
    -11
      manual/Types/filterset.html
  68. +36
    -36
      manual/Types/mapper.html
  69. +4
    -4
      manual/Types/multirootfileset.html
  70. +10
    -10
      manual/Types/patternset.html
  71. +6
    -6
      manual/Types/permissions.html
  72. +5
    -6
      manual/Types/propertyset.html
  73. +5
    -15
      manual/Types/regexp.html
  74. +0
    -2
      manual/Types/resources.html
  75. +50
    -50
      manual/Types/selectors.html
  76. +2
    -2
      manual/Types/tarfileset.html
  77. +8
    -8
      manual/Types/xmlcatalog.html
  78. +5
    -7
      manual/Types/zipfileset.html
  79. +13
    -23
      manual/develop.html
  80. +1
    -5
      manual/ifunless.html
  81. +7
    -15
      manual/install.html
  82. +5
    -27
      manual/listeners.html
  83. +11
    -28
      manual/running.html
  84. +3
    -1
      manual/stylesheets/style.css
  85. +15
    -19
      manual/targets.html
  86. +5
    -5
      manual/tutorial-HelloWorldWithAnt.html
  87. +21
    -24
      manual/using.html

+ 16
- 16
manual/Tasks/ant.html View File

@@ -330,7 +330,7 @@ targets so specified, in the order specified.</p>
corresponding Ant tasks set the dir attribute explicitly.</p> corresponding Ant tasks set the dir attribute explicitly.</p>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;ant antfile=&quot;subproject/subbuild.xml&quot; target=&quot;compile&quot;/&gt; &lt;ant antfile=&quot;subproject/subbuild.xml&quot; target=&quot;compile&quot;/&gt;


&lt;ant dir=&quot;subproject&quot;/&gt; &lt;ant dir=&quot;subproject&quot;/&gt;
@@ -343,66 +343,66 @@ targets so specified, in the order specified.</p>
&lt;ant inheritAll=&quot;false&quot; antfile=&quot;subproject/subbuild.xml&quot;&gt; &lt;ant inheritAll=&quot;false&quot; antfile=&quot;subproject/subbuild.xml&quot;&gt;
&lt;property name=&quot;output.type&quot; value=&quot;html&quot;/&gt; &lt;property name=&quot;output.type&quot; value=&quot;html&quot;/&gt;
&lt;/ant&gt; &lt;/ant&gt;
</pre></blockquote>
</pre>


<p>These lines invoke the same build file:</p> <p>These lines invoke the same build file:</p>
<blockquote><pre>
<pre>
&lt;ant antfile=&quot;sub1/sub2/build.xml&quot; /&gt; &lt;ant antfile=&quot;sub1/sub2/build.xml&quot; /&gt;
&lt;ant antfile=&quot;sub2/build.xml&quot; dir=&quot;sub1&quot; /&gt; &lt;ant antfile=&quot;sub2/build.xml&quot; dir=&quot;sub1&quot; /&gt;
&lt;ant antfile=&quot;build.xml&quot; dir=&quot;sub1/sub2&quot; /&gt; &lt;ant antfile=&quot;build.xml&quot; dir=&quot;sub1/sub2&quot; /&gt;
</pre></blockquote>
</pre>


<p>The build file of the calling project defines some <p>The build file of the calling project defines some
<code>&lt;path&gt;</code> elements like this:</p> <code>&lt;path&gt;</code> elements like this:</p>


<blockquote><pre>
<pre>
&lt;path id="path1"&gt; &lt;path id="path1"&gt;
... ...
&lt;/path&gt; &lt;/path&gt;
&lt;path id="path2"&gt; &lt;path id="path2"&gt;
... ...
&lt;/path&gt; &lt;/path&gt;
</pre></blockquote>
</pre>


<p>and the called build file (<code>subbuild.xml</code>) also defines <p>and the called build file (<code>subbuild.xml</code>) also defines
a <code>&lt;path&gt;</code> with the id <code>path1</code>, but a <code>&lt;path&gt;</code> with the id <code>path1</code>, but
<code>path2</code> is not defined:</p> <code>path2</code> is not defined:</p>


<blockquote><pre>
<pre>
&lt;ant antfile=&quot;subbuild.xml&quot; inheritrefs=&quot;true&quot;/&gt; &lt;ant antfile=&quot;subbuild.xml&quot; inheritrefs=&quot;true&quot;/&gt;
</pre></blockquote>
</pre>


<p>will not override <code>subbuild</code>'s definition of <p>will not override <code>subbuild</code>'s definition of
<code>path1</code>, but make the parent's definition of <code>path1</code>, but make the parent's definition of
<code>path2</code> available in the subbuild.</p> <code>path2</code> available in the subbuild.</p>


<blockquote><pre>
<pre>
&lt;ant antfile=&quot;subbuild.xml&quot;/&gt; &lt;ant antfile=&quot;subbuild.xml&quot;/&gt;
</pre></blockquote>
</pre>


<p>as well as</p> <p>as well as</p>


<blockquote><pre>
<pre>
&lt;ant antfile=&quot;subbuild.xml&quot; inheritrefs=&quot;false&quot;/&gt; &lt;ant antfile=&quot;subbuild.xml&quot; inheritrefs=&quot;false&quot;/&gt;
</pre></blockquote>
</pre>


<p>will neither override <code>path1</code> nor copy <p>will neither override <code>path1</code> nor copy
<code>path2</code>.</p> <code>path2</code>.</p>


<blockquote><pre>
<pre>
&lt;ant antfile=&quot;subbuild.xml&quot; inheritrefs=&quot;false&quot;&gt; &lt;ant antfile=&quot;subbuild.xml&quot; inheritrefs=&quot;false&quot;&gt;
&lt;reference refid=&quot;path1&quot;/&gt; &lt;reference refid=&quot;path1&quot;/&gt;
&lt;/ant&gt; &lt;/ant&gt;
</pre></blockquote>
</pre>


<p>will override <code>subbuild</code>'s definition of <p>will override <code>subbuild</code>'s definition of
<code>path1</code>.</p> <code>path1</code>.</p>


<blockquote><pre>
<pre>
&lt;ant antfile=&quot;subbuild.xml&quot; inheritrefs=&quot;false&quot;&gt; &lt;ant antfile=&quot;subbuild.xml&quot; inheritrefs=&quot;false&quot;&gt;
&lt;reference refid=&quot;path1&quot; torefid=&quot;path2&quot;/&gt; &lt;reference refid=&quot;path1&quot; torefid=&quot;path2&quot;/&gt;
&lt;/ant&gt; &lt;/ant&gt;
</pre></blockquote>
</pre>


<p>will copy the parent's definition of <code>path1</code> into the <p>will copy the parent's definition of <code>path1</code> into the
new project using the id <code>path2</code>.</p> new project using the id <code>path2</code>.</p>


+ 4
- 4
manual/Tasks/antcall.html View File

@@ -173,7 +173,7 @@ targets so specified, in the order specified.</p>
<p><em>since Ant 1.6.3</em>.</p> <p><em>since Ant 1.6.3</em>.</p>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;target name=&quot;default&quot;&gt; &lt;target name=&quot;default&quot;&gt;
&lt;antcall target=&quot;doSomethingElse&quot;&gt; &lt;antcall target=&quot;doSomethingElse&quot;&gt;
&lt;param name=&quot;param1&quot; value=&quot;value&quot;/&gt; &lt;param name=&quot;param1&quot; value=&quot;value&quot;/&gt;
@@ -183,14 +183,14 @@ targets so specified, in the order specified.</p>
&lt;target name=&quot;doSomethingElse&quot;&gt; &lt;target name=&quot;doSomethingElse&quot;&gt;
&lt;echo message=&quot;param1=${param1}&quot;/&gt; &lt;echo message=&quot;param1=${param1}&quot;/&gt;
&lt;/target&gt; &lt;/target&gt;
</pre></blockquote>
</pre>
<p>Will run the target 'doSomethingElse' and echo 'param1=value'.</p> <p>Will run the target 'doSomethingElse' and echo 'param1=value'.</p>


<blockquote><pre>
<pre>
&lt;antcall ... &gt; &lt;antcall ... &gt;
&lt;reference refid=&quot;path1&quot; torefid=&quot;path2&quot;/&gt; &lt;reference refid=&quot;path1&quot; torefid=&quot;path2&quot;/&gt;
&lt;/antcall&gt; &lt;/antcall&gt;
</pre></blockquote>
</pre>


<p>will copy the parent's definition of <code>path1</code> into the <p>will copy the parent's definition of <code>path1</code> into the
new project using the id <code>path2</code>.</p> new project using the id <code>path2</code>.</p>


+ 2
- 2
manual/Tasks/antlr.html View File

@@ -186,11 +186,11 @@ VM via nested <code>&lt;jvmarg&gt;</code> attributes, for example:</p>
href="../using.html#arg">Command line arguments</a>.</p> href="../using.html#arg">Command line arguments</a>.</p>


<h3>Example</h3> <h3>Example</h3>
<blockquote><pre>
<pre>
&lt;antlr &lt;antlr
target=&quot;etc/java.g&quot; target=&quot;etc/java.g&quot;
outputdirectory=&quot;build/src&quot;/&gt; outputdirectory=&quot;build/src&quot;/&gt;
</pre></blockquote>
</pre>
<p> <p>
This invokes ANTLR on grammar file etc/java.g, writing the generated This invokes ANTLR on grammar file etc/java.g, writing the generated
files to build/src. files to build/src.


+ 1
- 3
manual/Tasks/antstructure.html View File

@@ -68,9 +68,7 @@ element of this task - see the example below.
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
&lt;antstructure output=&quot;project.dtd&quot; /&gt;
</pre></blockquote>
<pre>&lt;antstructure output=&quot;project.dtd&quot;/&gt;</pre>


<p><b>Emitting your own structure instead of a DTD</b></p> <p><b>Emitting your own structure instead of a DTD</b></p>




+ 8
- 9
manual/Tasks/antversion.html View File

@@ -60,34 +60,33 @@ Stores the Apache Ant version (when used as task) or checks for a specific Ant v
</tr> </tr>
</table> </table>



<h3>Examples</h3> <h3>Examples</h3>


<blockquote><pre>
<pre>
&lt;antversion property=&quot;antversion&quot;/&gt; &lt;antversion property=&quot;antversion&quot;/&gt;
</pre></blockquote>
</pre>
<p>Stores the current Ant version in the property <i>antversion</i>.</p> <p>Stores the current Ant version in the property <i>antversion</i>.</p>


<blockquote><pre>
<pre>
&lt;antversion property=&quot;antversion&quot; atleast=&quot;1.6&quot;/&gt; &lt;antversion property=&quot;antversion&quot; atleast=&quot;1.6&quot;/&gt;
</pre></blockquote>
</pre>
<p>Stores the Ant version in the property <i>antversion</i> if the current Ant version is 1.6.0 <p>Stores the Ant version in the property <i>antversion</i> if the current Ant version is 1.6.0
or higher. Otherwise the property remains unset.</p> or higher. Otherwise the property remains unset.</p>


<blockquote><pre>
<pre>
&lt;antversion property=&quot;ant-is-exact-7&quot; exactly=&quot;1.7.0&quot;/&gt; &lt;antversion property=&quot;ant-is-exact-7&quot; exactly=&quot;1.7.0&quot;/&gt;
</pre></blockquote>
</pre>
<p>Sets the property <i>ant-is-exact-7</i> if Ant 1.7.0 is running. Neither 1.6.5 nor 1.7.0 <p>Sets the property <i>ant-is-exact-7</i> if Ant 1.7.0 is running. Neither 1.6.5 nor 1.7.0
would match.</p> would match.</p>


<blockquote><pre>
<pre>
&lt;condition property=&quot;Ant17isOnline&quot;&gt; &lt;condition property=&quot;Ant17isOnline&quot;&gt;
&lt;and&gt; &lt;and&gt;
&lt;antversion exactly=&quot;1.7.0&quot;/&gt; &lt;antversion exactly=&quot;1.7.0&quot;/&gt;
&lt;http url=&quot;http://ant.apache.org&quot;/&gt; &lt;http url=&quot;http://ant.apache.org&quot;/&gt;
&lt;/and&gt; &lt;/and&gt;
&lt;/condition&gt; &lt;/condition&gt;
</pre></blockquote>
</pre>
<p>Sets <i>Ant17isOnline</i> if Ant 1.7.0 is running and can get a non-error-response from <p>Sets <i>Ant17isOnline</i> if Ant 1.7.0 is running and can get a non-error-response from
the Ant homepage.</p> the Ant homepage.</p>




+ 12
- 12
manual/Tasks/apply.html View File

@@ -399,7 +399,7 @@ files for each sourcefile.
of executions (with <i>maxparallel</i> &gt; 0) and null will be used of executions (with <i>maxparallel</i> &gt; 0) and null will be used
a source file just like it is in the case of <code>exec</code>.</p> a source file just like it is in the case of <code>exec</code>.</p>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;apply executable=&quot;ls&quot;&gt; &lt;apply executable=&quot;ls&quot;&gt;
&lt;arg value=&quot;-l&quot;/&gt; &lt;arg value=&quot;-l&quot;/&gt;
&lt;fileset dir=&quot;/tmp&quot;&gt; &lt;fileset dir=&quot;/tmp&quot;&gt;
@@ -409,25 +409,25 @@ files for each sourcefile.
&lt;/fileset&gt; &lt;/fileset&gt;
&lt;fileset refid=&quot;other.files&quot;/&gt; &lt;fileset refid=&quot;other.files&quot;/&gt;
&lt;/apply&gt; &lt;/apply&gt;
</pre></blockquote>
</pre>
<p>invokes <code>ls -l</code>, adding the absolute filenames of all <p>invokes <code>ls -l</code>, adding the absolute filenames of all
files below <code>/tmp</code> not ending in <code>.txt</code> and all files below <code>/tmp</code> not ending in <code>.txt</code> and all
files of the FileSet with <code>id</code> <code>other.files</code> to files of the FileSet with <code>id</code> <code>other.files</code> to
the command line.</p> the command line.</p>
<blockquote><pre>
<pre>
&lt;apply executable=&quot;somecommand&quot; parallel=&quot;false&quot;&gt; &lt;apply executable=&quot;somecommand&quot; parallel=&quot;false&quot;&gt;
&lt;arg value=&quot;arg1&quot;/&gt; &lt;arg value=&quot;arg1&quot;/&gt;
&lt;srcfile/&gt; &lt;srcfile/&gt;
&lt;arg value=&quot;arg2&quot;/&gt; &lt;arg value=&quot;arg2&quot;/&gt;
&lt;fileset dir=&quot;/tmp&quot;/&gt; &lt;fileset dir=&quot;/tmp&quot;/&gt;
&lt;/apply&gt; &lt;/apply&gt;
</pre></blockquote>
</pre>
<p>invokes <code>somecommand arg1 SOURCEFILENAME arg2</code> for each <p>invokes <code>somecommand arg1 SOURCEFILENAME arg2</code> for each
file in <code>/tmp</code> replacing SOURCEFILENAME with the absolute file in <code>/tmp</code> replacing SOURCEFILENAME with the absolute
filename of each file in turn. If <code>parallel</code> had been set filename of each file in turn. If <code>parallel</code> had been set
to true, SOURCEFILENAME would be replaced with the absolute filenames to true, SOURCEFILENAME would be replaced with the absolute filenames
of all files separated by spaces.</p> of all files separated by spaces.</p>
<blockquote><pre>
<pre>
&lt;apply executable=&quot;cc&quot; dest=&quot;src/C&quot; parallel=&quot;false&quot;&gt; &lt;apply executable=&quot;cc&quot; dest=&quot;src/C&quot; parallel=&quot;false&quot;&gt;
&lt;arg value=&quot;-c&quot;/&gt; &lt;arg value=&quot;-c&quot;/&gt;
&lt;arg value=&quot;-o&quot;/&gt; &lt;arg value=&quot;-o&quot;/&gt;
@@ -436,13 +436,13 @@ of all files separated by spaces.</p>
&lt;fileset dir=&quot;src/C&quot; includes=&quot;*.c&quot;/&gt; &lt;fileset dir=&quot;src/C&quot; includes=&quot;*.c&quot;/&gt;
&lt;mapper type=&quot;glob&quot; from=&quot;*.c&quot; to=&quot;*.o&quot;/&gt; &lt;mapper type=&quot;glob&quot; from=&quot;*.c&quot; to=&quot;*.o&quot;/&gt;
&lt;/apply&gt; &lt;/apply&gt;
</pre></blockquote>
</pre>
<p>invokes <code>cc -c -o TARGETFILE SOURCEFILE</code> for each <p>invokes <code>cc -c -o TARGETFILE SOURCEFILE</code> for each
<code>.c</code> file that is newer than the corresponding <code>.c</code> file that is newer than the corresponding
<code>.o</code>, replacing TARGETFILE with the absolute filename of <code>.o</code>, replacing TARGETFILE with the absolute filename of
the <code>.o</code> and SOURCEFILE with the absolute name of the the <code>.o</code> and SOURCEFILE with the absolute name of the
<code>.c</code> file.</p> <code>.c</code> file.</p>
<blockquote><pre>
<pre>
&lt;mapper id=&quot;out&quot; type=&quot;glob&quot; &lt;mapper id=&quot;out&quot; type=&quot;glob&quot;
from=&quot;src${file.separator}*.file&quot; from=&quot;src${file.separator}*.file&quot;
to=&quot;dest${file.separator}*.out&quot;/&gt; to=&quot;dest${file.separator}*.out&quot;/&gt;
@@ -454,7 +454,7 @@ the <code>.o</code> and SOURCEFILE with the absolute name of the
&lt;outputmapper refid=&quot;out&quot;/&gt; &lt;outputmapper refid=&quot;out&quot;/&gt;
&lt;/redirector&gt; &lt;/redirector&gt;
&lt;/apply&gt; &lt;/apply&gt;
</pre></blockquote>
</pre>
Applies the fictitious &quot;processfile&quot; executable to all Applies the fictitious &quot;processfile&quot; executable to all
files matching <code>*.file</code> in the <code>src</code> directory. files matching <code>*.file</code> in the <code>src</code> directory.
The <code>out</code> <code>&lt;mapper&gt;</code> has been set up to map The <code>out</code> <code>&lt;mapper&gt;</code> has been set up to map
@@ -464,7 +464,7 @@ task. A reference to <code>out</code> is then used as an
<code>&lt;outputmapper&gt;</code> nested in a <code>&lt;redirector&gt;</code>, which in turn is <code>&lt;outputmapper&gt;</code> nested in a <code>&lt;redirector&gt;</code>, which in turn is
nested beneath this <code>&lt;apply&gt;</code> instance. This allows us to perform nested beneath this <code>&lt;apply&gt;</code> instance. This allows us to perform
dependency checking against output files--the target files in this case. dependency checking against output files--the target files in this case.
<blockquote><pre>
<pre>
&lt;apply executable="ls" parallel="true" &lt;apply executable="ls" parallel="true"
force="true" dest="${basedir}" append="true" type="both"&gt; force="true" dest="${basedir}" append="true" type="both"&gt;
&lt;path&gt; &lt;path&gt;
@@ -472,11 +472,11 @@ dependency checking against output files--the target files in this case.
&lt;/path&gt; &lt;/path&gt;
&lt;identitymapper/&gt; &lt;identitymapper/&gt;
&lt;/apply&gt; &lt;/apply&gt;
</pre></blockquote>
</pre>
Applies the "ls" executable to all directories in the PATH, effectively Applies the "ls" executable to all directories in the PATH, effectively
listing all executables that are available on the PATH. listing all executables that are available on the PATH.


<blockquote><pre>
<pre>
&lt;apply executable="jsmin" addsourcefile="false"&gt; &lt;apply executable="jsmin" addsourcefile="false"&gt;
&lt;!-- Collect the JS-files --&gt; &lt;!-- Collect the JS-files --&gt;
&lt;fileset dir="src" includes="*.js"/&gt; &lt;fileset dir="src" includes="*.js"/&gt;
@@ -488,7 +488,7 @@ listing all executables that are available on the PATH.
&lt;outputmapper id="out" type="glob" from="*.js" to="dest/*.js"/&gt; &lt;outputmapper id="out" type="glob" from="*.js" to="dest/*.js"/&gt;
&lt;/redirector&gt; &lt;/redirector&gt;
&lt;/apply&gt; &lt;/apply&gt;
</pre></blockquote>
</pre>
Conversion of the command <code>jsmin &lt; src/a.js &gt; dest/a.js</code> but for Conversion of the command <code>jsmin &lt; src/a.js &gt; dest/a.js</code> but for
all files in the src-directory. Because the filename itself should not be passed all files in the src-directory. Because the filename itself should not be passed
to the <code>jsmin</code> program, the <code>addsourcefile</code> is set to to the <code>jsmin</code> program, the <code>addsourcefile</code> is set to


+ 4
- 10
manual/Tasks/attrib.html View File

@@ -136,21 +136,15 @@ directory tree), so you'll have to experiment a little.</p-->
</table> </table>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre>&lt;attrib file=&quot;${dist}/run.bat&quot; readonly=&quot;true&quot; hidden=&quot;true&quot;/&gt;</pre> <pre>&lt;attrib file=&quot;${dist}/run.bat&quot; readonly=&quot;true&quot; hidden=&quot;true&quot;/&gt;</pre>
</blockquote>
<p>makes the &quot;run.bat&quot; file read-only and hidden.</p> <p>makes the &quot;run.bat&quot; file read-only and hidden.</p>

<blockquote>
<pre>&lt;attrib readonly=&quot;false&quot;&gt;
<pre>&lt;attrib readonly=&quot;false&quot;&gt;
&lt;fileset dir=&quot;${meta.inf}&quot; includes=&quot;**/*.xml&quot;/&gt; &lt;fileset dir=&quot;${meta.inf}&quot; includes=&quot;**/*.xml&quot;/&gt;
&lt;/attrib&gt; &lt;/attrib&gt;
</pre> </pre>
</blockquote>
<p>makes all &quot;.xml&quot; files below <code>${meta.inf}</code> readable.</p> <p>makes all &quot;.xml&quot; files below <code>${meta.inf}</code> readable.</p>

<blockquote>
<pre>
<pre>
&lt;attrib readonly=&quot;true&quot; archive=&quot;true&quot;&gt; &lt;attrib readonly=&quot;true&quot; archive=&quot;true&quot;&gt;
&lt;fileset dir=&quot;shared/sources1&quot;&gt; &lt;fileset dir=&quot;shared/sources1&quot;&gt;
&lt;exclude name=&quot;**/trial/**&quot;/&gt; &lt;exclude name=&quot;**/trial/**&quot;/&gt;
@@ -158,7 +152,7 @@ directory tree), so you'll have to experiment a little.</p-->
&lt;fileset refid=&quot;other.shared.sources&quot;/&gt; &lt;fileset refid=&quot;other.shared.sources&quot;/&gt;
&lt;/attrib&gt; &lt;/attrib&gt;
</pre> </pre>
</blockquote>
<p>makes all files below <code>shared/sources1</code> (except those below any <p>makes all files below <code>shared/sources1</code> (except those below any
directory named trial) read-only and archived. In addition all files belonging directory named trial) read-only and archived. In addition all files belonging
to a FileSet with <code>id</code> <code>other.shared.sources</code> get the to a FileSet with <code>id</code> <code>other.shared.sources</code> get the


+ 10
- 10
manual/Tasks/available.html View File

@@ -115,41 +115,41 @@ href="../using.html#path">path-like structure</a> and can also be set via a nest
href="../using.html#path">path-like structure</a> and can also be set via a nested href="../using.html#path">path-like structure</a> and can also be set via a nested
<code>&lt;filepath&gt;</code> element.</p> <code>&lt;filepath&gt;</code> element.</p>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;available classname=&quot;org.whatever.Myclass&quot; property=&quot;Myclass.present&quot;/&gt; &lt;available classname=&quot;org.whatever.Myclass&quot; property=&quot;Myclass.present&quot;/&gt;
</pre></blockquote>
</pre>
<p>sets the <code>Myclass.present</code> property to the value &quot;true&quot; <p>sets the <code>Myclass.present</code> property to the value &quot;true&quot;
if the class <code>org.whatever.Myclass</code> is found in Ant's classpath.</p> if the class <code>org.whatever.Myclass</code> is found in Ant's classpath.</p>
<blockquote><pre>
<pre>
&lt;property name=&quot;jaxp.jar&quot; value=&quot;./lib/jaxp11/jaxp.jar&quot;/&gt; &lt;property name=&quot;jaxp.jar&quot; value=&quot;./lib/jaxp11/jaxp.jar&quot;/&gt;
&lt;available file=&quot;${jaxp.jar}&quot; property=&quot;jaxp.jar.present&quot;/&gt; &lt;available file=&quot;${jaxp.jar}&quot; property=&quot;jaxp.jar.present&quot;/&gt;
</pre></blockquote>
</pre>
<p>sets the <code>jaxp.jar.present</code> property to the value &quot;true&quot; <p>sets the <code>jaxp.jar.present</code> property to the value &quot;true&quot;
if the file <code>./lib/jaxp11/jaxp.jar</code> is found.</p> if the file <code>./lib/jaxp11/jaxp.jar</code> is found.</p>
<blockquote><pre>
<pre>
&lt;available file=&quot;/usr/local/lib&quot; type=&quot;dir&quot; &lt;available file=&quot;/usr/local/lib&quot; type=&quot;dir&quot;
property=&quot;local.lib.present&quot;/&gt; property=&quot;local.lib.present&quot;/&gt;
</pre></blockquote>
</pre>
<p>sets the <code>local.lib.present</code> property to the value &quot;true&quot; <p>sets the <code>local.lib.present</code> property to the value &quot;true&quot;
if the directory <code>/usr/local/lib</code> is found.</p> if the directory <code>/usr/local/lib</code> is found.</p>
<blockquote><pre>
<pre>
...in project ... ...in project ...
&lt;property name=&quot;jaxp.jar&quot; value=&quot;./lib/jaxp11/jaxp.jar&quot;/&gt; &lt;property name=&quot;jaxp.jar&quot; value=&quot;./lib/jaxp11/jaxp.jar&quot;/&gt;
&lt;path id=&quot;jaxp&quot; location=&quot;${jaxp.jar}&quot;/&gt; &lt;path id=&quot;jaxp&quot; location=&quot;${jaxp.jar}&quot;/&gt;
...in target ... ...in target ...
&lt;available classname=&quot;javax.xml.transform.Transformer&quot; &lt;available classname=&quot;javax.xml.transform.Transformer&quot;
classpathref=&quot;jaxp&quot; property=&quot;jaxp11.present&quot;/&gt; classpathref=&quot;jaxp&quot; property=&quot;jaxp11.present&quot;/&gt;
</pre></blockquote>
</pre>
<p>sets the <code>jaxp11.present</code> property to the value &quot;true&quot; <p>sets the <code>jaxp11.present</code> property to the value &quot;true&quot;
if the class <code>javax.xml.transform.Transformer</code> is found in the classpath referenced by <code>jaxp</code> (in this case, <code>./lib/jaxp11/jaxp.jar</code>). if the class <code>javax.xml.transform.Transformer</code> is found in the classpath referenced by <code>jaxp</code> (in this case, <code>./lib/jaxp11/jaxp.jar</code>).
</p> </p>
<blockquote><pre>
<pre>
&lt;available property=&quot;have.extras&quot; resource=&quot;extratasks.properties&quot;&gt; &lt;available property=&quot;have.extras&quot; resource=&quot;extratasks.properties&quot;&gt;
&lt;classpath&gt; &lt;classpath&gt;
&lt;pathelement location=&quot;/usr/local/ant/extra.jar&quot; /&gt; &lt;pathelement location=&quot;/usr/local/ant/extra.jar&quot; /&gt;
&lt;/classpath&gt; &lt;/classpath&gt;
&lt;/available&gt; &lt;/available&gt;
</pre></blockquote>
</pre>
<p>sets the <code>have.extras</code> property to the value &quot;true&quot; <p>sets the <code>have.extras</code> property to the value &quot;true&quot;
if the resource-file <code>extratasks.properties</code> is found. if the resource-file <code>extratasks.properties</code> is found.
</p> </p>


+ 6
- 6
manual/Tasks/basename.html View File

@@ -64,23 +64,23 @@ the basename will be the simple file name, without any directory elements.
</table> </table>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;basename property=&quot;jar.filename&quot; file=&quot;${lib.jarfile}&quot;/&gt; &lt;basename property=&quot;jar.filename&quot; file=&quot;${lib.jarfile}&quot;/&gt;
</pre></blockquote>
</pre>
will set <code>jar.filename</code> to will set <code>jar.filename</code> to
<code>myjar.jar</code>, if <code>lib.jarfile</code> is defined as either a <code>myjar.jar</code>, if <code>lib.jarfile</code> is defined as either a
full-path filename (eg., <code>/usr/local/lib/myjar.jar</code>), full-path filename (eg., <code>/usr/local/lib/myjar.jar</code>),
a relative-path filename (eg., <code>lib/myjar.jar</code>), a relative-path filename (eg., <code>lib/myjar.jar</code>),
or a simple filename (eg., <code>myjar.jar</code>). or a simple filename (eg., <code>myjar.jar</code>).
<blockquote><pre>
<pre>
&lt;basename property=&quot;cmdname&quot; file=&quot;D:/usr/local/foo.exe&quot; &lt;basename property=&quot;cmdname&quot; file=&quot;D:/usr/local/foo.exe&quot;
suffix=&quot;.exe&quot;/&gt; suffix=&quot;.exe&quot;/&gt;
</pre></blockquote>
</pre>
will set <code>cmdname</code> to <code>foo</code>. will set <code>cmdname</code> to <code>foo</code>.
<blockquote><pre>
<pre>
&lt;property environment=&quot;env&quot;/&gt; &lt;property environment=&quot;env&quot;/&gt;
&lt;basename property=&quot;temp.dirname&quot; file=&quot;${env.TEMP}&quot;/&gt; &lt;basename property=&quot;temp.dirname&quot; file=&quot;${env.TEMP}&quot;/&gt;
</pre></blockquote>
</pre>
will set <code>temp.dirname</code> to the last directory element of will set <code>temp.dirname</code> to the last directory element of
the path defined for the <code>TEMP</code> environment variable. the path defined for the <code>TEMP</code> environment variable.




+ 6
- 8
manual/Tasks/bindtargets.html View File

@@ -44,12 +44,10 @@ target dependencies but only in your context.
target which will be the bridge between the target to bind and the extension target which will be the bridge between the target to bind and the extension
point. For instance: point. For instance:
</p> </p>
<blockquote><pre>&lt;bindtargets targets="jar,javadoc" extensionPoint="dist" /&gt;</pre></blockquote>
<pre>&lt;bindtargets targets="jar,javadoc" extensionPoint="dist" /&gt;</pre>
is quite equivalent to: is quite equivalent to:
<blockquote><pre>&lt;target name="bind-to-dist" depends="jar,javadoc" extensionOf="dist" /&gt;</pre></blockquote>
<p>
This task basically avoid the creation of a target.
</p>
<pre>&lt;target name="bind-to-dist" depends="jar,javadoc" extensionOf="dist" /&gt;</pre>
<p>This task basically avoid the creation of a target.</p>


<p>The bindtargets task may only be used as a top-level task. This means that <p>The bindtargets task may only be used as a top-level task. This means that
it may not be used in a target. This is making the target dependency graph static it may not be used in a target. This is making the target dependency graph static
@@ -84,9 +82,9 @@ and predictable as soon as every build file is loaded.</p>
</table> </table>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
&lt;bindtargets targets=&quot;build-jar,build-src-jar&quot; extensionPoint=&quot;dist&quot; /&gt;
</pre></blockquote>
<pre>
&lt;bindtargets targets=&quot;build-jar,build-src-jar&quot; extensionPoint=&quot;dist&quot;/&gt;
</pre>


</body> </body>
</html> </html>

+ 4
- 4
manual/Tasks/buildnumber.html View File

@@ -53,16 +53,16 @@ the number format.)
</table> </table>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;buildnumber/&gt; &lt;buildnumber/&gt;
</pre></blockquote>
</pre>


<p>Read, increment, and write a build number to the default file, <p>Read, increment, and write a build number to the default file,
<code>build.number</code>.</p> <code>build.number</code>.</p>


<blockquote><pre>
<pre>
&lt;buildnumber file=&quot;mybuild.number&quot;/&gt; &lt;buildnumber file=&quot;mybuild.number&quot;/&gt;
</pre></blockquote>
</pre>


<p>Read, increment, and write a build number to the file <p>Read, increment, and write a build number to the file
<code>mybuild.number</code>.</p> <code>mybuild.number</code>.</p>


+ 8
- 8
manual/Tasks/cab.html View File

@@ -118,34 +118,34 @@ element to specify the files to be included in the archive.
</p> </p>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;cab cabfile=&quot;${dist}/manual.cab&quot; &lt;cab cabfile=&quot;${dist}/manual.cab&quot;
basedir=&quot;htdocs/manual&quot;/&gt; basedir=&quot;htdocs/manual&quot;/&gt;
</pre></blockquote>
</pre>
<p>cabs all files in the htdocs/manual directory into a file called <p>cabs all files in the htdocs/manual directory into a file called
manual.cab in the ${dist} directory.</p> manual.cab in the ${dist} directory.</p>
<blockquote><pre>
<pre>
&lt;cab cabfile=&quot;${dist}/manual.cab&quot; &lt;cab cabfile=&quot;${dist}/manual.cab&quot;
basedir=&quot;htdocs/manual&quot; basedir=&quot;htdocs/manual&quot;
excludes=&quot;mydocs/**, **/todo.html&quot;/&gt; excludes=&quot;mydocs/**, **/todo.html&quot;/&gt;
</pre></blockquote>
</pre>
<p>cabs all files in the htdocs/manual directory into a file called <p>cabs all files in the htdocs/manual directory into a file called
manual.cab in the ${dist} directory. Files in the directory mydocs, manual.cab in the ${dist} directory. Files in the directory mydocs,
or files with the name todo.html are excluded.</p> or files with the name todo.html are excluded.</p>
<blockquote><pre>
<pre>
&lt;cab cabfile=&quot;${dist}/manual.cab&quot; &lt;cab cabfile=&quot;${dist}/manual.cab&quot;
basedir=&quot;htdocs/manual&quot; basedir=&quot;htdocs/manual&quot;
includes=&quot;api/**/*.html&quot; includes=&quot;api/**/*.html&quot;
excludes=&quot;**/todo.html&quot; excludes=&quot;**/todo.html&quot;
verbose=&quot;yes&quot;/&gt; verbose=&quot;yes&quot;/&gt;
</pre></blockquote>
</pre>
<p>Cab all files in the htdocs/manual directory into a file called <p>Cab all files in the htdocs/manual directory into a file called
manual.cab in the ${dist} directory. Only html files under the manual.cab in the ${dist} directory. Only html files under the
directory api are archived, and files with the name todo.html are directory api are archived, and files with the name todo.html are
excluded. Output from the cabarc tool is displayed in the build excluded. Output from the cabarc tool is displayed in the build
output.</p> output.</p>


<blockquote><pre>
<pre>
&lt;cab cabfile=&quot;${dist}/manual.cab&quot; &lt;cab cabfile=&quot;${dist}/manual.cab&quot;
verbose=&quot;yes&quot;&gt; verbose=&quot;yes&quot;&gt;
&lt;fileset &lt;fileset
@@ -153,7 +153,7 @@ output.</p>
includes=&quot;api/**/*.html&quot; includes=&quot;api/**/*.html&quot;
excludes=&quot;**/todo.html&quot;/&gt; excludes=&quot;**/todo.html&quot;/&gt;
&lt;/cab&gt; &lt;/cab&gt;
</pre></blockquote>
</pre>
<p>is equivalent to the example above.</p> <p>is equivalent to the example above.</p>


</body> </body>


+ 18
- 22
manual/Tasks/ccm.html View File

@@ -68,11 +68,11 @@ Task to checkin a file
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre>&lt;ccmcheckin file=&quot;c:/wa/com/foo/MyFile.java&quot; <pre>&lt;ccmcheckin file=&quot;c:/wa/com/foo/MyFile.java&quot;
comment=&quot;mycomment&quot;/&gt; comment=&quot;mycomment&quot;/&gt;
</pre> </pre>
</blockquote>
<p>Checks in the file <i>c:/wa/com/foo/MyFile.java</i>. <p>Checks in the file <i>c:/wa/com/foo/MyFile.java</i>.
Comment attribute <i>mycomment</i> is added as a task comment. The task Comment attribute <i>mycomment</i> is added as a task comment. The task
used is the one set as the default.</p> used is the one set as the default.</p>
@@ -114,22 +114,19 @@ Task to perform a Checkout command to Continuus
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre>&lt;ccmcheckout file=&quot;c:/wa/com/foo/MyFile.java&quot;
comment=&quot;mycomment&quot;/&gt;
</pre>
</blockquote>

<pre>&lt;ccmcheckout file=&quot;c:/wa/com/foo/MyFile.java&quot;
comment=&quot;mycomment&quot;/&gt;</pre>

<p>Check out the file <i>c:/wa/com/foo/MyFile.java</i>. <p>Check out the file <i>c:/wa/com/foo/MyFile.java</i>.
Comment attribute <i>mycomment</i> is added as a task comment Comment attribute <i>mycomment</i> is added as a task comment
The used task is the one set as the default.</p> The used task is the one set as the default.</p>
<blockquote>
<pre>&lt;ccmcheckout comment=&quot;mycomment&quot;&gt;
<pre>&lt;ccmcheckout comment=&quot;mycomment&quot;&gt;
&lt;fileset dir=&quot;lib&quot; &gt; &lt;fileset dir=&quot;lib&quot; &gt;
&lt;include name=&quot;**/*.jar&quot;/&gt; &lt;include name=&quot;**/*.jar&quot;/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
&lt;/ccmcheckout &gt;
</pre>
</blockquote>
&lt;/ccmcheckout &gt;</pre>


<p>Check out all the files in the <i>lib</i> directory having the <i>.jar</i> extension. <p>Check out all the files in the <i>lib</i> directory having the <i>.jar</i> extension.
Comment attribute <i>mycomment</i> is added as a task comment Comment attribute <i>mycomment</i> is added as a task comment
@@ -162,10 +159,9 @@ Task to perform a check in default task command to Continuus
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre>&lt;ccmcheckintask comment=&quot;blahblah/&gt;
</pre>
</blockquote>

<pre>&lt;ccmcheckintask comment=&quot;blahblah/&gt;</pre>

<p>Does a Checkin default task on all the checked out files in the current task.</p> <p>Does a Checkin default task on all the checked out files in the current task.</p>
<hr/> <hr/>
<h2 id="ccmreconfigure">CCMReconfigure</h2> <h2 id="ccmreconfigure">CCMReconfigure</h2>
@@ -200,11 +196,11 @@ Task to perform an reconfigure command to Continuus.
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre>&lt;ccmreconfigure ccmproject=&quot;ANTCCM_TEST#BMO_1&quot;
<pre>&lt;ccmreconfigure ccmproject=&quot;ANTCCM_TEST#BMO_1&quot;
verbose=&quot;true&quot;/&gt; verbose=&quot;true&quot;/&gt;
</pre> </pre>
</blockquote>
<p>Does a Continuus <i>reconfigure</i> on the project <i>ANTCCM_TEST#BMO_1</i>. <p>Does a Continuus <i>reconfigure</i> on the project <i>ANTCCM_TEST#BMO_1</i>.
</p> </p>
<hr/> <hr/>
@@ -255,11 +251,11 @@ Create a Continuus task.
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre>&lt;ccmcreatetask resolver=&quot;${user.name}&quot;
<pre>&lt;ccmcreatetask resolver=&quot;${user.name}&quot;
release=&quot;ANTCCM_TEST&quot; comment=&quot;blahblah&quot;/&gt; release=&quot;ANTCCM_TEST&quot; comment=&quot;blahblah&quot;/&gt;
</pre> </pre>
</blockquote>
<p>Creates a task for the release <i>ANTCCM_TEST</i> with the <p>Creates a task for the release <i>ANTCCM_TEST</i> with the
current user as the resolver for this task.</p> current user as the resolver for this task.</p>




+ 11
- 11
manual/Tasks/checksum.html View File

@@ -202,48 +202,48 @@ or set the <tt>fileext</tt> attribute. The names of common hashing algorithms ca


<h3>Examples</h3> <h3>Examples</h3>
<p><b>Example 1</b></p> <p><b>Example 1</b></p>
<blockquote><pre>&lt;checksum file=&quot;foo.bar&quot;/&gt;</pre></blockquote>
<pre>&lt;checksum file=&quot;foo.bar&quot;/&gt;</pre>
Generates a MD5 checksum for foo.bar and stores the checksum in the destination file Generates a MD5 checksum for foo.bar and stores the checksum in the destination file
foo.bar.MD5. foo.bar.MD5 is overwritten only if foo.bar is newer than itself. foo.bar.MD5. foo.bar.MD5 is overwritten only if foo.bar is newer than itself.


<p><b>Example 2</b></p> <p><b>Example 2</b></p>
<blockquote><pre>&lt;checksum file=&quot;foo.bar&quot; forceOverwrite=&quot;yes&quot;/&gt;</pre></blockquote>
<pre>&lt;checksum file=&quot;foo.bar&quot; forceOverwrite=&quot;yes&quot;/&gt;</pre>
Generates a MD5 checksum for foo.bar and stores the checksum in foo.bar.MD5. Generates a MD5 checksum for foo.bar and stores the checksum in foo.bar.MD5.
If foo.bar.MD5 already exists, it is overwritten. If foo.bar.MD5 already exists, it is overwritten.


<p><b>Example 3</b></p> <p><b>Example 3</b></p>
<blockquote><pre>&lt;checksum file=&quot;foo.bar&quot; property=&quot;foobarMD5&quot;/&gt;</pre></blockquote>
<pre>&lt;checksum file=&quot;foo.bar&quot; property=&quot;foobarMD5&quot;/&gt;</pre>
Generates a MD5 checksum for foo.bar and stores it in the Project Property foobarMD5. Generates a MD5 checksum for foo.bar and stores it in the Project Property foobarMD5.


<p><b>Example 4</b></p> <p><b>Example 4</b></p>
<blockquote><pre>&lt;checksum file=&quot;foo.bar&quot; verifyProperty=&quot;isMD5ok&quot;/&gt;</pre></blockquote>
<pre>&lt;checksum file=&quot;foo.bar&quot; verifyProperty=&quot;isMD5ok&quot;/&gt;</pre>
Generates a MD5 checksum for foo.bar, compares it against foo.bar.MD5 and sets Generates a MD5 checksum for foo.bar, compares it against foo.bar.MD5 and sets
isMD5ok to either true or false, depending upon the result. isMD5ok to either true or false, depending upon the result.


<p><b>Example 5</b></p> <p><b>Example 5</b></p>
<blockquote><pre>&lt;checksum file=&quot;foo.bar&quot; algorithm=&quot;SHA-512&quot; fileext=&quot;asc&quot;/&gt;</pre></blockquote>
<pre>&lt;checksum file=&quot;foo.bar&quot; algorithm=&quot;SHA-512&quot; fileext=&quot;asc&quot;/&gt;</pre>
Generates a SHA-512 checksum for foo.bar and stores the checksum in the destination file Generates a SHA-512 checksum for foo.bar and stores the checksum in the destination file
foo.bar.asc. foo.bar.asc is overwritten only if foo.bar is newer than itself. foo.bar.asc. foo.bar.asc is overwritten only if foo.bar is newer than itself.


<p><b>Example 6</b></p> <p><b>Example 6</b></p>
<blockquote><pre>
<pre>
&lt;checksum file=&quot;foo.bar&quot; property=&quot;${md5}&quot; verifyProperty=&quot;isEqual&quot;/&gt; &lt;checksum file=&quot;foo.bar&quot; property=&quot;${md5}&quot; verifyProperty=&quot;isEqual&quot;/&gt;
</pre></blockquote>
</pre>
Generates a MD5 checksum for foo.bar, compares it against the value of the property Generates a MD5 checksum for foo.bar, compares it against the value of the property
md5, and sets isEqual to either true or false, depending upon the result. md5, and sets isEqual to either true or false, depending upon the result.


<p><b>Example 7</b></p> <p><b>Example 7</b></p>
<blockquote><pre>
<pre>
&lt;checksum&gt; &lt;checksum&gt;
&lt;fileset dir=&quot;.&quot;&gt; &lt;fileset dir=&quot;.&quot;&gt;
&lt;include name=&quot;foo*&quot;/&gt; &lt;include name=&quot;foo*&quot;/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
&lt;/checksum&gt; &lt;/checksum&gt;
</pre></blockquote>
</pre>
Works just like Example 1, but generates a .MD5 file for every file that begins with the name foo. Works just like Example 1, but generates a .MD5 file for every file that begins with the name foo.


<p><b>Example 8</b></p> <p><b>Example 8</b></p>
<blockquote><pre>
<pre>
&lt;condition property=&quot;isChecksumEqual&quot;&gt; &lt;condition property=&quot;isChecksumEqual&quot;&gt;
&lt;checksum&gt; &lt;checksum&gt;
&lt;fileset dir=&quot;.&quot;&gt; &lt;fileset dir=&quot;.&quot;&gt;
@@ -251,7 +251,7 @@ Works just like Example 1, but generates a .MD5 file for every file that begins
&lt;/fileset&gt; &lt;/fileset&gt;
&lt;/checksum&gt; &lt;/checksum&gt;
&lt;/condition&gt; &lt;/condition&gt;
</pre></blockquote>
</pre>
Works like Example 4, but only sets isChecksumEqual to true, if the Works like Example 4, but only sets isChecksumEqual to true, if the
checksum matches - it will never be set to false. This example checksum matches - it will never be set to false. This example
demonstrates use with the Condition task. demonstrates use with the Condition task.


+ 7
- 8
manual/Tasks/chgrp.html View File

@@ -127,22 +127,22 @@ could use as initial value for these experiments.</p>


</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;chgrp file=&quot;${dist}/start.sh&quot; group=&quot;coders&quot;/&gt; &lt;chgrp file=&quot;${dist}/start.sh&quot; group=&quot;coders&quot;/&gt;
</pre> </pre>
</blockquote>
<p>makes the &quot;start.sh&quot; file belong to the coders group on a <p>makes the &quot;start.sh&quot; file belong to the coders group on a
UNIX system.</p> UNIX system.</p>
<blockquote>
<pre> <pre>
&lt;chgrp group=&quot;coders&quot;&gt; &lt;chgrp group=&quot;coders&quot;&gt;
&lt;fileset dir=&quot;${dist}/bin&quot; includes=&quot;**/*.sh&quot;/&gt; &lt;fileset dir=&quot;${dist}/bin&quot; includes=&quot;**/*.sh&quot;/&gt;
&lt;/chgrp&gt; &lt;/chgrp&gt;
</pre> </pre>
</blockquote>
<p>makes all &quot;.sh&quot; files below <code>${dist}/bin</code> <p>makes all &quot;.sh&quot; files below <code>${dist}/bin</code>
belong to the coders group on a UNIX system.</p> belong to the coders group on a UNIX system.</p>
<blockquote>
<pre> <pre>
&lt;chgrp group=&quot;coders&quot;&gt; &lt;chgrp group=&quot;coders&quot;&gt;
&lt;fileset dir=&quot;shared/sources1&quot;&gt; &lt;fileset dir=&quot;shared/sources1&quot;&gt;
@@ -151,14 +151,14 @@ belong to the coders group on a UNIX system.</p>
&lt;fileset refid=&quot;other.shared.sources&quot;/&gt; &lt;fileset refid=&quot;other.shared.sources&quot;/&gt;
&lt;/chgrp&gt; &lt;/chgrp&gt;
</pre> </pre>
</blockquote>
<p>makes all files below <code>shared/sources1</code> (except those <p>makes all files below <code>shared/sources1</code> (except those
below any directory named trial) belong to the coders group on a UNIX below any directory named trial) belong to the coders group on a UNIX
system. In addition all files belonging to a FileSet system. In addition all files belonging to a FileSet
with <code>id</code> <code>other.shared.sources</code> get the same with <code>id</code> <code>other.shared.sources</code> get the same
group.</p> group.</p>


<blockquote>
<pre> <pre>
&lt;chgrp group=&quot;webdev&quot; type=&quot;file&quot;&gt; &lt;chgrp group=&quot;webdev&quot; type=&quot;file&quot;&gt;
&lt;fileset dir=&quot;/web&quot;&gt; &lt;fileset dir=&quot;/web&quot;&gt;
@@ -170,7 +170,6 @@ group.</p>
&lt;/dirset&gt; &lt;/dirset&gt;
&lt;/chmod&gt; &lt;/chmod&gt;
</pre> </pre>
</blockquote>


<p>makes all <code>.test.jsp</code>, and <code>.new</code> files belong to <p>makes all <code>.test.jsp</code>, and <code>.new</code> files belong to
group webdev. Directories beginning with <code>test_</code> also will belong group webdev. Directories beginning with <code>test_</code> also will belong


+ 5
- 13
manual/Tasks/chmod.html View File

@@ -155,25 +155,23 @@ could use as initial value for these experiments.</p>
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;chmod file=&quot;${dist}/start.sh&quot; perm=&quot;ugo+rx&quot;/&gt; &lt;chmod file=&quot;${dist}/start.sh&quot; perm=&quot;ugo+rx&quot;/&gt;
</pre></blockquote>
</pre>
<p>makes the &quot;start.sh&quot; file readable and executable for anyone on a <p>makes the &quot;start.sh&quot; file readable and executable for anyone on a
UNIX system.</p> UNIX system.</p>
<blockquote><pre>
<pre>
&lt;chmod file=&quot;${dist}/start.sh&quot; perm=&quot;700&quot;/&gt; &lt;chmod file=&quot;${dist}/start.sh&quot; perm=&quot;700&quot;/&gt;
</pre></blockquote>
</pre>
<p>makes the &quot;start.sh&quot; file readable, writable and executable only for the owner on a <p>makes the &quot;start.sh&quot; file readable, writable and executable only for the owner on a
UNIX system.</p> UNIX system.</p>
<blockquote>
<pre> <pre>
&lt;chmod dir=&quot;${dist}/bin&quot; perm=&quot;ugo+rx&quot; &lt;chmod dir=&quot;${dist}/bin&quot; perm=&quot;ugo+rx&quot;
includes=&quot;**/*.sh&quot;/&gt; includes=&quot;**/*.sh&quot;/&gt;
</pre> </pre>
</blockquote>
<p>makes all &quot;.sh&quot; files below <code>${dist}/bin</code> <p>makes all &quot;.sh&quot; files below <code>${dist}/bin</code>
readable and executable for anyone on a UNIX system.</p> readable and executable for anyone on a UNIX system.</p>
<blockquote>
<pre> <pre>
&lt;chmod perm=&quot;g+w&quot;&gt; &lt;chmod perm=&quot;g+w&quot;&gt;
&lt;fileset dir=&quot;shared/sources1&quot;&gt; &lt;fileset dir=&quot;shared/sources1&quot;&gt;
@@ -182,14 +180,11 @@ readable and executable for anyone on a UNIX system.</p>
&lt;fileset refid=&quot;other.shared.sources&quot;/&gt; &lt;fileset refid=&quot;other.shared.sources&quot;/&gt;
&lt;/chmod&gt; &lt;/chmod&gt;
</pre> </pre>
</blockquote>
<p>makes all files below <code>shared/sources1</code> (except those <p>makes all files below <code>shared/sources1</code> (except those
below any directory named trial) writable for members of the same below any directory named trial) writable for members of the same
group on a UNIX system. In addition all files belonging to a FileSet group on a UNIX system. In addition all files belonging to a FileSet
with <code>id</code> <code>other.shared.sources</code> get the same with <code>id</code> <code>other.shared.sources</code> get the same
permissions.</p> permissions.</p>

<blockquote>
<pre> <pre>
&lt;chmod perm=&quot;go-rwx&quot; type=&quot;file&quot;&gt; &lt;chmod perm=&quot;go-rwx&quot; type=&quot;file&quot;&gt;
&lt;fileset dir=&quot;/web&quot;&gt; &lt;fileset dir=&quot;/web&quot;&gt;
@@ -201,14 +196,11 @@ permissions.</p>
&lt;/dirset&gt; &lt;/dirset&gt;
&lt;/chmod&gt; &lt;/chmod&gt;
</pre> </pre>
</blockquote>

<p>keeps non-owners from touching cgi scripts, files with a <code>.old</code> <p>keeps non-owners from touching cgi scripts, files with a <code>.old</code>
extension or directories beginning with <code>private_</code>. A directory extension or directories beginning with <code>private_</code>. A directory
ending in <code>.old</code> or a file beginning with private_ would remain ending in <code>.old</code> or a file beginning with private_ would remain
unaffected.</p> unaffected.</p>



<h3>Note on maxparallel attribute</h3> <h3>Note on maxparallel attribute</h3>
<p> <p>
Some shells have a limit of the number of characters that Some shells have a limit of the number of characters that


+ 3
- 9
manual/Tasks/chown.html View File

@@ -126,22 +126,20 @@ could use as initial value for these experiments.</p>


</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;chown file="${dist}/start.sh" owner="coderjoe"/&gt; &lt;chown file="${dist}/start.sh" owner="coderjoe"/&gt;
</pre> </pre>
</blockquote>
<p>makes the "start.sh" file belong to coderjoe on a <p>makes the "start.sh" file belong to coderjoe on a
UNIX system.</p> UNIX system.</p>
<blockquote>
<pre> <pre>
&lt;chown owner="coderjoe"&gt; &lt;chown owner="coderjoe"&gt;
&lt;fileset dir="${dist}/bin" includes="**/*.sh"/&gt; &lt;fileset dir="${dist}/bin" includes="**/*.sh"/&gt;
&lt;/chown&gt; &lt;/chown&gt;
</pre> </pre>
</blockquote>
<p>makes all ".sh" files below <code>${dist}/bin</code> <p>makes all ".sh" files below <code>${dist}/bin</code>
belong to coderjoe on a UNIX system.</p> belong to coderjoe on a UNIX system.</p>
<blockquote>
<pre> <pre>
&lt;chown owner="coderjoe"&gt; &lt;chown owner="coderjoe"&gt;
&lt;fileset dir="shared/sources1"&gt; &lt;fileset dir="shared/sources1"&gt;
@@ -150,14 +148,12 @@ belong to coderjoe on a UNIX system.</p>
&lt;fileset refid="other.shared.sources"/&gt; &lt;fileset refid="other.shared.sources"/&gt;
&lt;/chown&gt; &lt;/chown&gt;
</pre> </pre>
</blockquote>
<p>makes all files below <code>shared/sources1</code> (except those <p>makes all files below <code>shared/sources1</code> (except those
below any directory named trial) belong to coderjoe on a UNIX below any directory named trial) belong to coderjoe on a UNIX
system. In addition all files belonging to a FileSet system. In addition all files belonging to a FileSet
with <code>id</code> <code>other.shared.sources</code> get the same with <code>id</code> <code>other.shared.sources</code> get the same
owner.</p> owner.</p>


<blockquote>
<pre> <pre>
&lt;chown owner="webadmin" type="file"&gt; &lt;chown owner="webadmin" type="file"&gt;
&lt;fileset dir="/web"&gt; &lt;fileset dir="/web"&gt;
@@ -169,8 +165,6 @@ owner.</p>
&lt;/dirset&gt; &lt;/dirset&gt;
&lt;/chmod&gt; &lt;/chmod&gt;
</pre> </pre>
</blockquote>

<p>makes cgi scripts, files with a <code>.old</code> extension or <p>makes cgi scripts, files with a <code>.old</code> extension or
directories beginning with <code>private_</code> belong to the user named directories beginning with <code>private_</code> belong to the user named
webadmin. A directory ending in <code>.old</code> or a file beginning with webadmin. A directory ending in <code>.old</code> or a file beginning with


+ 26
- 26
manual/Tasks/clearcase.html View File

@@ -121,14 +121,14 @@ Task to perform a "cleartool checkin" command to ClearCase.
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;cccheckin viewpath="c:/views/viewdir/afile" &lt;cccheckin viewpath="c:/views/viewdir/afile"
commentfile="acomment.txt" commentfile="acomment.txt"
nowarn="true" nowarn="true"
identical="true"/&gt; identical="true"/&gt;
</pre> </pre>
</blockquote>
<p>Does a ClearCase <i>checkin</i> on the file <i>c:/views/viewdir/afile</i>. <p>Does a ClearCase <i>checkin</i> on the file <i>c:/views/viewdir/afile</i>.
Comment text from the file <i>acomment.txt</i> is added to ClearCase as a comment. Comment text from the file <i>acomment.txt</i> is added to ClearCase as a comment.
All warning messages are suppressed. The file is checked in even if it is All warning messages are suppressed. The file is checked in even if it is
@@ -204,7 +204,7 @@ Task to perform a "cleartool checkout" command to ClearCase.
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;cccheckout viewpath="c:/views/viewdir/afile" &lt;cccheckout viewpath="c:/views/viewdir/afile"
reserved="true" reserved="true"
@@ -212,7 +212,7 @@ Task to perform a "cleartool checkout" command to ClearCase.
nowarn="true" nowarn="true"
comment="Some comment text"/&gt; comment="Some comment text"/&gt;
</pre> </pre>
</blockquote>
<p>Does a ClearCase <i>checkout</i> on the file <i>c:/views/viewdir/afile</i>. <p>Does a ClearCase <i>checkout</i> on the file <i>c:/views/viewdir/afile</i>.
It is checked out as <i>reserved</i> on branch called <i>abranch</i>. All It is checked out as <i>reserved</i> on branch called <i>abranch</i>. All
warning messages are suppressed. A <i>Some comment text</i> is added to warning messages are suppressed. A <i>Some comment text</i> is added to
@@ -248,12 +248,12 @@ Task to perform a UnCheckout command to ClearCase.
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;ccuncheckout viewpath="c:/views/viewdir/afile" &lt;ccuncheckout viewpath="c:/views/viewdir/afile"
keepcopy="true"/&gt; keepcopy="true"/&gt;
</pre> </pre>
</blockquote>
<p>Does a ClearCase <i>uncheckout</i> on the file <i>c:/views/viewdir/afile</i>. <p>Does a ClearCase <i>uncheckout</i> on the file <i>c:/views/viewdir/afile</i>.
A copy of the file called <i>c:/views/viewdir/afile.keep</i> is kept.</p> A copy of the file called <i>c:/views/viewdir/afile.keep</i> is kept.</p>
<hr/> <hr/>
@@ -315,7 +315,7 @@ Task to perform an "cleartool update" command to ClearCase.
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;ccupdate viewpath="c:/views/viewdir" &lt;ccupdate viewpath="c:/views/viewdir"
graphical="false" graphical="false"
@@ -324,7 +324,7 @@ Task to perform an "cleartool update" command to ClearCase.
currenttime="true" currenttime="true"
rename="false"/&gt; rename="false"/&gt;
</pre> </pre>
</blockquote>
<p>Does a ClearCase <i>update</i> on the snapshot view directory <i>c:/views/viewdir</i>. <p>Does a ClearCase <i>update</i> on the snapshot view directory <i>c:/views/viewdir</i>.
A graphical dialog will be displayed. The output will be logged to A graphical dialog will be displayed. The output will be logged to
<i>log.log</i> and it will overwrite any hijacked files. The modified <i>log.log</i> and it will overwrite any hijacked files. The modified
@@ -393,13 +393,13 @@ Task to perform a "mklbtype" command to ClearCase.
</table> </table>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;ccmklbtype typename="VERSION_1" &lt;ccmklbtype typename="VERSION_1"
ordinary="true" ordinary="true"
comment="Development version 1"/&gt; comment="Development version 1"/&gt;
</pre> </pre>
</blockquote>
<p>Does a ClearCase <i>mklbtype</i> to create a label type named <i>VERSION_1</i>. <p>Does a ClearCase <i>mklbtype</i> to create a label type named <i>VERSION_1</i>.
It is created as <i>ordinary</i> so it is available only to the current VOB. It is created as <i>ordinary</i> so it is available only to the current VOB.
The text <i>Development version 1</i> is added as a comment.</p> The text <i>Development version 1</i> is added as a comment.</p>
@@ -462,7 +462,7 @@ Task to perform a "mklabel" command to ClearCase.
</table> </table>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;ccmklabel viewpath="c:/views/viewdir/afile" &lt;ccmklabel viewpath="c:/views/viewdir/afile"
comment="Some comment text" comment="Some comment text"
@@ -470,7 +470,7 @@ Task to perform a "mklabel" command to ClearCase.
version="\main\2" version="\main\2"
typename="VERSION_1"/&gt; typename="VERSION_1"/&gt;
</pre> </pre>
</blockquote>
<p>Does a ClearCase <i>mklabel</i> on the file <i>c:/views/viewdir/afile</i> under <p>Does a ClearCase <i>mklabel</i> on the file <i>c:/views/viewdir/afile</i> under
the main branch for version 2 (<i>\main\2</i>). Text <i>Some comment text</i> is added the main branch for version 2 (<i>\main\2</i>). Text <i>Some comment text</i> is added
as a comment. It will <i>recurse</i> all subdirectories. as a comment. It will <i>recurse</i> all subdirectories.
@@ -561,14 +561,14 @@ Task to perform a "rmtype" command to ClearCase.
</table> </table>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;ccrmtype typekind="lbtype" &lt;ccrmtype typekind="lbtype"
typename="VERSION_1" typename="VERSION_1"
commentfile="acomment.txt" commentfile="acomment.txt"
rmall="true"/&gt; rmall="true"/&gt;
</pre> </pre>
</blockquote>
<p>Does a ClearCase <i>rmtype</i> to remove a label type (<i>lbtype</i>) named <i>VERSION_1</i>. <p>Does a ClearCase <i>rmtype</i> to remove a label type (<i>lbtype</i>) named <i>VERSION_1</i>.
Comment text from the file <i>acomment.txt</i> is added as a comment. All instances of the type Comment text from the file <i>acomment.txt</i> is added as a comment. All instances of the type
are removed, including the type object itself.</p> are removed, including the type object itself.</p>
@@ -627,12 +627,12 @@ Task to perform a "cleartool lock" command to ClearCase.
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;cclock &lt;cclock
objsel="stream:Application_Integration@\MyProject_PVOB"/&gt; objsel="stream:Application_Integration@\MyProject_PVOB"/&gt;
</pre> </pre>
</blockquote>
<p>Does a ClearCase <i>lock</i> on the object <i>stream:Application_Integration@\MyProject_PVOB</i>.</p> <p>Does a ClearCase <i>lock</i> on the object <i>stream:Application_Integration@\MyProject_PVOB</i>.</p>
<hr> <hr>
<h2 id="ccunlock">CCUnlock</h2> <h2 id="ccunlock">CCUnlock</h2>
@@ -674,12 +674,12 @@ Task to perform a "cleartool unlock" command to ClearCase.
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;ccunlock &lt;ccunlock
objsel="stream:Application_Integration@\MyProject_PVOB"/&gt; objsel="stream:Application_Integration@\MyProject_PVOB"/&gt;
</pre> </pre>
</blockquote>
<p>Does a ClearCase <i>unlock</i> on the object <i>stream:Application_Integration@\MyProject_PVOB</i>.</p> <p>Does a ClearCase <i>unlock</i> on the object <i>stream:Application_Integration@\MyProject_PVOB</i>.</p>
<hr> <hr>
<h2 id="ccmkbl">CCMkbl</h2> <h2 id="ccmkbl">CCMkbl</h2>
@@ -736,7 +736,7 @@ Task to perform a "cleartool mkbl" command to ClearCase.
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;ccmkbl &lt;ccmkbl
baselinerootname="Application_Baseline_AUTO" baselinerootname="Application_Baseline_AUTO"
@@ -744,7 +744,7 @@ Task to perform a "cleartool mkbl" command to ClearCase.
full="no" full="no"
viewpath="v:\ApplicationCC"/&gt; viewpath="v:\ApplicationCC"/&gt;
</pre> </pre>
</blockquote>
<p>Does a ClearCase <i>mkbl</i> on the Integration view at <i>v:\ApplicationCC</i> <p>Does a ClearCase <i>mkbl</i> on the Integration view at <i>v:\ApplicationCC</i>
even if it is <i>identical</i> to a previous baseline. The new baseline with be even if it is <i>identical</i> to a previous baseline. The new baseline with be
incremental and named "Application_Baseline_AUTO".</p> incremental and named "Application_Baseline_AUTO".</p>
@@ -807,13 +807,13 @@ Task to perform a &quot;cleartool mkattr&quot; command to ClearCase.<br>
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;ccmkattr viewpath=&quot;c:/views/viewdir/afile&quot; &lt;ccmkattr viewpath=&quot;c:/views/viewdir/afile&quot;
typename=&quot;BugFix&quot; typename=&quot;BugFix&quot;
typevalue=&quot;34445&quot;/&gt; typevalue=&quot;34445&quot;/&gt;
</pre> </pre>
</blockquote>
<p>Does a ClearCase <i>mkattr</i> on the file <i>c:/views/viewdir/afile</i> and <p>Does a ClearCase <i>mkattr</i> on the file <i>c:/views/viewdir/afile</i> and
attaches the attribute <i>BugFix</i> with a value of <i>34445</i> to it.</p> attaches the attribute <i>BugFix</i> with a value of <i>34445</i> to it.</p>
<hr/> <hr/>
@@ -854,13 +854,13 @@ Task to perform a &quot;cleartool mkdir&quot; command to ClearCase.<br>
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;ccmkdir viewpath=&quot;c:/views/viewdir/adir&quot; &lt;ccmkdir viewpath=&quot;c:/views/viewdir/adir&quot;
nocheckout=&quot;true&quot; nocheckout=&quot;true&quot;
comment=&quot;Some comment text&quot;/&gt; comment=&quot;Some comment text&quot;/&gt;
</pre> </pre>
</blockquote>
<p>Does a ClearCase <i>mkdir</i> on the dir <i>c:/views/viewdir/adir</i> and <p>Does a ClearCase <i>mkdir</i> on the dir <i>c:/views/viewdir/adir</i> and
does not automatically check it out.</p> does not automatically check it out.</p>
<hr/> <hr/>
@@ -927,14 +927,14 @@ Task to perform a &quot;cleartool mkelem&quot; command to ClearCase.<br>
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;ccmkelem viewpath=&quot;c:/views/viewdir/afile&quot; &lt;ccmkelem viewpath=&quot;c:/views/viewdir/afile&quot;
eltype=&quot;text_file&quot; eltype=&quot;text_file&quot;
checkin=&quot;true&quot; checkin=&quot;true&quot;
comment=&quot;Some comment text&quot;/&gt; comment=&quot;Some comment text&quot;/&gt;
</pre> </pre>
</blockquote>
<p>Does a ClearCase <i>mkelem</i> on the file <i>c:/views/viewdir/afile</i> with <p>Does a ClearCase <i>mkelem</i> on the file <i>c:/views/viewdir/afile</i> with
element type <i>text_file</i>. It also checks in the file after creation.</p> element type <i>text_file</i>. It also checks in the file after creation.</p>




+ 42
- 42
manual/Tasks/conditions.html View File

@@ -335,10 +335,10 @@ that is "true","yes", or "on"</p>
<td valign="top" align="center">Yes</td> <td valign="top" align="center">Yes</td>
</tr> </tr>
</table> </table>
<blockquote><pre>
<pre>
&lt;istrue value=&quot;${someproperty}&quot;/&gt; &lt;istrue value=&quot;${someproperty}&quot;/&gt;
&lt;istrue value=&quot;false&quot;/&gt; &lt;istrue value=&quot;false&quot;/&gt;
</pre></blockquote>
</pre>


<h4 id="isfalse">isfalse</h4> <h4 id="isfalse">isfalse</h4>
<p>Tests whether a string is not true, the negation of &lt;istrue&gt; <p>Tests whether a string is not true, the negation of &lt;istrue&gt;
@@ -355,10 +355,10 @@ that is "true","yes", or "on"</p>
<td valign="top" align="center">Yes</td> <td valign="top" align="center">Yes</td>
</tr> </tr>
</table> </table>
<blockquote><pre>
<pre>
&lt;isfalse value=&quot;${someproperty}&quot;/&gt; &lt;isfalse value=&quot;${someproperty}&quot;/&gt;
&lt;isfalse value=&quot;false&quot;/&gt; &lt;isfalse value=&quot;false&quot;/&gt;
</pre></blockquote>
</pre>


<h4 id="isreference">isreference</h4> <h4 id="isreference">isreference</h4>
<p>Test whether a given reference has been defined in this project and <p>Test whether a given reference has been defined in this project and
@@ -449,11 +449,11 @@ that is "true","yes", or "on"</p>
<p> <p>
Example usage: Example usage:
</p> </p>
<blockquote><pre>
<pre>
&lt;isfileselected file="a.xml"&gt; &lt;isfileselected file="a.xml"&gt;
&lt;date datetime="06/28/2000 2:02 pm" when="equal"/&gt; &lt;date datetime="06/28/2000 2:02 pm" when="equal"/&gt;
&lt;/isfileselected&gt; &lt;/isfileselected&gt;
</pre></blockquote>
</pre>


<h4 id="typefound">typefound</h4> <h4 id="typefound">typefound</h4>


@@ -486,10 +486,10 @@ tasks, datatypes, scriptdefs, macrodefs and presetdefs.</p>
<p> <p>
Example usages: Example usages:
</p> </p>
<blockquote><pre>
<pre>
&lt;typefound name="junit"/&gt; &lt;typefound name="junit"/&gt;
&lt;typefound uri="antlib:org.apache.maven.artifact.ant" name="artifact"/&gt; &lt;typefound uri="antlib:org.apache.maven.artifact.ant" name="artifact"/&gt;
</pre></blockquote>
</pre>


<h4 id="scriptcondition">scriptcondition</h4> <h4 id="scriptcondition">scriptcondition</h4>


@@ -578,12 +578,12 @@ Alternatively, <code>self.value</code> can be used to set the evaluation result.
<p> <p>
Example: Example:
</p> </p>
<blockquote><pre>
<pre>
&lt;scriptcondition language=&quot;javascript&quot; &lt;scriptcondition language=&quot;javascript&quot;
value=&quot;true&quot;&gt; value=&quot;true&quot;&gt;
self.setValue(false); self.setValue(false);
&lt;/scriptcondition&gt; &lt;/scriptcondition&gt;
</pre></blockquote>
</pre>


Sets the default value of the condition to true, then in the script, Sets the default value of the condition to true, then in the script,
sets the value to false. This condition always evaluates to "false" sets the value to false. This condition always evaluates to "false"
@@ -618,18 +618,18 @@ attempting to set the appropriate property/feature/</p>
</tr> </tr>
</table> </table>


<blockquote><pre>
<pre>
&lt;parsersupports feature="http://xml.org/sax/features/namespaces"/&gt; &lt;parsersupports feature="http://xml.org/sax/features/namespaces"/&gt;
</pre></blockquote>
</pre>
Check for namespace support. All SAX2 parsers should have this. Check for namespace support. All SAX2 parsers should have this.
<blockquote><pre>
<pre>
&lt;or&gt; &lt;or&gt;
&lt;parsersupports &lt;parsersupports
feature="http://apache.org/xml/features/validation/schema"/&gt; feature="http://apache.org/xml/features/validation/schema"/&gt;
&lt;parsersupports &lt;parsersupports
feature="http://java.sun.com/xml/jaxp/properties/schemaSource"/&gt; feature="http://java.sun.com/xml/jaxp/properties/schemaSource"/&gt;
&lt;/or&gt; &lt;/or&gt;
</pre></blockquote>
</pre>


Check for XML Schema support. Check for XML Schema support.


@@ -691,21 +691,21 @@ not reachable on other ports (i.e. port 80), because of firewalls.
</tr> </tr>
</table> </table>


<blockquote><pre>
<pre>
&lt;condition property="offline"&gt; &lt;condition property="offline"&gt;
&lt;isreachable url="http://ibiblio.org/maven/" /&gt; &lt;isreachable url="http://ibiblio.org/maven/" /&gt;
&lt;/condition&gt; &lt;/condition&gt;
</pre></blockquote>
</pre>


<p> <p>
Probe for the maven repository being reachable. Probe for the maven repository being reachable.
</p> </p>


<blockquote><pre>
<pre>
&lt;condition property="offline"&gt; &lt;condition property="offline"&gt;
&lt;isreachable host="ibiblio.org" timeout="10" /&gt; &lt;isreachable host="ibiblio.org" timeout="10" /&gt;
&lt;/condition&gt; &lt;/condition&gt;
</pre></blockquote>
</pre>


<p> <p>
Probe for the maven repository being reachable using the hostname, ten second timeout.. Probe for the maven repository being reachable using the hostname, ten second timeout..
@@ -717,14 +717,14 @@ Probe for the maven repository being reachable using the hostname, ten second ti
<em>Since Ant 1.6.3</em> <em>Since Ant 1.6.3</em>
</p> </p>


<blockquote><pre>
<pre>
&lt;length string=" foo " trim="true" length="3" /&gt; &lt;length string=" foo " trim="true" length="3" /&gt;
</pre></blockquote>
</pre>
<p>Verify a string is of a certain length.</p> <p>Verify a string is of a certain length.</p>


<blockquote><pre>
<pre>
&lt;length file=&quot;foo&quot; when=&quot;greater&quot; length=&quot;0&quot; /&gt; &lt;length file=&quot;foo&quot; when=&quot;greater&quot; length=&quot;0&quot; /&gt;
</pre></blockquote>
</pre>
<p>Verify that file <i>foo</i> is not empty.</p> <p>Verify that file <i>foo</i> is not empty.</p>


<h4 id="isfailure">isfailure</h4> <h4 id="isfailure">isfailure</h4>
@@ -753,9 +753,9 @@ Probe for the maven repository being reachable using the hostname, ten second ti
<em>Since Ant 1.7</em> <em>Since Ant 1.7</em>
</p> </p>


<blockquote><pre>
<pre>
&lt;resourcecount refid=&quot;myresourcecollection&quot; when=&quot;greater&quot; count=&quot;0&quot; /&gt; &lt;resourcecount refid=&quot;myresourcecollection&quot; when=&quot;greater&quot; count=&quot;0&quot; /&gt;
</pre></blockquote>
</pre>
<p>Verify that a resource collection is not empty.</p> <p>Verify that a resource collection is not empty.</p>


<h4 id="resourcesmatch">resourcesmatch</h4> <h4 id="resourcesmatch">resourcesmatch</h4>
@@ -870,9 +870,9 @@ must match. <em>Since Ant 1.7</em>
There is also a nested &lt;classpath&gt; element, which can be used to specify There is also a nested &lt;classpath&gt; element, which can be used to specify
a classpath. a classpath.
</p> </p>
<blockquote><pre>
<pre>
&lt;hasmethod classname="java.util.ArrayList" method="trimToSize" /&gt; &lt;hasmethod classname="java.util.ArrayList" method="trimToSize" /&gt;
</pre></blockquote>
</pre>


<p>Looks for the method trimToSize in the ArrayList class.</p> <p>Looks for the method trimToSize in the ArrayList class.</p>


@@ -934,29 +934,29 @@ must match. <em>Since Ant 1.7</em>
<p> <p>
An example: An example:
</p> </p>
<blockquote><pre>
<pre>
&lt;condition property="legal-password"&gt; &lt;condition property="legal-password"&gt;
&lt;matches pattern="[1-9]" string="${user-input}"/&gt; &lt;matches pattern="[1-9]" string="${user-input}"/&gt;
&lt;/condition&gt; &lt;/condition&gt;
&lt;fail message="Your password should at least contain one number" &lt;fail message="Your password should at least contain one number"
unless="legal-password"/&gt; unless="legal-password"/&gt;
</pre></blockquote>
</pre>
<p> <p>
The following example sets the property "ok" if The following example sets the property "ok" if
the property "input" is three characters long, starting the property "input" is three characters long, starting
with 'a' and ending with 'b'. with 'a' and ending with 'b'.
</p> </p>
<blockquote><pre>
<pre>
&lt;condition property="ok"&gt; &lt;condition property="ok"&gt;
&lt;matches string="${input}" pattern="^a.b$"/&gt; &lt;matches string="${input}" pattern="^a.b$"/&gt;
&lt;/condition&gt; &lt;/condition&gt;
</pre></blockquote>
</pre>
<p> <p>
The following defines a reference regular expression for The following defines a reference regular expression for
matching dates and then uses antunit to check if the matching dates and then uses antunit to check if the
property "today" is in the correct format: property "today" is in the correct format:
</p> </p>
<blockquote><pre>
<pre>
&lt;regexp id="date.pattern" pattern="^[0123]\d-[01]\d-[12]\d\d\d$"/&gt; &lt;regexp id="date.pattern" pattern="^[0123]\d-[01]\d-[12]\d\d\d$"/&gt;


&lt;au:assertTrue xmlns:au="antlib:org.apache.ant.antunit"&gt; &lt;au:assertTrue xmlns:au="antlib:org.apache.ant.antunit"&gt;
@@ -964,12 +964,12 @@ must match. <em>Since Ant 1.7</em>
&lt;regexp refid="date.pattern"/&gt; &lt;regexp refid="date.pattern"/&gt;
&lt;/matches&gt; &lt;/matches&gt;
&lt;/au:assertTrue&gt; &lt;/au:assertTrue&gt;
</pre></blockquote>
</pre>
<p> <p>
The following example shows the use of the singleline and the casesensitive The following example shows the use of the singleline and the casesensitive
flags. flags.
</p> </p>
<blockquote><pre>
<pre>
&lt;au:assertTrue&gt; &lt;au:assertTrue&gt;
&lt;matches string="AB${line.separator}C" pattern="^ab.*C$" &lt;matches string="AB${line.separator}C" pattern="^ab.*C$"
casesensitive="false" casesensitive="false"
@@ -980,7 +980,7 @@ must match. <em>Since Ant 1.7</em>
casesensitive="false" casesensitive="false"
singleline="false"/&gt; singleline="false"/&gt;
&lt;/au:assertFalse&gt; &lt;/au:assertFalse&gt;
</pre></blockquote>
</pre>


<h4 id="antversion">antversion</h4> <h4 id="antversion">antversion</h4>
<p>This condition is identical to the <a <p>This condition is identical to the <a
@@ -1022,9 +1022,9 @@ is redundant and will be ignored.</p>
<p> <p>
An example: An example:
</p> </p>
<blockquote><pre>
<pre>
&lt;hasfreespace partition="c:" needed="100M"/&gt; &lt;hasfreespace partition="c:" needed="100M"/&gt;
</pre></blockquote>
</pre>


<h4 id="islastmodified">islastmodified</h4> <h4 id="islastmodified">islastmodified</h4>


@@ -1070,11 +1070,11 @@ is redundant and will be ignored.</p>
<p> <p>
An example: An example:
</p> </p>
<blockquote><pre>
<pre>
&lt;islastmodified dateTime="08/18/2009 04:41:19 AM" mode="not-before"&gt; &lt;islastmodified dateTime="08/18/2009 04:41:19 AM" mode="not-before"&gt;
&lt;file file="${file}"/&gt; &lt;file file="${file}"/&gt;
&lt;/islastmodified&gt; &lt;/islastmodified&gt;
</pre></blockquote>
</pre>


<h4 id="resourceexists">resourceexists</h4> <h4 id="resourceexists">resourceexists</h4>


@@ -1085,11 +1085,11 @@ is redundant and will be ignored.</p>
<p> <p>
An example: An example:
</p> </p>
<blockquote><pre>
<pre>
&lt;resourceexists&gt; &lt;resourceexists&gt;
&lt;file file="${file}"/&gt; &lt;file file="${file}"/&gt;
&lt;/resourceexists&gt; &lt;/resourceexists&gt;
</pre></blockquote>
</pre>


<h4 id="javaversion">javaversion</h4> <h4 id="javaversion">javaversion</h4>


@@ -1122,9 +1122,9 @@ is redundant and will be ignored.</p>
An example: An example:
</p> </p>


<blockquote><pre>
<pre>
&lt;javaversion atleast=&quot;9&quot;/&gt; &lt;javaversion atleast=&quot;9&quot;/&gt;
</pre></blockquote>
</pre>


<p>will evaluate to true if the current JVM is Java 9 or above.</p> <p>will evaluate to true if the current JVM is Java 9 or above.</p>




+ 2
- 4
manual/Tasks/copyfile.html View File

@@ -62,10 +62,8 @@ does not exist.</p>
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<p><code>&lt;copyfile src=&quot;test.java&quot; dest=&quot;subdir/test.java&quot;/&gt;</code></p>
<p><code>&lt;copyfile src=&quot;${src}/index.html&quot; dest=&quot;${dist}/help/index.html&quot;/&gt;</code></p>
</blockquote>
<pre> &lt;copyfile src=&quot;test.java&quot; dest=&quot;subdir/test.java&quot;/&gt;
&lt;copyfile src=&quot;${src}/index.html&quot; dest=&quot;${dist}/help/index.html&quot;/&gt;</pre>


</body> </body>
</html> </html>

+ 1
- 2
manual/Tasks/dependset.html View File

@@ -132,7 +132,7 @@ Multiple <code>&lt;targetfilelist&gt;</code> filelists may be specified.
</p> </p>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote> <pre>
<pre>
&lt;dependset&gt; &lt;dependset&gt;
&lt;srcfilelist &lt;srcfilelist
dir = &quot;${dtd.dir}&quot; dir = &quot;${dtd.dir}&quot;
@@ -147,7 +147,6 @@ Multiple <code>&lt;targetfilelist&gt;</code> filelists may be specified.
dir = &quot;${output.dir}&quot; dir = &quot;${output.dir}&quot;
includes = &quot;**/*.html&quot;/&gt; includes = &quot;**/*.html&quot;/&gt;
&lt;/dependset&gt;</pre> &lt;/dependset&gt;</pre>
</blockquote>


<p> <p>
In this example derived HTML files in the ${output.dir} directory In this example derived HTML files in the ${output.dir} directory


+ 9
- 19
manual/Tasks/echoproperties.html View File

@@ -97,46 +97,36 @@ shortcuts that use <tt>propertyset</tt>s internally.
<p><em>since Ant 1.6</em>.</p> <p><em>since Ant 1.6</em>.</p>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
&lt;echoproperties/&gt;
</pre></blockquote>
<pre>&lt;echoproperties/&gt;</pre>
<p>Report the current properties to the log.</p> <p>Report the current properties to the log.</p>
<blockquote><pre>
&lt;echoproperties destfile="my.properties"/&gt;
</pre></blockquote>
<pre>&lt;echoproperties destfile="my.properties"/&gt;</pre>
<p>Report the current properties to the file "my.properties", and will <p>Report the current properties to the file "my.properties", and will
fail the build if the file could not be created or written to.</p> fail the build if the file could not be created or written to.</p>
<blockquote><pre>
&lt;echoproperties destfile="my.properties" failonerror="false"/&gt;
</pre></blockquote>
<pre>&lt;echoproperties destfile="my.properties" failonerror="false"/&gt;</pre>
<p>Report the current properties to the file "my.properties", and will <p>Report the current properties to the file "my.properties", and will
log a message if the file could not be created or written to, but will still log a message if the file could not be created or written to, but will still
allow the build to continue.</p> allow the build to continue.</p>
<blockquote><pre>
&lt;echoproperties prefix="java."/&gt;
</pre></blockquote>
<pre>&lt;echoproperties prefix="java."/&gt;</pre>
<p>List all properties beginning with "java."</p> <p>List all properties beginning with "java."</p>
<blockquote><pre>
<pre>
&lt;echoproperties&gt; &lt;echoproperties&gt;
&lt;propertyset&gt; &lt;propertyset&gt;
&lt;propertyref prefix="java."/&gt; &lt;propertyref prefix="java."/&gt;
&lt;/propertyset&gt; &lt;/propertyset&gt;
&lt;/echoproperties&gt; &lt;/echoproperties&gt;
</pre></blockquote>
</pre>
<p>This again lists all properties beginning with "java." using a nested <p>This again lists all properties beginning with "java." using a nested
<tt>&lt;/propertyset&gt;</tt> which is an equivalent but longer way.</p> <tt>&lt;/propertyset&gt;</tt> which is an equivalent but longer way.</p>
<blockquote><pre>
&lt;echoproperties regex=".*ant.*"/&gt;
</pre></blockquote>
<pre>&lt;echoproperties regex=".*ant.*"/&gt;</pre>
<p>Lists all properties that contain "ant" in their names. <p>Lists all properties that contain "ant" in their names.
The equivalent snippet with <tt>&lt;/propertyset&gt;</tt> is:</p> The equivalent snippet with <tt>&lt;/propertyset&gt;</tt> is:</p>
<blockquote><pre>
<pre>
&lt;echoproperties&gt; &lt;echoproperties&gt;
&lt;propertyset&gt; &lt;propertyset&gt;
&lt;propertyref regex=".*ant.*"/&gt; &lt;propertyref regex=".*ant.*"/&gt;
&lt;/propertyset&gt; &lt;/propertyset&gt;
&lt;/echoproperties&gt; &lt;/echoproperties&gt;
</pre></blockquote>
</pre>


</body> </body>
</html> </html>

+ 10
- 23
manual/Tasks/exec.html View File

@@ -60,7 +60,6 @@ types listed in the environment variable PATHEXT. That is only used by the shell
One normally needs to execute the command shell executable <code>cmd</code> One normally needs to execute the command shell executable <code>cmd</code>
using the <code>/c</code> switch. using the <code>/c</code> switch.
</p> </p>
<blockquote>
<pre> <pre>
&lt;target name="help"&gt; &lt;target name="help"&gt;
&lt;exec executable="cmd"&gt; &lt;exec executable="cmd"&gt;
@@ -69,7 +68,7 @@ types listed in the environment variable PATHEXT. That is only used by the shell
&lt;arg value="-p"/&gt; &lt;arg value="-p"/&gt;
&lt;/exec&gt; &lt;/exec&gt;
&lt;/target&gt; &lt;/target&gt;
</pre></blockquote>
</pre>


<p>A common problem is not having the executable on the PATH. In case you get an error <p>A common problem is not having the executable on the PATH. In case you get an error
message <tt>Cannot run program "...":CreateProcess error=2. The system cannot find message <tt>Cannot run program "...":CreateProcess error=2. The system cannot find
@@ -79,7 +78,6 @@ to the PATH (<tt>set PATH=%PATH%;dirOfProgram</tt>) or specify the absolute path
<tt>executable</tt> attribute in your buildfile. <tt>executable</tt> attribute in your buildfile.
</p> </p>



<h4>Cygwin Users</h4> <h4>Cygwin Users</h4>
<p>The <code>&lt;exec&gt;</code> task will not understand paths such as /bin/sh <p>The <code>&lt;exec&gt;</code> task will not understand paths such as /bin/sh
for the executable parameter. This is because the Java VM in which Ant is for the executable parameter. This is because the Java VM in which Ant is
@@ -116,27 +114,20 @@ set to <code>true</code> instead as this task will follow the VM's
interpretation of exit codes.</p> interpretation of exit codes.</p>


<h4>RedHat S/390 Users</h4> <h4>RedHat S/390 Users</h4>

<p>It has been <a <p>It has been <a
href="http://listserv.uark.edu/scripts/wa.exe?A1=ind0404&L=vmesa-l#33">reported href="http://listserv.uark.edu/scripts/wa.exe?A1=ind0404&L=vmesa-l#33">reported
on the VMESA-LISTSERV</a> that shell scripts invoked via the Ant Exec on the VMESA-LISTSERV</a> that shell scripts invoked via the Ant Exec
task must have their interpreter specified, i.e., the scripts must task must have their interpreter specified, i.e., the scripts must
start with something like:</p> start with something like:</p>


<blockquote>
<pre> <pre>
#!/bin/bash #!/bin/bash
</pre> </pre>
</blockquote>

<p>or the task will fail as follows:</p> <p>or the task will fail as follows:</p>

<blockquote>
<pre> <pre>
[exec] Warning: UNIXProcess.forkAndExec native error: Exec format error [exec] Warning: UNIXProcess.forkAndExec native error: Exec format error
[exec] Result: 255 [exec] Result: 255
</pre> </pre>
</blockquote>


<h4 id="background">Running Ant as a background process on Unix(-like) systems</h4> <h4 id="background">Running Ant as a background process on Unix(-like) systems</h4>


@@ -318,12 +309,11 @@ start with something like:</p>
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;exec dir=&quot;${src}&quot; executable=&quot;cmd.exe&quot; os=&quot;Windows 2000&quot; output=&quot;dir.txt&quot;&gt; &lt;exec dir=&quot;${src}&quot; executable=&quot;cmd.exe&quot; os=&quot;Windows 2000&quot; output=&quot;dir.txt&quot;&gt;
&lt;arg line=&quot;/c dir&quot;/&gt; &lt;arg line=&quot;/c dir&quot;/&gt;
&lt;/exec&gt;</pre> &lt;/exec&gt;</pre>
</blockquote>
<h3>Parameters specified as nested elements</h3> <h3>Parameters specified as nested elements</h3>
<h4>arg</h4> <h4>arg</h4>
<p>Command line arguments should be specified as nested <p>Command line arguments should be specified as nested
@@ -398,34 +388,31 @@ it is not on the path. Any time you see such an error from any Ant task, it is
usually not an Ant bug, but some configuration problem on your machine. usually not an Ant bug, but some configuration problem on your machine.


<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;exec executable=&quot;emacs&quot;&gt; &lt;exec executable=&quot;emacs&quot;&gt;
&lt;env key=&quot;DISPLAY&quot; value=&quot;:1.0&quot;/&gt; &lt;env key=&quot;DISPLAY&quot; value=&quot;:1.0&quot;/&gt;
&lt;/exec&gt; &lt;/exec&gt;
</pre></blockquote>
</pre>
<p>starts <code>emacs</code> on display 1 of the X Window System.</p> <p>starts <code>emacs</code> on display 1 of the X Window System.</p>

<blockquote><pre>
<pre>
&lt;property environment=&quot;env&quot;/&gt; &lt;property environment=&quot;env&quot;/&gt;
&lt;exec ... &gt; &lt;exec ... &gt;
&lt;env key=&quot;PATH&quot; path=&quot;${env.PATH}:${basedir}/bin&quot;/&gt; &lt;env key=&quot;PATH&quot; path=&quot;${env.PATH}:${basedir}/bin&quot;/&gt;
&lt;/exec&gt; &lt;/exec&gt;
</pre></blockquote>
</pre>
<p>adds <code>${basedir}/bin</code> to the <code>PATH</code> of the <p>adds <code>${basedir}/bin</code> to the <code>PATH</code> of the
system command.</p> system command.</p>

<blockquote><pre>
<pre>
&lt;property name="browser" location="C:/Program Files/Internet Explorer/iexplore.exe"/&gt; &lt;property name="browser" location="C:/Program Files/Internet Explorer/iexplore.exe"/&gt;
&lt;property name="file" location="ant/docs/manual/index.html"/&gt; &lt;property name="file" location="ant/docs/manual/index.html"/&gt;


&lt;exec executable="${browser}" spawn="true"&gt; &lt;exec executable="${browser}" spawn="true"&gt;
&lt;arg value="${file}"/&gt; &lt;arg value="${file}"/&gt;
&lt;/exec&gt; &lt;/exec&gt;
</pre></blockquote>
</pre>
<p>Starts the <i>${browser}</i> with the specified <i>${file}</i> and end the <p>Starts the <i>${browser}</i> with the specified <i>${file}</i> and end the
Ant process. The browser will remain.</p> Ant process. The browser will remain.</p>

<blockquote><pre>
<pre>
&lt;exec executable=&quot;cat&quot;&gt; &lt;exec executable=&quot;cat&quot;&gt;
&lt;redirector outputproperty=&quot;redirector.out&quot; &lt;redirector outputproperty=&quot;redirector.out&quot;
errorproperty=&quot;redirector.err&quot; errorproperty=&quot;redirector.err&quot;
@@ -437,7 +424,7 @@ Ant process. The browser will remain.</p>
&lt;errormapper type=&quot;merge&quot; to=&quot;redirector.err&quot;/&gt; &lt;errormapper type=&quot;merge&quot; to=&quot;redirector.err&quot;/&gt;
&lt;/redirector&gt; &lt;/redirector&gt;
&lt;/exec&gt; &lt;/exec&gt;
</pre></blockquote>
</pre>


Sends the string &quot;blah before blah&quot; to the &quot;cat&quot; executable, Sends the string &quot;blah before blah&quot; to the &quot;cat&quot; executable,
using an <a href="../Types/filterchain.html">&lt;inputfilterchain&gt;</a> using an <a href="../Types/filterchain.html">&lt;inputfilterchain&gt;</a>


+ 3
- 5
manual/Tasks/genkey.html View File

@@ -102,13 +102,12 @@ with &quot;<code>\,</code>&quot;.</p>
<p>The following two examples are identical:</p> <p>The following two examples are identical:</p>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;genkey alias=&quot;apache-group&quot; storepass=&quot;secret&quot; &lt;genkey alias=&quot;apache-group&quot; storepass=&quot;secret&quot;
dname=&quot;CN=Ant Group, OU=Jakarta Division, O=Apache.org, C=US&quot;/&gt; dname=&quot;CN=Ant Group, OU=Jakarta Division, O=Apache.org, C=US&quot;/&gt;
</pre></blockquote>
</pre>


<blockquote>
<pre>
<pre>
&lt;genkey alias=&quot;apache-group&quot; storepass=&quot;secret&quot; &gt; &lt;genkey alias=&quot;apache-group&quot; storepass=&quot;secret&quot; &gt;
&lt;dname&gt; &lt;dname&gt;
&lt;param name=&quot;CN&quot; value=&quot;Ant Group&quot;/&gt; &lt;param name=&quot;CN&quot; value=&quot;Ant Group&quot;/&gt;
@@ -117,7 +116,6 @@ with &quot;<code>\,</code>&quot;.</p>
&lt;param name=&quot;C&quot; value=&quot;US&quot;/&gt; &lt;param name=&quot;C&quot; value=&quot;US&quot;/&gt;
&lt;/dname&gt; &lt;/dname&gt;
&lt;/genkey&gt;</pre> &lt;/genkey&gt;</pre>
</blockquote>


</body> </body>
</html> </html>

+ 8
- 8
manual/Tasks/image.html View File

@@ -219,38 +219,38 @@ nested inside the Draw object.</p>


<h3>Examples</h3> <h3>Examples</h3>


<blockquote><pre>
<pre>
&lt;image destdir="samples/low" overwrite="yes"&gt; &lt;image destdir="samples/low" overwrite="yes"&gt;
&lt;fileset dir="samples/full"&gt; &lt;fileset dir="samples/full"&gt;
&lt;include name="**/*.jpg"/&gt; &lt;include name="**/*.jpg"/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
&lt;scale width="160" height="160" proportions="fit"/&gt; &lt;scale width="160" height="160" proportions="fit"/&gt;
&lt;/image&gt; &lt;/image&gt;
</pre></blockquote>
</pre>
<p>Create thumbnails of my images and make sure they all fit within the 160x160 size whether the <p>Create thumbnails of my images and make sure they all fit within the 160x160 size whether the
image is portrait or landscape.</p> image is portrait or landscape.</p>


<blockquote><pre>
<pre>
&lt;image srcdir="src" includes="*.png"&gt; &lt;image srcdir="src" includes="*.png"&gt;
&lt;scale proportions="width" width="40"/&gt; &lt;scale proportions="width" width="40"/&gt;
&lt;/image&gt; &lt;/image&gt;
</pre></blockquote>
</pre>
<p>Creates a thumbnail for all PNG-files in <i>src</i> in the size of 40 pixel keeping the proportions <p>Creates a thumbnail for all PNG-files in <i>src</i> in the size of 40 pixel keeping the proportions
and stores the <i>src</i>.</p> and stores the <i>src</i>.</p>


<blockquote><pre>
<pre>
&lt;image srcdir="src" destdir="dest" includes="*.png"&gt; &lt;image srcdir="src" destdir="dest" includes="*.png"&gt;
&lt;scale proportions="width" width="40"/&gt; &lt;scale proportions="width" width="40"/&gt;
&lt;/image&gt; &lt;/image&gt;
</pre></blockquote>
</pre>
<p>Same as above but stores the result in <i>dest</i>.</p> <p>Same as above but stores the result in <i>dest</i>.</p>


<blockquote><pre>
<pre>
&lt;image srcdir="src" destdir="dest" includes="*.png"&gt; &lt;image srcdir="src" destdir="dest" includes="*.png"&gt;
&lt;scale proportions="width" width="40"/&gt; &lt;scale proportions="width" width="40"/&gt;
&lt;globmapper from="*" to="scaled-*"/&gt; &lt;globmapper from="*" to="scaled-*"/&gt;
&lt;/image&gt; &lt;/image&gt;
</pre></blockquote>
</pre>
<p>Same as above but stores the resulting file names will be prefixed <p>Same as above but stores the resulting file names will be prefixed
by "scaled-".</p> by "scaled-".</p>




+ 21
- 25
manual/Tasks/jar.html View File

@@ -440,39 +440,38 @@ depend on your manifest:</p>
nested &lt;provider&gt; elements may be used. nested &lt;provider&gt; elements may be used.
</p> </p>



<h3>Examples</h3> <h3>Examples</h3>


<h4>Simple</h4> <h4>Simple</h4>
<blockquote><pre> &lt;jar destfile=&quot;${dist}/lib/app.jar&quot; basedir=&quot;${build}/classes&quot;/&gt;</pre></blockquote>
<pre> &lt;jar destfile=&quot;${dist}/lib/app.jar&quot; basedir=&quot;${build}/classes&quot;/&gt;</pre>
<p>jars all files in the <code>${build}/classes</code> directory into a file <p>jars all files in the <code>${build}/classes</code> directory into a file
called <code>app.jar</code> in the <code>${dist}/lib</code> directory.</p> called <code>app.jar</code> in the <code>${dist}/lib</code> directory.</p>




<h4>With filters</h4> <h4>With filters</h4>


<blockquote><pre> &lt;jar destfile=&quot;${dist}/lib/app.jar&quot;
<pre> &lt;jar destfile=&quot;${dist}/lib/app.jar&quot;
basedir=&quot;${build}/classes&quot; basedir=&quot;${build}/classes&quot;
excludes=&quot;**/Test.class&quot;/&gt;</pre></blockquote>
excludes=&quot;**/Test.class&quot;/&gt;</pre>
<p>jars all files in the <code>${build}/classes</code> directory into a file <p>jars all files in the <code>${build}/classes</code> directory into a file
called <code>app.jar</code> in the <code>${dist}/lib</code> directory. Files called <code>app.jar</code> in the <code>${dist}/lib</code> directory. Files
with the name <code>Test.class</code> are excluded.</p> with the name <code>Test.class</code> are excluded.</p>


<blockquote><pre> &lt;jar destfile=&quot;${dist}/lib/app.jar&quot;
<pre> &lt;jar destfile=&quot;${dist}/lib/app.jar&quot;
basedir=&quot;${build}/classes&quot; basedir=&quot;${build}/classes&quot;
includes=&quot;mypackage/test/**&quot; includes=&quot;mypackage/test/**&quot;
excludes=&quot;**/Test.class&quot;/&gt;</pre></blockquote>
excludes=&quot;**/Test.class&quot;/&gt;</pre>
<p>jars all files in the <code>${build}/classes</code> directory into a file <p>jars all files in the <code>${build}/classes</code> directory into a file
called <code>app.jar</code> in the <code>${dist}/lib</code> directory. Only called <code>app.jar</code> in the <code>${dist}/lib</code> directory. Only
files under the directory <code>mypackage/test</code> are used, and files with files under the directory <code>mypackage/test</code> are used, and files with
the name <code>Test.class</code> are excluded.</p> the name <code>Test.class</code> are excluded.</p>


<h4>Multiple filesets</h4> <h4>Multiple filesets</h4>
<blockquote><pre> &lt;jar destfile=&quot;${dist}/lib/app.jar&quot;&gt;
<pre> &lt;jar destfile=&quot;${dist}/lib/app.jar&quot;&gt;
&lt;fileset dir=&quot;${build}/classes&quot; &lt;fileset dir=&quot;${build}/classes&quot;
excludes=&quot;**/Test.class&quot;/&gt; excludes=&quot;**/Test.class&quot;/&gt;
&lt;fileset dir=&quot;${src}/resources&quot;/&gt; &lt;fileset dir=&quot;${src}/resources&quot;/&gt;
&lt;/jar&gt;</pre></blockquote>
&lt;/jar&gt;</pre>
<p>jars all files in the <code>${build}/classes</code> directory and also <p>jars all files in the <code>${build}/classes</code> directory and also
in the <code>${src}/resources</code> directory together into a file in the <code>${src}/resources</code> directory together into a file
called <code>app.jar</code> in the <code>${dist}/lib</code> directory. called <code>app.jar</code> in the <code>${dist}/lib</code> directory.
@@ -484,20 +483,20 @@ by Java).</p>


<h4>Merging archives</h4> <h4>Merging archives</h4>


<blockquote><pre> &lt;jar destfile="build/main/checksites.jar"&gt;
<pre> &lt;jar destfile="build/main/checksites.jar"&gt;
&lt;fileset dir="build/main/classes"/&gt; &lt;fileset dir="build/main/classes"/&gt;
&lt;zipfileset includes="**/*.class" src="lib/main/some.jar"/&gt; &lt;zipfileset includes="**/*.class" src="lib/main/some.jar"/&gt;
&lt;manifest&gt; &lt;manifest&gt;
&lt;attribute name="Main-Class" &lt;attribute name="Main-Class"
value="com.acme.checksites.Main"/&gt; value="com.acme.checksites.Main"/&gt;
&lt;/manifest&gt; &lt;/manifest&gt;
&lt;/jar&gt;</pre></blockquote>
&lt;/jar&gt;</pre>
<p> <p>
Creates an executable jar file with a main class "com.acme.checksites.Main", and Creates an executable jar file with a main class "com.acme.checksites.Main", and
embeds all the classes from the jar <code>lib/main/some.jar</code>. embeds all the classes from the jar <code>lib/main/some.jar</code>.
</p> </p>


<blockquote><pre> &lt;jar destfile="build/main/checksites.jar"&gt;
<pre> &lt;jar destfile="build/main/checksites.jar"&gt;
&lt;fileset dir="build/main/classes"/&gt; &lt;fileset dir="build/main/classes"/&gt;
&lt;restrict&gt; &lt;restrict&gt;
&lt;name name="**/*.class"/&gt; &lt;name name="**/*.class"/&gt;
@@ -511,14 +510,14 @@ by Java).</p>
&lt;attribute name="Main-Class" &lt;attribute name="Main-Class"
value="com.acme.checksites.Main"/&gt; value="com.acme.checksites.Main"/&gt;
&lt;/manifest&gt; &lt;/manifest&gt;
&lt;/jar&gt;</pre></blockquote>
&lt;/jar&gt;</pre>
<p> <p>
Creates an executable jar file with a main class "com.acme.checksites.Main", and Creates an executable jar file with a main class "com.acme.checksites.Main", and
embeds all the classes from all the jars in <code>lib/main</code>. embeds all the classes from all the jars in <code>lib/main</code>.
</p> </p>


<h4>Inline manifest</h4> <h4>Inline manifest</h4>
<blockquote><pre> &lt;jar destfile=&quot;test.jar&quot; basedir=&quot;.&quot;&gt;
<pre> &lt;jar destfile=&quot;test.jar&quot; basedir=&quot;.&quot;&gt;
&lt;include name=&quot;build&quot;/&gt; &lt;include name=&quot;build&quot;/&gt;
&lt;manifest&gt; &lt;manifest&gt;
&lt;!-- If this is an Applet or Web Start application, include &lt;!-- If this is an Applet or Web Start application, include
@@ -536,14 +535,14 @@ by Java).</p>
&lt;attribute name=&quot;Sealed&quot; value=&quot;false&quot;/&gt; &lt;attribute name=&quot;Sealed&quot; value=&quot;false&quot;/&gt;
&lt;/section&gt; &lt;/section&gt;
&lt;/manifest&gt; &lt;/manifest&gt;
&lt;/jar&gt;</pre></blockquote>
&lt;/jar&gt;</pre>
<p> <p>
This is an example of an inline manifest specification including the version of the build This is an example of an inline manifest specification including the version of the build
program (Implementation-Version). Note that the Built-By attribute will take the value of the Ant program (Implementation-Version). Note that the Built-By attribute will take the value of the Ant
property ${user.name}. The manifest produced by the above would look like this: property ${user.name}. The manifest produced by the above would look like this:
</p> </p>


<blockquote><pre>Manifest-Version: 1.0
<pre>Manifest-Version: 1.0
Permissions: sandbox Permissions: sandbox
Codebase: example.com Codebase: example.com
Built-By: conor Built-By: conor
@@ -553,7 +552,7 @@ Implementation-Version: 1.0.0beta2
Created-By: Apache Ant 1.9.2 Created-By: Apache Ant 1.9.2


Name: common/MyClass.class Name: common/MyClass.class
Sealed: false</pre></blockquote>
Sealed: false</pre>


<h4>Service Provider</h4> <h4>Service Provider</h4>


@@ -561,20 +560,18 @@ Sealed: false</pre></blockquote>
The following shows how to create a jar file specifying a service The following shows how to create a jar file specifying a service
with an implementation of the JDK 6 scripting interface: with an implementation of the JDK 6 scripting interface:
</p> </p>
<blockquote><pre>&lt;jar destfile="pinky.jar"&gt;
<pre>&lt;jar destfile="pinky.jar"&gt;
&lt;fileset dir="build/classes"/&gt; &lt;fileset dir="build/classes"/&gt;
&lt;service type="javax.script.ScriptEngineFactory" &lt;service type="javax.script.ScriptEngineFactory"
provider="org.acme.PinkyLanguage"/&gt; provider="org.acme.PinkyLanguage"/&gt;
&lt;/jar&gt; &lt;/jar&gt;
</pre></blockquote>


</pre>


<p> <p>
The following shows how to create a jar file specifying a service The following shows how to create a jar file specifying a service
with two implementations of the JDK 6 scripting interface: with two implementations of the JDK 6 scripting interface:
</p> </p>
<blockquote><pre>
<pre>
&lt;jar destfile="pinkyandbrain.jar"&gt; &lt;jar destfile="pinkyandbrain.jar"&gt;
&lt;fileset dir="classes"/&gt; &lt;fileset dir="classes"/&gt;
&lt;service type="javax.script.ScriptEngineFactory"&gt; &lt;service type="javax.script.ScriptEngineFactory"&gt;
@@ -582,8 +579,7 @@ Sealed: false</pre></blockquote>
&lt;provider classname="org.acme.BrainLanguage"/&gt; &lt;provider classname="org.acme.BrainLanguage"/&gt;
&lt;/service&gt; &lt;/service&gt;
&lt;/jar&gt; &lt;/jar&gt;
</pre></blockquote>

</pre>


<h4 id="jep238-example">JEP 238 example: a Multi-Release JAR Files</h4> <h4 id="jep238-example">JEP 238 example: a Multi-Release JAR Files</h4>
<p> <p>
@@ -601,7 +597,7 @@ Sealed: false</pre></blockquote>
<code>${java.classes}</code> and the Java 9 classes are compiled into <code>${java.classes}</code> and the Java 9 classes are compiled into
<code>${java9.classes}</code>. <code>${java9.classes}</code>.
</p> </p>
<blockquote><pre>
<pre>
&lt;jar destfile=&quot;mrjar.jar&quot;&gt; &lt;jar destfile=&quot;mrjar.jar&quot;&gt;
&lt;manifest&gt; &lt;manifest&gt;
&lt;!-- special mf-entry according to the spec --&gt; &lt;!-- special mf-entry according to the spec --&gt;
@@ -613,7 +609,7 @@ Sealed: false</pre></blockquote>
&lt;!-- ... per release classes, require Java 9+ for loadable via standard ClassLoader --&gt; &lt;!-- ... per release classes, require Java 9+ for loadable via standard ClassLoader --&gt;
&lt;zipfileset prefix=&quot;META-INF/versions/9/&quot; dir=&quot;${java9.classes}&quot;/&gt; &lt;zipfileset prefix=&quot;META-INF/versions/9/&quot; dir=&quot;${java9.classes}&quot;/&gt;
&lt;/jar&gt; &lt;/jar&gt;
</pre></blockquote>
</pre>


</body> </body>
</html> </html>

+ 2
- 2
manual/Tasks/javac.html View File

@@ -914,7 +914,7 @@ while all others are <code>false</code>.</p>
to be given to the runtime system of the javac executable, so it needs to be given to the runtime system of the javac executable, so it needs
to be prepended with a "-J". For example: to be prepended with a "-J". For example:


<blockquote><pre>
<pre>
&lt;property name="patched.javac.jar" &lt;property name="patched.javac.jar"
location="${my.patched.compiler}/dist/lib/javac.jar"/&gt; location="${my.patched.compiler}/dist/lib/javac.jar"/&gt;


@@ -927,7 +927,7 @@ while all others are <code>false</code>.</p>


&lt;patched.javac srcdir="src/java" destdir="build/classes" &lt;patched.javac srcdir="src/java" destdir="build/classes"
debug="yes"/&gt; debug="yes"/&gt;
</pre></blockquote>
</pre>


<h3>Note on package-info.java</h3> <h3>Note on package-info.java</h3>
<p> <p>


+ 2
- 2
manual/Tasks/javacc.html View File

@@ -189,13 +189,13 @@
</tr> </tr>
</table> </table>
<h3>Example</h3> <h3>Example</h3>
<blockquote><pre>
<pre>
&lt;javacc &lt;javacc
target=&quot;src/Parser.jj&quot; target=&quot;src/Parser.jj&quot;
outputdirectory=&quot;build/src&quot; outputdirectory=&quot;build/src&quot;
javacchome=&quot;c:/program files/JavaCC&quot; javacchome=&quot;c:/program files/JavaCC&quot;
static=&quot;true&quot;/&gt; static=&quot;true&quot;/&gt;
</pre></blockquote>
</pre>
<p> <p>
This invokes JavaCC on grammar file src/Parser.jj, writing the generated This invokes JavaCC on grammar file src/Parser.jj, writing the generated
files to build/src. The grammar option STATIC is set to true when files to build/src. The grammar option STATIC is set to true when


+ 1
- 6
manual/Tasks/jdepend.html View File

@@ -117,7 +117,6 @@ to ignore (requires JDepend 2.5 or above).</p>


<h3>Examples</h3> <h3>Examples</h3>


<blockquote>
<pre> <pre>
&lt;jdepend classpathref="base.path"&gt; &lt;jdepend classpathref="base.path"&gt;
&lt;classespath&gt; &lt;classespath&gt;
@@ -125,13 +124,12 @@ to ignore (requires JDepend 2.5 or above).</p>
&lt;/classespath&gt; &lt;/classespath&gt;
&lt;/jdepend&gt; &lt;/jdepend&gt;
</pre> </pre>
</blockquote>


<p>This invokes JDepend on the <code>build</code> directory, writing <p>This invokes JDepend on the <code>build</code> directory, writing
the output on the standard output. The classpath is defined using a the output on the standard output. The classpath is defined using a
classpath reference.</p> classpath reference.</p>


<blockquote>
<pre> <pre>
&lt;jdepend outputfile="docs/jdepend.xml" fork="yes" format="xml"&gt; &lt;jdepend outputfile="docs/jdepend.xml" fork="yes" format="xml"&gt;
&lt;sourcespath&gt; &lt;sourcespath&gt;
@@ -143,14 +141,12 @@ classpath reference.</p>
&lt;/classpath&gt; &lt;/classpath&gt;
&lt;/jdepend&gt; &lt;/jdepend&gt;
</pre> </pre>
</blockquote>


<p>This invokes JDepend in a separate VM on the <code>src</code> and <p>This invokes JDepend in a separate VM on the <code>src</code> and
<code>testsrc</code> directories, writing the output to the <code>testsrc</code> directories, writing the output to the
<code>&lt;docs/jdepend.xml&gt;</code> file in xml format. The <code>&lt;docs/jdepend.xml&gt;</code> file in xml format. The
classpath is defined using nested elements.</p> classpath is defined using nested elements.</p>


<blockquote>
<pre> <pre>
&lt;jdepend classpathref="base.path"&gt; &lt;jdepend classpathref="base.path"&gt;
&lt;exclude name="java.*&gt; &lt;exclude name="java.*&gt;
@@ -160,7 +156,6 @@ classpath is defined using nested elements.</p>
&lt;/classespath&gt; &lt;/classespath&gt;
&lt;/jdepend&gt; &lt;/jdepend&gt;
</pre> </pre>
</blockquote>


<p>This invokes JDepend with the build directory as the base for class <p>This invokes JDepend with the build directory as the base for class
files to analyze, and will ignore all classes in the java.* and files to analyze, and will ignore all classes in the java.* and


+ 22
- 38
manual/Tasks/jjdoc.html View File

@@ -44,56 +44,42 @@ generated BNF documentation file.</p>


<table> <table>
<tr> <tr>
<td valign="top"><b>Attribute</b></td>

<td valign="top"><b>Description</b></td>

<td align="center" valign="top"><b>Required</b></td>
<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>


<tr> <tr>
<td valign="top">target</td>

<td valign="top">The javacc grammar file to process.</td>

<td align="center" valign="top">Yes</td>
<td valign="top">target</td>
<td valign="top">The javacc grammar file to process.</td>
<td align="center" valign="top">Yes</td>
</tr> </tr>


<tr> <tr>
<td valign="top">javacchome</td>

<td valign="top">The directory containing the JavaCC distribution.</td>

<td align="center" valign="top">Yes</td>
<td valign="top">javacchome</td>
<td valign="top">The directory containing the JavaCC distribution.</td>
<td align="center" valign="top">Yes</td>
</tr> </tr>


<tr> <tr>
<td valign="top">outputfile</td>

<td valign="top">The file to write the generated BNF documentation file to. If not set,
the file is written with the same name as the JavaCC grammar file but with a the suffix .html or .txt</td>

<td align="center" valign="top">No</td>
<td valign="top">outputfile</td>
<td valign="top">The file to write the generated BNF documentation file to. If not set,
the file is written with the same name as the JavaCC grammar file but with a the suffix .html or .txt</td>
<td align="center" valign="top">No</td>
</tr> </tr>


<tr> <tr>
<td valign="top">text</td>

<td valign="top">Sets the TEXT BNF documentation option. This is a boolean
option.</td>

<td align="center" valign="top">No</td>
<td valign="top">text</td>
<td valign="top">Sets the TEXT BNF documentation option. This is a boolean option.</td>
<td align="center" valign="top">No</td>
</tr> </tr>


<tr> <tr>
<td valign="top">onetable</td>

<td valign="top">Sets the ONE_TABLE BNF documentation option. This is a boolean option.</td>

<td align="center" valign="top">No</td>
<td valign="top">onetable</td>
<td valign="top">Sets the ONE_TABLE BNF documentation option. This is a boolean option.</td>
<td align="center" valign="top">No</td>
</tr> </tr>

<tr>
<tr>
<td valign="top">maxmemory</td> <td valign="top">maxmemory</td>
<td valign="top">Max amount of memory to allocate to the forked <td valign="top">Max amount of memory to allocate to the forked
VM. <em>since Ant 1.8.3</em></td> VM. <em>since Ant 1.8.3</em></td>
@@ -101,15 +87,13 @@ option.</td>
</tr> </tr>
</table> </table>


<h3>
Example</h3>
<h3>Example</h3>


<blockquote>
<pre>&lt;jjdoc <pre>&lt;jjdoc
target="src/Parser.jj" target="src/Parser.jj"
outputfile="doc/ParserBNF.html" outputfile="doc/ParserBNF.html"
javacchome="c:/program files/JavaCC"/&gt;</pre> javacchome="c:/program files/JavaCC"/&gt;</pre>
</blockquote>
This invokes JJDoc on grammar file src/Parser.jj, writing the generated This invokes JJDoc on grammar file src/Parser.jj, writing the generated
BNF documentation file, ParserBNF.html, file to doc. BNF documentation file, ParserBNF.html, file to doc.




+ 0
- 3
manual/Tasks/jjtree.html View File

@@ -194,17 +194,14 @@ option.</td>


<h3>Example</h3> <h3>Example</h3>


<blockquote>
<pre>&lt;jjtree <pre>&lt;jjtree
target="src/Parser.jjt" target="src/Parser.jjt"
outputdirectory="build/src" outputdirectory="build/src"
javacchome="c:/program files/JavaCC" javacchome="c:/program files/JavaCC"
nodeusesparser="true"/&gt;</pre> nodeusesparser="true"/&gt;</pre>
</blockquote>
This invokes JJTree on grammar file src/Parser.jjt, writing the generated This invokes JJTree on grammar file src/Parser.jjt, writing the generated
grammar file, Parser.jj, file to build/src. The grammar option NODE_USES_PARSER grammar file, Parser.jj, file to build/src. The grammar option NODE_USES_PARSER
is set to true when invoking JJTree. is set to true when invoking JJTree.
<br>


<h3>Comparison output locations between command line JJTree and different Ant taskdef versions</h3> <h3>Comparison output locations between command line JJTree and different Ant taskdef versions</h3>




+ 7
- 10
manual/Tasks/junitreport.html View File

@@ -181,20 +181,18 @@ a nested &lt;factory&gt; can be used to specify factory settings.</p>




<h3>Example of report</h3> <h3>Example of report</h3>
<blockquote>
<pre>&lt;junitreport todir=&quot;./reports&quot;&gt;
<pre>&lt;junitreport todir=&quot;./reports&quot;&gt;
&lt;fileset dir=&quot;./reports&quot;&gt; &lt;fileset dir=&quot;./reports&quot;&gt;
&lt;include name=&quot;TEST-*.xml&quot;/&gt; &lt;include name=&quot;TEST-*.xml&quot;/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
&lt;report format=&quot;frames&quot; todir=&quot;./report/html&quot;/&gt; &lt;report format=&quot;frames&quot; todir=&quot;./report/html&quot;/&gt;
&lt;/junitreport&gt;
</pre>
</blockquote>
&lt;/junitreport&gt;</pre>

<p>would generate a <tt>TESTS-TestSuites.xml</tt> file in the directory <tt>reports</tt> and <p>would generate a <tt>TESTS-TestSuites.xml</tt> file in the directory <tt>reports</tt> and
generate the default framed report in the directory <tt>report/html</tt>.</p> generate the default framed report in the directory <tt>report/html</tt>.</p>

<h3>Example of report with xsl params</h3> <h3>Example of report with xsl params</h3>
<blockquote>
<pre>
<pre>
&lt;junitreport todir="${outputdir}"&gt; &lt;junitreport todir="${outputdir}"&gt;
&lt;fileset dir="${jrdir}"&gt; &lt;fileset dir="${jrdir}"&gt;
&lt;include name="TEST-*.xml"/&gt; &lt;include name="TEST-*.xml"/&gt;
@@ -205,9 +203,8 @@ generate the default framed report in the directory <tt>report/html</tt>.</p>
&lt;param name="key1" expression="value1"/&gt; &lt;param name="key1" expression="value1"/&gt;
&lt;param name="key2" expression="value2"/&gt; &lt;param name="key2" expression="value2"/&gt;
&lt;/report&gt; &lt;/report&gt;
&lt;/junitreport&gt;
</pre>
</blockquote>
&lt;/junitreport&gt;</pre>

<p>This example requires a file called <tt>junitreport/junit-frames.xsl</tt>. <p>This example requires a file called <tt>junitreport/junit-frames.xsl</tt>.
The XSL parameters key1 and key2 will be passed to the XSL transformation.</p> The XSL parameters key1 and key2 will be passed to the XSL transformation.</p>




+ 0
- 14
manual/Tasks/macrodef.html View File

@@ -243,7 +243,6 @@
The following example defined a task called testing and The following example defined a task called testing and
runs it. runs it.
</p> </p>
<blockquote>
<pre class=code> <pre class=code>
&lt;macrodef name="testing"&gt; &lt;macrodef name="testing"&gt;
&lt;attribute name="v" default="NOT SET"/&gt; &lt;attribute name="v" default="NOT SET"/&gt;
@@ -260,7 +259,6 @@
&lt;/some-tasks&gt; &lt;/some-tasks&gt;
&lt;/testing&gt; &lt;/testing&gt;
</pre> </pre>
</blockquote>
<p> <p>
The following fragment defines a task called <code>&lt;call-cc&gt;</code> which The following fragment defines a task called <code>&lt;call-cc&gt;</code> which
take the attributes "target", "link" and "target.dir" and the take the attributes "target", "link" and "target.dir" and the
@@ -268,7 +266,6 @@
uses the <code>&lt;cc&gt;</code> task from the uses the <code>&lt;cc&gt;</code> task from the
<a href="http://ant-contrib.sourceforge.net/">ant-contrib</a> project. <a href="http://ant-contrib.sourceforge.net/">ant-contrib</a> project.
</p> </p>
<blockquote>
<pre class="code"> <pre class="code">
&lt;macrodef name="call-cc"&gt; &lt;macrodef name="call-cc"&gt;
&lt;attribute name="target"/&gt; &lt;attribute name="target"/&gt;
@@ -286,11 +283,9 @@
&lt;/sequential&gt; &lt;/sequential&gt;
&lt;/macrodef&gt; &lt;/macrodef&gt;
</pre> </pre>
</blockquote>
<p> <p>
This then can be used as follows: This then can be used as follows:
</p> </p>
<blockquote>
<pre class="code"> <pre class="code">
&lt;call-cc target="unittests" link="executable" &lt;call-cc target="unittests" link="executable"
target.dir="${build.bin.dir}"&gt; target.dir="${build.bin.dir}"&gt;
@@ -303,13 +298,11 @@
&lt;/cc-elements&gt; &lt;/cc-elements&gt;
&lt;/call-cc&gt; &lt;/call-cc&gt;
</pre> </pre>
</blockquote>
<p> <p>
The following fragment shows &lt;call-cc&gt;, but this time The following fragment shows &lt;call-cc&gt;, but this time
using an implicit element and with the link and target.dir arguments using an implicit element and with the link and target.dir arguments
having default values. having default values.
</p> </p>
<blockquote>
<pre class="code"> <pre class="code">
&lt;macrodef name="call-cc"&gt; &lt;macrodef name="call-cc"&gt;
&lt;attribute name="target"/&gt; &lt;attribute name="target"/&gt;
@@ -327,12 +320,10 @@
&lt;/sequential&gt; &lt;/sequential&gt;
&lt;/macrodef&gt; &lt;/macrodef&gt;
</pre> </pre>
</blockquote>
<p> <p>
This then can be used as follows, note that &lt;cc-elements&gt; This then can be used as follows, note that &lt;cc-elements&gt;
is not specified. is not specified.
</p> </p>
<blockquote>
<pre class="code"> <pre class="code">
&lt;call-cc target="unittests"&gt; &lt;call-cc target="unittests"&gt;
&lt;includepath location="${gen.dir}"/&gt; &lt;includepath location="${gen.dir}"/&gt;
@@ -342,11 +333,9 @@
&lt;linker refid="linker-libs"/&gt; &lt;linker refid="linker-libs"/&gt;
&lt;/call-cc&gt; &lt;/call-cc&gt;
</pre> </pre>
</blockquote>
<p> <p>
The following shows the use of the <code>text</code> element. The following shows the use of the <code>text</code> element.
</p> </p>
<blockquote>
<pre class="code"> <pre class="code">
&lt;macrodef name="echotest"&gt; &lt;macrodef name="echotest"&gt;
&lt;text name="text"/&gt; &lt;text name="text"/&gt;
@@ -358,7 +347,6 @@
Hello world Hello world
&lt;/echotest&gt; &lt;/echotest&gt;
</pre> </pre>
</blockquote>
<p> <p>
The following uses a prior defined attribute for setting the The following uses a prior defined attribute for setting the
default value of another. The output would be default value of another. The output would be
@@ -367,7 +355,6 @@
because while processing the <i>two</i>-line the value for because while processing the <i>two</i>-line the value for
<i>one</i> is not set. <i>one</i> is not set.
</p> </p>
<blockquote>
<pre class="code"> <pre class="code">
&lt;macrodef name="test"&gt; &lt;macrodef name="test"&gt;
&lt;attribute name="one"/&gt; <b>*1</b> &lt;attribute name="one"/&gt; <b>*1</b>
@@ -378,7 +365,6 @@
&lt;/macrodef&gt; &lt;/macrodef&gt;
&lt;test one="test"/&gt; &lt;test one="test"/&gt;
</pre> </pre>
</blockquote>


</body> </body>
</html> </html>

+ 6
- 6
manual/Tasks/mail.html View File

@@ -309,18 +309,18 @@ the <code>&lt;message&gt;</code> element.</p>


<h3>Examples</h3> <h3>Examples</h3>


<blockquote><pre>
<pre>
&lt;mail from=&quot;me&quot; &lt;mail from=&quot;me&quot;
tolist=&quot;you&quot; tolist=&quot;you&quot;
subject=&quot;Results of nightly build&quot; subject=&quot;Results of nightly build&quot;
files=&quot;build.log&quot;/&gt; files=&quot;build.log&quot;/&gt;
</pre></blockquote>
</pre>


<p>Sends an email from <i>me</i> to <i>you</i> with a subject of <p>Sends an email from <i>me</i> to <i>you</i> with a subject of
<i>Results of nightly build</i> and includes the contents of the file <i>Results of nightly build</i> and includes the contents of the file
<i>build.log</i> in the body of the message.</p> <i>build.log</i> in the body of the message.</p>


<blockquote><pre>
<pre>
&lt;mail mailhost=&quot;smtp.myisp.com&quot; mailport=&quot;1025&quot; subject=&quot;Test build&quot;&gt; &lt;mail mailhost=&quot;smtp.myisp.com&quot; mailport=&quot;1025&quot; subject=&quot;Test build&quot;&gt;
&lt;from address=&quot;config@myisp.com&quot;/&gt; &lt;from address=&quot;config@myisp.com&quot;/&gt;
&lt;replyto address=&quot;me@myisp.com&quot;/&gt; &lt;replyto address=&quot;me@myisp.com&quot;/&gt;
@@ -332,7 +332,7 @@ the <code>&lt;message&gt;</code> element.</p>
&lt;/fileset&gt; &lt;/fileset&gt;
&lt;/attachments&gt; &lt;/attachments&gt;
&lt;/mail&gt; &lt;/mail&gt;
</pre></blockquote>
</pre>


<p>Sends an eMail from <i>config@myisp.com</i> to <i>all@xyz.com</i> with a subject of <p>Sends an eMail from <i>config@myisp.com</i> to <i>all@xyz.com</i> with a subject of
<i>Test Build</i>. Replies to this email will go to <i>me@myisp.com</i>. <i>Test Build</i>. Replies to this email will go to <i>me@myisp.com</i>.
@@ -341,7 +341,7 @@ task will attempt to use JavaMail and fall back to UU encoding or no encoding in
that order depending on what support classes are available. <code>${buildname}</code> that order depending on what support classes are available. <code>${buildname}</code>
will be replaced with the <code>buildname</code> property's value.</p> will be replaced with the <code>buildname</code> property's value.</p>


<blockquote><pre>
<pre>
&lt;property name=&quot;line2&quot; value=&quot;some_international_message&quot;/&gt; &lt;property name=&quot;line2&quot; value=&quot;some_international_message&quot;/&gt;
&lt;echo message=&quot;${line2}&quot;/&gt; &lt;echo message=&quot;${line2}&quot;/&gt;


@@ -350,7 +350,7 @@ will be replaced with the <code>buildname</code> property's value.</p>
&lt;to address=&quot;all@xyz.com&quot;/&gt; &lt;to address=&quot;all@xyz.com&quot;/&gt;
&lt;message&gt;some international text:${line2}&lt;/message&gt; &lt;message&gt;some international text:${line2}&lt;/message&gt;
&lt;/mail&gt; &lt;/mail&gt;
</pre></blockquote>
</pre>


<p>Sends an eMail from <i>me@myisp.com</i> to <i>all@xyz.com</i> with a subject of <p>Sends an eMail from <i>me@myisp.com</i> to <i>all@xyz.com</i> with a subject of
<i>Test Build</i>, the message body being coded in UTF-8 <i>Test Build</i>, the message body being coded in UTF-8


+ 2
- 4
manual/Tasks/manifestclasspath.html View File

@@ -96,20 +96,18 @@ defined in-place, or refer to a path defined elsewhere using the
This classpath must not be empty, and is required.</p> This classpath must not be empty, and is required.</p>


<h3>Examples</h3> <h3>Examples</h3>
<div id="example1">
<blockquote><pre>
<pre>
&lt;manifestclasspath property="jar.classpath" &lt;manifestclasspath property="jar.classpath"
jarfile="build/acme.jar"&gt; jarfile="build/acme.jar"&gt;
&lt;classpath refid="classpath" /&gt; &lt;classpath refid="classpath" /&gt;
&lt;/manifestclasspath&gt; &lt;/manifestclasspath&gt;
</pre></blockquote>
</pre>
<p>Assuming a path of id "classpath" was already defined, convert this <p>Assuming a path of id "classpath" was already defined, convert this
path relatively to the build/ directory that will contain acme.jar, which path relatively to the build/ directory that will contain acme.jar, which
can later be created with <code>&lt;jar&gt;</code> with a nested can later be created with <code>&lt;jar&gt;</code> with a nested
<code>&lt;manifest&gt;</code> element that lists an <code>&lt;manifest&gt;</code> element that lists an
<code>&lt;attribute name="Class-Path" value="${jar.classpath}"/&gt;</code>. <code>&lt;attribute name="Class-Path" value="${jar.classpath}"/&gt;</code>.
</p> </p>
</div>


</body> </body>
</html> </html>

+ 3
- 5
manual/Tasks/netrexxc.html View File

@@ -324,16 +324,14 @@ for more information.</p>
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<p><code>&lt;netrexxc srcDir=&quot;/source/project&quot;
<pre>&lt;netrexxc srcDir=&quot;/source/project&quot;
includes=&quot;vnr/util/*&quot; includes=&quot;vnr/util/*&quot;
destDir=&quot;/source/project/build&quot; destDir=&quot;/source/project/build&quot;
classpath=&quot;/source/project2/proj.jar&quot; classpath=&quot;/source/project2/proj.jar&quot;
comments=&quot;true&quot; comments=&quot;true&quot;
crossref=&quot;false&quot; replace=&quot;true&quot; crossref=&quot;false&quot; replace=&quot;true&quot;
keep=&quot;true&quot;/&gt;</code>
</p>
</blockquote>
keep=&quot;true&quot;/&gt;</pre>


</body> </body>
</html> </html>

+ 8
- 8
manual/Tasks/pack.html View File

@@ -63,20 +63,20 @@ resource collection</h4>
<p>The specified resource will be used as src. <em>Since Apache Ant 1.7</em></p> <p>The specified resource will be used as src. <em>Since Apache Ant 1.7</em></p>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;gzip src=&quot;test.tar&quot; destfile=&quot;test.tar.gz&quot;/&gt; &lt;gzip src=&quot;test.tar&quot; destfile=&quot;test.tar.gz&quot;/&gt;
</pre></blockquote>
<blockquote><pre>
</pre>
<pre>
&lt;bzip2 src=&quot;test.tar&quot; destfile=&quot;test.tar.bz2&quot;/&gt; &lt;bzip2 src=&quot;test.tar&quot; destfile=&quot;test.tar.bz2&quot;/&gt;
</pre></blockquote>
<blockquote><pre>
</pre>
<pre>
&lt;xz src=&quot;test.tar&quot; destfile=&quot;test.tar.xz&quot;/&gt; &lt;xz src=&quot;test.tar&quot; destfile=&quot;test.tar.xz&quot;/&gt;
</pre></blockquote>
<blockquote><pre>
</pre>
<pre>
&lt;gzip destfile=&quot;archive.tar.gz&quot;&gt; &lt;gzip destfile=&quot;archive.tar.gz&quot;&gt;
&lt;url url="http://example.org/archive.tar"/&gt; &lt;url url="http://example.org/archive.tar"/&gt;
&lt;/gzip&gt; &lt;/gzip&gt;
</pre></blockquote>
</pre>
<p>downloads <i>http://example.org/archive.tar</i> and compresses it <p>downloads <i>http://example.org/archive.tar</i> and compresses it
to <i>archive.tar.gz</i> in the project's basedir on the fly.</p> to <i>archive.tar.gz</i> in the project's basedir on the fly.</p>




+ 2
- 16
manual/Tasks/presetdef.html View File

@@ -71,7 +71,6 @@
srcdir and destdir srcdir and destdir
attributes set. It also has a src element to source files from a generated attributes set. It also has a src element to source files from a generated
directory. directory.
<blockquote>
<pre class="code"> <pre class="code">
&lt;presetdef name="my.javac"&gt; &lt;presetdef name="my.javac"&gt;
&lt;javac debug="${debug}" deprecation="${deprecation}" &lt;javac debug="${debug}" deprecation="${deprecation}"
@@ -80,24 +79,18 @@
&lt;/javac&gt; &lt;/javac&gt;
&lt;/presetdef&gt; &lt;/presetdef&gt;
</pre> </pre>
</blockquote>
This can be used as a normal javac task - example: This can be used as a normal javac task - example:
<blockquote>
<pre class="code"> <pre class="code">
&lt;my.javac/&gt; &lt;my.javac/&gt;
</pre> </pre>
</blockquote>
The attributes specified in the preset task may be overridden - i.e. The attributes specified in the preset task may be overridden - i.e.
they may be seen as optional attributes - example: they may be seen as optional attributes - example:
<blockquote>
<pre class="code"> <pre class="code">
&lt;my.javac srcdir="${test.src}" deprecation="no"/&gt; &lt;my.javac srcdir="${test.src}" deprecation="no"/&gt;
</pre> </pre>
</blockquote>
One may put a presetdef definition in an antlib. One may put a presetdef definition in an antlib.
For example suppose the jar file antgoodies.jar has For example suppose the jar file antgoodies.jar has
the antlib.xml as follows: the antlib.xml as follows:
<blockquote>
<pre class="code"> <pre class="code">
&lt;antlib&gt; &lt;antlib&gt;
&lt;taskdef resource="com/acme/antgoodies/tasks.properties"/&gt; &lt;taskdef resource="com/acme/antgoodies/tasks.properties"/&gt;
@@ -108,9 +101,7 @@
&lt;/presetdef&gt; &lt;/presetdef&gt;
&lt;/antlib&gt; &lt;/antlib&gt;
</pre> </pre>
</blockquote>
One may then use this in a build file as follows: One may then use this in a build file as follows:
<blockquote>
<pre class="code"> <pre class="code">
&lt;project default="example" xmlns:antgoodies="antlib:com.acme.antgoodies"&gt; &lt;project default="example" xmlns:antgoodies="antlib:com.acme.antgoodies"&gt;
&lt;target name="example"&gt; &lt;target name="example"&gt;
@@ -121,12 +112,10 @@
&lt;/target&gt; &lt;/target&gt;
&lt;/project&gt; &lt;/project&gt;
</pre> </pre>
</blockquote>
<p> <p>
The following is an example of evaluation of properties when the The following is an example of evaluation of properties when the
definition is used: definition is used:
</p> </p>
<blockquote>
<pre class="code"> <pre class="code">
&lt;target name="defineandcall"&gt; &lt;target name="defineandcall"&gt;
&lt;presetdef name="showmessage"&gt; &lt;presetdef name="showmessage"&gt;
@@ -143,11 +132,9 @@
&lt;showmessage/&gt; &lt;showmessage/&gt;
&lt;/target&gt; &lt;/target&gt;
</pre> </pre>
</blockquote>
<p> <p>
The command ant defineandcall results in the output: The command ant defineandcall results in the output:
</p> </p>
<blockquote>
<pre class="code"> <pre class="code">
defineandcall: defineandcall:
[showmessage] message is '${message}' [showmessage] message is '${message}'
@@ -156,14 +143,13 @@ defineandcall:
called: called:
[showmessage] message is 'Message 2' [showmessage] message is 'Message 2'
</pre> </pre>
</blockquote>
<p> <p>
It is possible to use a trick to evaluate properties when the definition is It is possible to use a trick to evaluate properties when the definition is
<em>made</em> rather than used. This can be useful if you do not expect some <em>made</em> rather than used. This can be useful if you do not expect some
properties to be available in child builds run with properties to be available in child builds run with
<code>&lt;ant ... inheritall="false"&gt;</code>: <code>&lt;ant ... inheritall="false"&gt;</code>:
</p> </p>
<blockquote><pre class="code">
<pre class="code">
&lt;macrodef name="showmessage-presetdef"&gt; &lt;macrodef name="showmessage-presetdef"&gt;
&lt;attribute name="messageval"/&gt; &lt;attribute name="messageval"/&gt;
&lt;presetdef name="showmessage"&gt; &lt;presetdef name="showmessage"&gt;
@@ -171,7 +157,7 @@ properties to be available in child builds run with
&lt;/presetdef&gt; &lt;/presetdef&gt;
&lt;/macrodef&gt; &lt;/macrodef&gt;
&lt;showmessage-presetdef messageval="${message}"/&gt; &lt;showmessage-presetdef messageval="${message}"/&gt;
</pre></blockquote>
</pre>


</body> </body>
</html> </html>

+ 8
- 8
manual/Tasks/propertyfile.html View File

@@ -191,7 +191,7 @@ The slashes conform to the expectations of the Properties class. The file will
The layout and comment of the original file is preserved. New properties are added at the end of the file. Existing properties are overwritten in place. The layout and comment of the original file is preserved. New properties are added at the end of the file. Existing properties are overwritten in place.
</p> </p>


<blockquote><pre>&lt;propertyfile
<pre>&lt;propertyfile
file=&quot;my.properties&quot; file=&quot;my.properties&quot;
comment=&quot;My properties&quot;&gt; comment=&quot;My properties&quot;&gt;
&lt;entry key=&quot;akey&quot; value=&quot;avalue&quot;/&gt; &lt;entry key=&quot;akey&quot; value=&quot;avalue&quot;/&gt;
@@ -200,10 +200,10 @@ The layout and comment of the original file is preserved. New properties are add
&lt;entry key=&quot;formated.int&quot; type=&quot;int&quot; default=&quot;0013&quot; operation=&quot;+&quot; pattern=&quot;0000&quot;/&gt; &lt;entry key=&quot;formated.int&quot; type=&quot;int&quot; default=&quot;0013&quot; operation=&quot;+&quot; pattern=&quot;0000&quot;/&gt;
&lt;entry key=&quot;formated.date&quot; type=&quot;date&quot; value=&quot;now&quot; pattern=&quot;DDD HH:mm&quot;/&gt; &lt;entry key=&quot;formated.date&quot; type=&quot;date&quot; value=&quot;now&quot; pattern=&quot;DDD HH:mm&quot;/&gt;
&lt;/propertyfile&gt; &lt;/propertyfile&gt;
</pre></blockquote>
</pre>
<p> <p>
To produce dates relative from today :</p> To produce dates relative from today :</p>
<blockquote><pre>&lt;propertyfile
<pre>&lt;propertyfile
file=&quot;my.properties&quot; file=&quot;my.properties&quot;
comment=&quot;My properties&quot;&gt; comment=&quot;My properties&quot;&gt;
&lt;entry key=&quot;formated.date-1&quot; &lt;entry key=&quot;formated.date-1&quot;
@@ -213,21 +213,21 @@ To produce dates relative from today :</p>
type=&quot;date&quot; default=&quot;now&quot; pattern=&quot;DDD&quot; type=&quot;date&quot; default=&quot;now&quot; pattern=&quot;DDD&quot;
operation=&quot;+&quot; value=&quot;1&quot;/&gt; operation=&quot;+&quot; value=&quot;1&quot;/&gt;
&lt;/propertyfile&gt; &lt;/propertyfile&gt;
</pre></blockquote>
</pre>


<p> <p>
Concatenation of strings :</p> Concatenation of strings :</p>
<blockquote><pre>&lt;propertyfile
<pre>&lt;propertyfile
file=&quot;my.properties&quot; file=&quot;my.properties&quot;
comment=&quot;My properties&quot;&gt; comment=&quot;My properties&quot;&gt;
&lt;entry key=&quot;progress&quot; default=&quot;&quot; operation=&quot;+&quot; value=&quot;.&quot;/&gt; &lt;entry key=&quot;progress&quot; default=&quot;&quot; operation=&quot;+&quot; value=&quot;.&quot;/&gt;
&lt;/propertyfile&gt; &lt;/propertyfile&gt;
</pre></blockquote>
</pre>
<p>Each time called, a &quot;.&quot; will be appended to &quot;progress&quot; <p>Each time called, a &quot;.&quot; will be appended to &quot;progress&quot;
</p> </p>


<p>Pumps the project version to the next minor version (increase minor and set path=0):</p> <p>Pumps the project version to the next minor version (increase minor and set path=0):</p>
<blockquote><pre>&lt;target name="nextMinorVersion"&gt;
<pre>&lt;target name="nextMinorVersion"&gt;
&lt;property &lt;property
name="header" name="header"
value="##Generated file - do not modify!"/&gt; value="##Generated file - do not modify!"/&gt;
@@ -238,7 +238,7 @@ Concatenation of strings :</p>
&lt;entry key="product.build.date" type="date" value="now" /&gt; &lt;entry key="product.build.date" type="date" value="now" /&gt;
&lt;/propertyfile&gt; &lt;/propertyfile&gt;
&lt;/target&gt; &lt;/target&gt;
</pre></blockquote>
</pre>
After running this target the version changed e.g. from 3.2.2 to 3.3.0. After running this target the version changed e.g. from 3.2.2 to 3.3.0.


</body> </body>


+ 3
- 5
manual/Tasks/renameextensions.html View File

@@ -105,16 +105,14 @@ supports most attributes of <code>&lt;fileset&gt;</code>
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<p><code>&lt;renameext srcDir=&quot;/source/project1&quot;
<pre>&lt;renameext srcDir=&quot;/source/project1&quot;
includes=&quot;**&quot; includes=&quot;**&quot;
excludes=&quot;**/samples/*&quot; excludes=&quot;**/samples/*&quot;
fromExtension=&quot;.java.keep&quot; fromExtension=&quot;.java.keep&quot;
toExtension=&quot;.java&quot; toExtension=&quot;.java&quot;
replace=&quot;true&quot;/&gt; replace=&quot;true&quot;/&gt;
</code>
</p>
</blockquote>
</pre>


</body> </body>
</html> </html>

+ 7
- 7
manual/Tasks/replace.html View File

@@ -159,30 +159,30 @@ them.</p>
<tr> <tr>
<td valign="top">expandProperties</td> <td valign="top">expandProperties</td>
<td valign="top">Whether to expand properties in the nested text. <td valign="top">Whether to expand properties in the nested text.
<em>since Ant 1.8.0</em>.</td>
<em>Since Ant 1.8.0</em>.</td>
<td align="center">No, defaults to true.</td> <td align="center">No, defaults to true.</td>
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;replace dir=&quot;${src}&quot; value=&quot;wombat&quot;&gt; &lt;replace dir=&quot;${src}&quot; value=&quot;wombat&quot;&gt;
&lt;include name=&quot;**/*.html&quot;/&gt; &lt;include name=&quot;**/*.html&quot;/&gt;
&lt;replacetoken&gt;&lt;![CDATA[multi line &lt;replacetoken&gt;&lt;![CDATA[multi line
token]]&gt;&lt;/replacetoken&gt; token]]&gt;&lt;/replacetoken&gt;
&lt;/replace&gt; &lt;/replace&gt;
</pre></blockquote>
</pre>
<p>replaces occurrences of the string &quot;multi <p>replaces occurrences of the string &quot;multi
line<i>\n</i>token&quot; with the string &quot;wombat&quot;, in all line<i>\n</i>token&quot; with the string &quot;wombat&quot;, in all
HTML files in the directory <code>${src}</code>.Where <i>\n</i> is HTML files in the directory <code>${src}</code>.Where <i>\n</i> is
the platform specific line separator.</p> the platform specific line separator.</p>
<blockquote><pre>
<pre>
&lt;replace file=&quot;${src}/index.html&quot;&gt; &lt;replace file=&quot;${src}/index.html&quot;&gt;
&lt;replacetoken&gt;&lt;![CDATA[two line &lt;replacetoken&gt;&lt;![CDATA[two line
token]]&gt;&lt;/replacetoken&gt; token]]&gt;&lt;/replacetoken&gt;
&lt;replacevalue&gt;&lt;![CDATA[two line &lt;replacevalue&gt;&lt;![CDATA[two line
token]]&gt;&lt;/replacevalue&gt; token]]&gt;&lt;/replacevalue&gt;
&lt;/replace&gt; &lt;/replace&gt;
</pre></blockquote>
</pre>
<h4>replacefilter</h4> <h4>replacefilter</h4>
<p>In addition to allowing for multiple replacements, optional nested <code>&lt;replacefilter&gt;</code> elements allow replacement values to be extracted from a property file. The name of this file is specified using the <code>&lt;replace&gt;</code> attribute <i>propertyFile</i>. <p>In addition to allowing for multiple replacements, optional nested <code>&lt;replacefilter&gt;</code> elements allow replacement values to be extracted from a property file. The name of this file is specified using the <code>&lt;replace&gt;</code> attribute <i>propertyFile</i>.
</p> </p>
@@ -213,7 +213,7 @@ token]]&gt;&lt;/replacevalue&gt;
<p>If neither <i>value</i> nor <i>property</i> is used, the value provided using the <code>&lt;replace&gt;</code> attribute <i>value</i> and/or the <code>&lt;replacevalue&gt;</code> element is used. If no value was specified using either of these options, the token is replaced with an empty string. <p>If neither <i>value</i> nor <i>property</i> is used, the value provided using the <code>&lt;replace&gt;</code> attribute <i>value</i> and/or the <code>&lt;replacevalue&gt;</code> element is used. If no value was specified using either of these options, the token is replaced with an empty string.
</p> </p>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;replace &lt;replace
file=&quot;configure.sh&quot; file=&quot;configure.sh&quot;
value=&quot;defaultvalue&quot; value=&quot;defaultvalue&quot;
@@ -231,7 +231,7 @@ token]]&gt;&lt;/replacevalue&gt;
&lt;replacevalue&gt;value4&lt;/replacevalue&gt; &lt;replacevalue&gt;value4&lt;/replacevalue&gt;
&lt;/replacefilter&gt; &lt;/replacefilter&gt;
&lt;/replace&gt; &lt;/replace&gt;
</pre></blockquote>
</pre>
<p>In file <code>configure.sh</code>, replace all instances of &quot;@token1@&quot; with &quot;defaultvalue&quot;, all instances of &quot;@token2@&quot; with &quot;value2&quot;, and all instances of &quot;@token3@&quot; with the value of the property &quot;property.key&quot;, as it appears in property file <code>src/name.properties</code>.</p> <p>In file <code>configure.sh</code>, replace all instances of &quot;@token1@&quot; with &quot;defaultvalue&quot;, all instances of &quot;@token2@&quot; with &quot;value2&quot;, and all instances of &quot;@token3@&quot; with the value of the property &quot;property.key&quot;, as it appears in property file <code>src/name.properties</code>.</p>
<p><strong>Note</strong>: It is possible to use either the <i>token</i>/<code>&lt;replacetoken&gt;</code> and <i>value</i>/<code>&lt;replacevalue&gt;</code> attributes/elements, the nested replacefilter elements, or both in the same operation.</p> <p><strong>Note</strong>: It is possible to use either the <i>token</i>/<code>&lt;replacetoken&gt;</code> and <i>value</i>/<code>&lt;replacevalue&gt;</code> attributes/elements, the nested replacefilter elements, or both in the same operation.</p>




+ 13
- 22
manual/Tasks/replaceregexp.html View File

@@ -115,23 +115,22 @@ value, in the file <code>${src}/build.properties</code></p>
<p>This task supports a nested <i><a href="../Types/regexp.html">Regexp</a></i> element to specify <p>This task supports a nested <i><a href="../Types/regexp.html">Regexp</a></i> element to specify
the regular expression. You can use this element to refer to a previously the regular expression. You can use this element to refer to a previously
defined regular expression datatype instance.</p> defined regular expression datatype instance.</p>
<blockquote>
&lt;regexp id="id" pattern="alpha(.+)beta"/&gt;<br> &lt;regexp id="id" pattern="alpha(.+)beta"/&gt;<br>
&lt;regexp refid="id"/&gt; &lt;regexp refid="id"/&gt;
</blockquote>
<p>This task supports a nested <i>Substitution</i> element to specify <p>This task supports a nested <i>Substitution</i> element to specify
the substitution pattern. You can use this element to refer to a previously the substitution pattern. You can use this element to refer to a previously
defined substitution pattern datatype instance.</p> defined substitution pattern datatype instance.</p>
<blockquote>
&lt;substitution id="id" expression="beta\1alpha"/&gt;<br> &lt;substitution id="id" expression="beta\1alpha"/&gt;<br>
&lt;substitution refid="id"/&gt; &lt;substitution refid="id"/&gt;
</blockquote>




<h3>Examples</h3> <h3>Examples</h3>


<blockquote>
<pre>
<pre>
&lt;replaceregexp byline=&quot;true&quot;&gt; &lt;replaceregexp byline=&quot;true&quot;&gt;
&lt;regexp pattern=&quot;OldProperty=(.*)&quot;/&gt; &lt;regexp pattern=&quot;OldProperty=(.*)&quot;/&gt;
&lt;substitution expression=&quot;NewProperty=\1&quot;/&gt; &lt;substitution expression=&quot;NewProperty=\1&quot;/&gt;
@@ -139,62 +138,54 @@ value, in the file <code>${src}/build.properties</code></p>
&lt;include name=&quot;*.properties&quot;/&gt; &lt;include name=&quot;*.properties&quot;/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
&lt;/replaceregexp&gt; &lt;/replaceregexp&gt;
</pre></blockquote>
</pre>
<p>replaces occurrences of the property name &quot;OldProperty&quot; <p>replaces occurrences of the property name &quot;OldProperty&quot;
with &quot;NewProperty&quot; in a properties file, preserving the existing with &quot;NewProperty&quot; in a properties file, preserving the existing
value, in all files ending in <code>.properties</code> in the current directory</p> value, in all files ending in <code>.properties</code> in the current directory</p>


<br>
<blockquote>
<pre>&lt;replaceregexp match="\s+" replace=" " flags="g" byline="true"&gt; <pre>&lt;replaceregexp match="\s+" replace=" " flags="g" byline="true"&gt;
&lt;fileset dir="${html.dir}" includes="**/*.html"/&gt; &lt;fileset dir="${html.dir}" includes="**/*.html"/&gt;
&lt;/replaceregexp&gt; &lt;/replaceregexp&gt;
</pre></blockquote>
</pre>
<p>replaces all whitespaces (blanks, tabs, etc) by one blank remaining the <p>replaces all whitespaces (blanks, tabs, etc) by one blank remaining the
line separator. So with input</p> line separator. So with input</p>
<blockquote>
<pre> <pre>
&lt;html&gt; &lt;body&gt; &lt;html&gt; &lt;body&gt;
&lt;&lt;TAB&gt;&gt;&lt;h1&gt; T E S T &lt;/h1&gt; &lt;&lt;TAB&gt;&gt; &lt;&lt;TAB&gt;&gt;&lt;h1&gt; T E S T &lt;/h1&gt; &lt;&lt;TAB&gt;&gt;
&lt;&lt;TAB&gt;&gt; &lt;/body&gt;&lt;/html&gt; &lt;&lt;TAB&gt;&gt; &lt;/body&gt;&lt;/html&gt;
</pre></blockquote>
</pre>
<p>would converted to</p> <p>would converted to</p>
<blockquote>
<pre> <pre>
&lt;html&gt; &lt;body&gt; &lt;html&gt; &lt;body&gt;
&lt;h1&gt; T E S T &lt;/h1&gt; &lt;/body&gt;&lt;/html&gt; &lt;h1&gt; T E S T &lt;/h1&gt; &lt;/body&gt;&lt;/html&gt;
</pre> </pre>
</blockquote>


<br><!-- small distance from code of the previous example --> <br><!-- small distance from code of the previous example -->
<blockquote>
<pre>&lt;replaceregexp match="\\n" replace="${line.separator}" flags="g" byline="true"&gt; <pre>&lt;replaceregexp match="\\n" replace="${line.separator}" flags="g" byline="true"&gt;
&lt;fileset dir="${dir}"/&gt; &lt;fileset dir="${dir}"/&gt;
&lt;/replaceregexp&gt; &lt;/replaceregexp&gt;
</pre></blockquote>
</pre>
<p>replaces all <tt>\n</tt> markers (beware the quoting of the backslash) by a line break. <p>replaces all <tt>\n</tt> markers (beware the quoting of the backslash) by a line break.
So with input</p> So with input</p>
<blockquote>
<pre> <pre>
one\ntwo\nthree one\ntwo\nthree
</pre></blockquote>
</pre>
<p>would converted to</p> <p>would converted to</p>
<blockquote>
<pre> <pre>
one one
two two
three three
</pre> </pre>
</blockquote>
<p>Beware that inserting line breaks could break file syntax. For example in xml:</p> <p>Beware that inserting line breaks could break file syntax. For example in xml:</p>
<blockquote>
<pre> <pre>
&lt;root&gt; &lt;root&gt;
&lt;text&gt;line breaks \n should work in text&lt;/text&gt; &lt;text&gt;line breaks \n should work in text&lt;/text&gt;
&lt;attribute value=&quot;but breaks \n attributes&quot; /&gt; &lt;attribute value=&quot;but breaks \n attributes&quot; /&gt;
&lt;/root&gt; &lt;/root&gt;
</pre> </pre>
</blockquote>


</body> </body>
</html> </html>

+ 4
- 4
manual/Tasks/rexec.html View File

@@ -100,14 +100,14 @@ this is "true" by default
<h3>Example</h3> <h3>Example</h3>
A simple example of connecting to a server and running a command. A simple example of connecting to a server and running a command.


<blockquote><pre>
<pre>
&lt;rexec userid=&quot;bob&quot; password=&quot;badpass&quot; server=&quot;localhost&quot; command=&quot;ls&quot;/&gt; &lt;rexec userid=&quot;bob&quot; password=&quot;badpass&quot; server=&quot;localhost&quot; command=&quot;ls&quot;/&gt;
</pre></blockquote>
</pre>


The task can be used with other ports as well: The task can be used with other ports as well:
<blockquote><pre>
<pre>
&lt;rexec port=&quot;80&quot; userid=&quot;bob&quot; password=&quot;badpass&quot; server=&quot;localhost&quot; command=&quot;ls&quot;/&gt; &lt;rexec port=&quot;80&quot; userid=&quot;bob&quot; password=&quot;badpass&quot; server=&quot;localhost&quot; command=&quot;ls&quot;/&gt;
</pre></blockquote>
</pre>


</body> </body>
</html> </html>

+ 14
- 18
manual/Tasks/script.html View File

@@ -162,7 +162,7 @@ different location values.</p>
</p> </p>
<h3>Examples</h3> <h3>Examples</h3>
The following snippet shows use of five different languages: The following snippet shows use of five different languages:
<blockquote><pre>
<pre>
&lt;property name="message" value="Hello world"/&gt; &lt;property name="message" value="Hello world"/&gt;


&lt;script language="groovy"&gt; &lt;script language="groovy"&gt;
@@ -185,7 +185,6 @@ The following snippet shows use of five different languages:
print "message is %s" % message print "message is %s" % message
&lt;/script&gt; &lt;/script&gt;
</pre> </pre>
</blockquote>
<p> <p>
Note that for the <i>jython</i> example, the script contents <b>must</b> Note that for the <i>jython</i> example, the script contents <b>must</b>
start on the first column. start on the first column.
@@ -196,28 +195,26 @@ print "message is %s" % message
<p> <p>
The following script shows a little more complicated jruby example: The following script shows a little more complicated jruby example:
</p> </p>
<blockquote><pre>
<pre>
&lt;script language="ruby"&gt; &lt;script language="ruby"&gt;
xmlfiles = Dir.new(".").entries.delete_if { |i| ! (i =~ /\.xml$/) } xmlfiles = Dir.new(".").entries.delete_if { |i| ! (i =~ /\.xml$/) }
xmlfiles.sort.each { |i| $self.log(i) } xmlfiles.sort.each { |i| $self.log(i) }
&lt;/script&gt; &lt;/script&gt;
</pre> </pre>
</blockquote>
<p> <p>
The same example in groovy is: The same example in groovy is:
</p> </p>
<blockquote><pre>
<pre>
&lt;script language="groovy"&gt; &lt;script language="groovy"&gt;
xmlfiles = new java.io.File(".").listFiles().findAll{ it =~ "\.xml$"} xmlfiles = new java.io.File(".").listFiles().findAll{ it =~ "\.xml$"}
xmlfiles.sort().each { self.log(it.toString())} xmlfiles.sort().each { self.log(it.toString())}
&lt;/script&gt; &lt;/script&gt;
</pre> </pre>
</blockquote>
<p> <p>
The following example shows the use of classpath to specify the location The following example shows the use of classpath to specify the location
of the beanshell jar file. of the beanshell jar file.
</p> </p>
<blockquote><pre>
<pre>
&lt;script language="beanshell" setbeans="true"&gt; &lt;script language="beanshell" setbeans="true"&gt;
&lt;classpath&gt; &lt;classpath&gt;
&lt;fileset dir="${user.home}/lang/beanshell" includes="*.jar" /&gt; &lt;fileset dir="${user.home}/lang/beanshell" includes="*.jar" /&gt;
@@ -225,12 +222,11 @@ print "message is %s" % message
System.out.println("Hello world"); System.out.println("Hello world");
&lt;/script&gt; &lt;/script&gt;
</pre> </pre>
</blockquote>
<p> <p>
The following script uses javascript to create a number of The following script uses javascript to create a number of
echo tasks and execute them. echo tasks and execute them.
</p> </p>
<blockquote><pre>
<pre>
&lt;project name=&quot;squares&quot; default=&quot;main&quot; basedir=&quot;.&quot;&gt; &lt;project name=&quot;squares&quot; default=&quot;main&quot; basedir=&quot;.&quot;&gt;


&lt;target name=&quot;main&quot;&gt; &lt;target name=&quot;main&quot;&gt;
@@ -248,9 +244,9 @@ print "message is %s" % message
&lt;/target&gt; &lt;/target&gt;


&lt;/project&gt; &lt;/project&gt;
</pre></blockquote>
</pre>
<p>generates</p> <p>generates</p>
<blockquote><pre>
<pre>
main: main:
1 1
4 4
@@ -264,11 +260,11 @@ main:
100 100


BUILD SUCCESSFUL BUILD SUCCESSFUL
</pre></blockquote>
</pre>


<p>Now a more complex example using the Java API and the Ant API. The goal is to list the <p>Now a more complex example using the Java API and the Ant API. The goal is to list the
filesizes of all files a <code>&lt;fileset/&gt;</code> caught.</p> filesizes of all files a <code>&lt;fileset/&gt;</code> caught.</p>
<blockquote><pre>
<pre>


&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt; &lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
&lt;project name="<font color=blue>MyProject</font>" basedir="." default="main"&gt; &lt;project name="<font color=blue>MyProject</font>" basedir="." default="main"&gt;
@@ -316,7 +312,7 @@ filesizes of all files a <code>&lt;fileset/&gt;</code> caught.</p>
]]&gt;&lt;/script&gt; ]]&gt;&lt;/script&gt;
&lt;/target&gt; &lt;/target&gt;
&lt;/project&gt; &lt;/project&gt;
</pre></blockquote>
</pre>
<p>We want to use the Java API. Because we don't want always typing the package signature <p>We want to use the Java API. Because we don't want always typing the package signature
we do an import. Rhino knows two different methods for import statements: one for packages we do an import. Rhino knows two different methods for import statements: one for packages
and one for a single class. By default only the <i>java</i> packages are available, so and one for a single class. By default only the <i>java</i> packages are available, so
@@ -343,7 +339,7 @@ appropriate logging before and after invoking execute().
task. This task will add filesets and paths to a referenced task. This task will add filesets and paths to a referenced
path. If the path does not exist, it will be created. path. If the path does not exist, it will be created.
</p> </p>
<blockquote><pre>
<pre>
&lt;!-- &lt;!--
Define addtopath task Define addtopath task
--&gt; --&gt;
@@ -372,14 +368,14 @@ appropriate logging before and after invoking execute().
} }
project.addTaskDefinition("addtopath", AddToPath.class); project.addTaskDefinition("addtopath", AddToPath.class);
&lt;/script&gt; &lt;/script&gt;
</pre></blockquote>
</pre>
<p> <p>
An example of using this task to create a path An example of using this task to create a path
from a list of directories (using antcontrib's from a list of directories (using antcontrib's
<a href="http://ant-contrib.sourceforge.net/tasks/tasks/for.html"> <a href="http://ant-contrib.sourceforge.net/tasks/tasks/for.html">
&lt;for&gt;</a> task) follows: &lt;for&gt;</a> task) follows:
</p> </p>
<blockquote><pre>
<pre>
&lt;path id="main.path"&gt; &lt;path id="main.path"&gt;
&lt;fileset dir="build/classes"/&gt; &lt;fileset dir="build/classes"/&gt;
&lt;/path&gt; &lt;/path&gt;
@@ -392,7 +388,7 @@ appropriate logging before and after invoking execute().
&lt;/addtopath&gt; &lt;/addtopath&gt;
&lt;/sequential&gt; &lt;/sequential&gt;
&lt;/ac:for&gt; &lt;/ac:for&gt;
</pre></blockquote>
</pre>


</body> </body>
</html> </html>

+ 2
- 2
manual/Tasks/scriptdef.html View File

@@ -282,8 +282,8 @@ error. For example in the above script, removing the closing curly bracket
would result in this error would result in this error
</p> </p>


<p><code>build.xml:15: SyntaxError: missing } in compound
statement (scriptdef <code>&lt;scripttest2&gt;</code>; line 10)</code></p>
<pre>build.xml:15: SyntaxError: missing } in compound
statement (scriptdef <code>&lt;scripttest2&gt;</code>; line 10)</pre>


<p> <p>
Script errors are only detected when a script task is actually executed. Script errors are only detected when a script task is actually executed.


+ 4
- 4
manual/Tasks/setpermissions.html View File

@@ -91,18 +91,18 @@
<p><a href="../Types/resources.html#collection">Resource <p><a href="../Types/resources.html#collection">Resource
Collection</a>s are used to select groups of resources.</p> Collection</a>s are used to select groups of resources.</p>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;setpermissions mode=&quot;755&quot;&gt; &lt;setpermissions mode=&quot;755&quot;&gt;
&lt;file file=&quot;${dist}/start.sh&quot;/&gt; &lt;file file=&quot;${dist}/start.sh&quot;/&gt;
&lt;/setpermissions&gt; &lt;/setpermissions&gt;
</pre></blockquote>
</pre>
<p>makes the &quot;start.sh&quot; file readable and executable for <p>makes the &quot;start.sh&quot; file readable and executable for
anyone and in addition writable by the owner.</p> anyone and in addition writable by the owner.</p>
<blockquote><pre>
<pre>
&lt;setpermissions permissions=&quot;OWNER_READ,OWNER_WRITE,OWNER_EXECUTE,OTHERS_READ,OTHERS_EXECUTE,GROUP_READ,GROUP_EXECUTE&quot;&gt; &lt;setpermissions permissions=&quot;OWNER_READ,OWNER_WRITE,OWNER_EXECUTE,OTHERS_READ,OTHERS_EXECUTE,GROUP_READ,GROUP_EXECUTE&quot;&gt;
&lt;file file=&quot;${dist}/start.sh&quot;/&gt; &lt;file file=&quot;${dist}/start.sh&quot;/&gt;
&lt;/setpermissions&gt; &lt;/setpermissions&gt;
</pre></blockquote>
</pre>
<p>makes the &quot;start.sh&quot; file readable and executable for <p>makes the &quot;start.sh&quot; file readable and executable for
anyone and in addition writable by the owner.</p> anyone and in addition writable by the owner.</p>
</body> </body>


+ 8
- 9
manual/Tasks/signjar.html View File

@@ -223,15 +223,15 @@ block</td>


<h3>Examples</h3> <h3>Examples</h3>
<p>For instructions on generating a code signing certificate, see the <a target="_blank" href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/keytool.html">keytool documentation</a> and/or instructions from your certificate authority.</p> <p>For instructions on generating a code signing certificate, see the <a target="_blank" href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/keytool.html">keytool documentation</a> and/or instructions from your certificate authority.</p>
<blockquote><pre>
<pre>
&lt;signjar jar=&quot;${dist}/lib/ant.jar&quot; &lt;signjar jar=&quot;${dist}/lib/ant.jar&quot;
alias=&quot;apache-group&quot; storepass=&quot;secret&quot;/&gt; alias=&quot;apache-group&quot; storepass=&quot;secret&quot;/&gt;
</pre></blockquote>
</pre>
<p> <p>
signs the ant.jar with alias &quot;apache-group&quot; accessing the signs the ant.jar with alias &quot;apache-group&quot; accessing the
keystore and private key via &quot;secret&quot; password. keystore and private key via &quot;secret&quot; password.
</p> </p>
<blockquote><pre>
<pre>
&lt;signjar destDir="signed" &lt;signjar destDir="signed"
alias="testonly" keystore="testkeystore" alias="testonly" keystore="testkeystore"
storepass="apacheant" storepass="apacheant"
@@ -241,14 +241,13 @@ alias=&quot;apache-group&quot; storepass=&quot;secret&quot;/&gt;
&lt;/path&gt; &lt;/path&gt;
&lt;flattenmapper /&gt; &lt;flattenmapper /&gt;
&lt;/signjar&gt; &lt;/signjar&gt;
</pre></blockquote>
</pre>
<p> <p>
Sign all JAR files matching the dist/**/*.jar pattern, copying them to the Sign all JAR files matching the dist/**/*.jar pattern, copying them to the
directory "signed" afterwards. The flatten mapper means that they will directory "signed" afterwards. The flatten mapper means that they will
all be copied to this directory, not to subdirectories. all be copied to this directory, not to subdirectories.

</p> </p>
<blockquote><pre>
<pre>
&lt;signjar &lt;signjar
alias="testonly" keystore="testkeystore" alias="testonly" keystore="testkeystore"
storepass="apacheant" storepass="apacheant"
@@ -258,12 +257,12 @@ all be copied to this directory, not to subdirectories.
&lt;fileset dir="dist" includes="**/*.jar" /&gt; &lt;fileset dir="dist" includes="**/*.jar" /&gt;
&lt;/path&gt; &lt;/path&gt;
&lt;/signjar&gt; &lt;/signjar&gt;
</pre></blockquote>
</pre>
<p> <p>
Sign all the JAR files in dist/**/*.jar <i>in-situ</i>. Lazy signing is used, Sign all the JAR files in dist/**/*.jar <i>in-situ</i>. Lazy signing is used,
so the files will only be signed if they are not already signed. so the files will only be signed if they are not already signed.
</p> </p>
<blockquote><pre>
<pre>
&lt;signjar &lt;signjar
alias="testonly" keystore="testkeystore" alias="testonly" keystore="testkeystore"
storepass="apacheant" storepass="apacheant"
@@ -273,7 +272,7 @@ so the files will only be signed if they are not already signed.
&lt;fileset dir="dist" includes="**/*.jar" /&gt; &lt;fileset dir="dist" includes="**/*.jar" /&gt;
&lt;/path&gt; &lt;/path&gt;
&lt;/signjar&gt; &lt;/signjar&gt;
</pre></blockquote>
</pre>
<p> <p>
Sign all the JAR files in dist/**/*.jar using the digest algorithm SHA1 and the Sign all the JAR files in dist/**/*.jar using the digest algorithm SHA1 and the
signature algorithm MD5withRSA. This is especially useful when you want to use signature algorithm MD5withRSA. This is especially useful when you want to use


+ 1
- 4
manual/Tasks/sound.html View File

@@ -84,7 +84,7 @@ will be logged.
</table> </table>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;target name=&quot;fun&quot; if=&quot;fun&quot; unless=&quot;fun.done&quot;&gt; &lt;target name=&quot;fun&quot; if=&quot;fun&quot; unless=&quot;fun.done&quot;&gt;
&lt;sound&gt; &lt;sound&gt;
@@ -94,7 +94,6 @@ will be logged.
&lt;property name=&quot;fun.done&quot; value=&quot;true&quot;/&gt; &lt;property name=&quot;fun.done&quot; value=&quot;true&quot;/&gt;
&lt;/target&gt; &lt;/target&gt;
</pre> </pre>
</blockquote>
plays the <code>bell.wav</code> sound-file if the build succeeded, or plays the <code>bell.wav</code> sound-file if the build succeeded, or
the <code>ohno.wav</code> sound-file if the build failed, three times, the <code>ohno.wav</code> sound-file if the build failed, three times,
if the <code>fun</code> property is set to <code>true</code>. if the <code>fun</code> property is set to <code>true</code>.
@@ -103,7 +102,6 @@ is a dependency of an &quot;initialization&quot; target that other
targets depend on, the targets depend on, the
<code>fun.done</code> property prevents the target from being executed <code>fun.done</code> property prevents the target from being executed
more than once. more than once.
<blockquote>
<pre> <pre>
&lt;target name=&quot;fun&quot; if=&quot;fun&quot; unless=&quot;fun.done&quot;&gt; &lt;target name=&quot;fun&quot; if=&quot;fun&quot; unless=&quot;fun.done&quot;&gt;
&lt;sound&gt; &lt;sound&gt;
@@ -113,7 +111,6 @@ more than once.
&lt;property name=&quot;fun.done&quot; value=&quot;true&quot;/&gt; &lt;property name=&quot;fun.done&quot; value=&quot;true&quot;/&gt;
&lt;/target&gt; &lt;/target&gt;
</pre> </pre>
</blockquote>
randomly selects a sound-file to play when the build succeeds or fails. randomly selects a sound-file to play when the build succeeds or fails.


</body> </body>


+ 5
- 9
manual/Tasks/splash.html View File

@@ -105,7 +105,6 @@ the build exactly what is going on.
<td valign="top">User to authenticate to the proxy as.</td> <td valign="top">User to authenticate to the proxy as.</td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
<td valign="top" align="center">None</td> <td valign="top" align="center">None</td>

</tr> </tr>
<tr> <tr>
<td valign="top">password</td> <td valign="top">password</td>
@@ -113,23 +112,20 @@ the build exactly what is going on.
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
<td valign="top" align="center">None</td> <td valign="top" align="center">None</td>
</tr> </tr>

</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
&lt;splash/&gt;
</pre></blockquote>
<pre>&lt;splash/&gt;</pre>
<p>Splash <code>images/ant_logo_large.gif</code> from the classpath.</p> <p>Splash <code>images/ant_logo_large.gif</code> from the classpath.</p>
<blockquote><pre>
<pre>
&lt;splash imageurl=&quot;http://jakarta.apache.org/images/jakarta-logo.gif&quot; &lt;splash imageurl=&quot;http://jakarta.apache.org/images/jakarta-logo.gif&quot;
useproxy=&quot;true&quot; useproxy=&quot;true&quot;
showduration=&quot;5000&quot;/&gt; showduration=&quot;5000&quot;/&gt;


</pre></blockquote>
</pre>
<p>Splashes the jakarta logo, for an initial period of 5 seconds.</p> <p>Splashes the jakarta logo, for an initial period of 5 seconds.</p>


<p>Splash with controlled progress and nondefault text</p> <p>Splash with controlled progress and nondefault text</p>
<blockquote><pre>
<pre>
&lt;target name="test_new_features"&gt; &lt;target name="test_new_features"&gt;
&lt;echo&gt;New features&lt;/echo&gt; &lt;echo&gt;New features&lt;/echo&gt;
&lt;splash progressRegExp="Progress: (.*)%" showduration="0" displayText="Test text"/&gt; &lt;splash progressRegExp="Progress: (.*)%" showduration="0" displayText="Test text"/&gt;
@@ -145,7 +141,7 @@ the build exactly what is going on.
&lt;echo&gt;Progress: 100%&lt;/echo&gt; &lt;echo&gt;Progress: 100%&lt;/echo&gt;
&lt;sleep seconds="3"/&gt; &lt;sleep seconds="3"/&gt;
&lt;/target&gt; &lt;/target&gt;
</pre></blockquote>
</pre>


</body> </body>
</html> </html>

+ 18
- 18
manual/Tasks/sql.html View File

@@ -352,19 +352,19 @@ href="../using.html#path">PATH like structure</a> and can also be set via a nest
</table> </table>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>&lt;sql
<pre>&lt;sql
driver=&quot;org.database.jdbcDriver&quot; driver=&quot;org.database.jdbcDriver&quot;
url=&quot;jdbc:database-url&quot; url=&quot;jdbc:database-url&quot;
userid=&quot;sa&quot; userid=&quot;sa&quot;
password=&quot;pass&quot; password=&quot;pass&quot;
src=&quot;data.sql&quot;/&gt; src=&quot;data.sql&quot;/&gt;
</pre></blockquote>
</pre>


<p>Connects to the database given in <i>url</i> as the sa user using the <p>Connects to the database given in <i>url</i> as the sa user using the
org.database.jdbcDriver and executes the SQL statements contained within org.database.jdbcDriver and executes the SQL statements contained within
the file data.sql</p> the file data.sql</p>


<blockquote><pre>&lt;sql
<pre>&lt;sql
driver=&quot;org.database.jdbcDriver&quot; driver=&quot;org.database.jdbcDriver&quot;
url=&quot;jdbc:database-url&quot; url=&quot;jdbc:database-url&quot;
userid=&quot;sa&quot; userid=&quot;sa&quot;
@@ -372,14 +372,14 @@ the file data.sql</p>
src=&quot;data.sql&quot;&gt; src=&quot;data.sql&quot;&gt;
&lt;connectionProperty name=&quot;internal_logon&quot; value=&quot;SYSDBA&quot;&gt; &lt;connectionProperty name=&quot;internal_logon&quot; value=&quot;SYSDBA&quot;&gt;
&lt;/sql&gt; &lt;/sql&gt;
</pre></blockquote>
</pre>


<p>Connects to the database given in <i>url</i> as the sa user using <p>Connects to the database given in <i>url</i> as the sa user using
the org.database.jdbcDriver and executes the SQL statements contained the org.database.jdbcDriver and executes the SQL statements contained
within the file data.sql. Also sets the within the file data.sql. Also sets the
property <i>internal_logon</i> to the value <i>SYSDBA</i>.</p> property <i>internal_logon</i> to the value <i>SYSDBA</i>.</p>


<blockquote><pre>&lt;sql
<pre>&lt;sql
driver=&quot;org.database.jdbcDriver&quot; driver=&quot;org.database.jdbcDriver&quot;
url=&quot;jdbc:database-url&quot; url=&quot;jdbc:database-url&quot;
userid=&quot;sa&quot; userid=&quot;sa&quot;
@@ -390,7 +390,7 @@ values(1,2,3,4);


truncate table some_other_table; truncate table some_other_table;
&lt;/sql&gt; &lt;/sql&gt;
</pre></blockquote>
</pre>


<p>Connects to the database given in <i>url</i> as the sa <p>Connects to the database given in <i>url</i> as the sa
user using the org.database.jdbcDriver and executes the two SQL statements user using the org.database.jdbcDriver and executes the two SQL statements
@@ -402,7 +402,7 @@ truncate table some_other_table;
need to escape <code>&lt;</code>, <code>&gt;</code> <code>&amp;</code> need to escape <code>&lt;</code>, <code>&gt;</code> <code>&amp;</code>
or other special characters. For example:</p> or other special characters. For example:</p>


<blockquote><pre>&lt;sql
<pre>&lt;sql
driver=&quot;org.database.jdbcDriver&quot; driver=&quot;org.database.jdbcDriver&quot;
url=&quot;jdbc:database-url&quot; url=&quot;jdbc:database-url&quot;
userid=&quot;sa&quot; userid=&quot;sa&quot;
@@ -411,12 +411,12 @@ or other special characters. For example:</p>
update some_table set column1 = column1 + 1 where column2 &lt; 42; update some_table set column1 = column1 + 1 where column2 &lt; 42;


]]&gt;&lt;/sql&gt; ]]&gt;&lt;/sql&gt;
</pre></blockquote>
</pre>


The following command turns property expansion in nested text on (it is off purely for backwards The following command turns property expansion in nested text on (it is off purely for backwards
compatibility), then creates a new user in the HSQLDB database using Ant properties. compatibility), then creates a new user in the HSQLDB database using Ant properties.


<blockquote><pre>&lt;sql
<pre>&lt;sql
driver="org.hsqldb.jdbcDriver"; driver="org.hsqldb.jdbcDriver";
url="jdbc:hsqldb:file:${database.dir}" url="jdbc:hsqldb:file:${database.dir}"
userid="sa" userid="sa"
@@ -426,14 +426,14 @@ compatibility), then creates a new user in the HSQLDB database using Ant propert
CREATE USER ${newuser} PASSWORD ${newpassword} CREATE USER ${newuser} PASSWORD ${newpassword}
&lt;/transaction&gt; &lt;/transaction&gt;
&lt;/sql&gt; &lt;/sql&gt;
</pre></blockquote>
</pre>


<p>The following connects to the database given in url as the sa user using <p>The following connects to the database given in url as the sa user using
the org.database.jdbcDriver and executes the SQL statements contained within the org.database.jdbcDriver and executes the SQL statements contained within
the files data1.sql, data2.sql and data3.sql and then executes the truncate the files data1.sql, data2.sql and data3.sql and then executes the truncate
operation on <i>some_other_table</i>.</p> operation on <i>some_other_table</i>.</p>


<blockquote><pre>&lt;sql
<pre>&lt;sql
driver=&quot;org.database.jdbcDriver&quot; driver=&quot;org.database.jdbcDriver&quot;
url=&quot;jdbc:database-url&quot; url=&quot;jdbc:database-url&quot;
userid=&quot;sa&quot; userid=&quot;sa&quot;
@@ -445,14 +445,14 @@ operation on <i>some_other_table</i>.</p>
truncate table some_other_table; truncate table some_other_table;
&lt;/transaction&gt; &lt;/transaction&gt;
&lt;/sql&gt; &lt;/sql&gt;
</pre></blockquote>
</pre>


<p>The following example does the same as (and may execute additional <p>The following example does the same as (and may execute additional
SQL files if there are more files matching the pattern SQL files if there are more files matching the pattern
<code>data*.sql</code>) but doesn't guarantee that data1.sql will be <code>data*.sql</code>) but doesn't guarantee that data1.sql will be
run before <code>data2.sql</code>.</p> run before <code>data2.sql</code>.</p>


<blockquote><pre>&lt;sql
<pre>&lt;sql
driver=&quot;org.database.jdbcDriver&quot; driver=&quot;org.database.jdbcDriver&quot;
url=&quot;jdbc:database-url&quot; url=&quot;jdbc:database-url&quot;
userid=&quot;sa&quot; userid=&quot;sa&quot;
@@ -466,14 +466,14 @@ run before <code>data2.sql</code>.</p>
truncate table some_other_table; truncate table some_other_table;
&lt;/transaction&gt; &lt;/transaction&gt;
&lt;/sql&gt; &lt;/sql&gt;
</pre></blockquote>
</pre>


<p>The following connects to the database given in url as the sa user using the <p>The following connects to the database given in url as the sa user using the
org.database.jdbcDriver and executes the SQL statements contained within the org.database.jdbcDriver and executes the SQL statements contained within the
file data.sql, with output piped to outputfile.txt, searching /some/jdbc.jar file data.sql, with output piped to outputfile.txt, searching /some/jdbc.jar
as well as the system classpath for the driver class.</p> as well as the system classpath for the driver class.</p>


<blockquote><pre>&lt;sql
<pre>&lt;sql
driver=&quot;org.database.jdbcDriver&quot; driver=&quot;org.database.jdbcDriver&quot;
url=&quot;jdbc:database-url&quot; url=&quot;jdbc:database-url&quot;
userid=&quot;sa&quot; userid=&quot;sa&quot;
@@ -485,12 +485,12 @@ as well as the system classpath for the driver class.</p>
&lt;pathelement location=&quot;/some/jdbc.jar&quot;/&gt; &lt;pathelement location=&quot;/some/jdbc.jar&quot;/&gt;
&lt;/classpath&gt; &lt;/classpath&gt;
&lt;/sql&gt; &lt;/sql&gt;
</pre></blockquote>
</pre>


<p>The following will only execute if the RDBMS is &quot;oracle&quot; and the version <p>The following will only execute if the RDBMS is &quot;oracle&quot; and the version
starts with &quot;8.1.&quot;</p> starts with &quot;8.1.&quot;</p>


<blockquote><pre>&lt;sql
<pre>&lt;sql
driver=&quot;org.database.jdbcDriver&quot; driver=&quot;org.database.jdbcDriver&quot;
url=&quot;jdbc:database-url&quot; url=&quot;jdbc:database-url&quot;
userid=&quot;sa&quot; userid=&quot;sa&quot;
@@ -504,7 +504,7 @@ values(1,2,3,4);


truncate table some_other_table; truncate table some_other_table;
&lt;/sql&gt; &lt;/sql&gt;
</pre></blockquote>
</pre>


</body> </body>
</html> </html>

+ 4
- 4
manual/Tasks/sync.html View File

@@ -137,23 +137,23 @@ defaults to false.</p>


<h3>Examples</h3> <h3>Examples</h3>


<blockquote><pre>
<pre>
&lt;sync todir=&quot;site&quot;&gt; &lt;sync todir=&quot;site&quot;&gt;
&lt;fileset dir=&quot;generated-site&quot;/&gt; &lt;fileset dir=&quot;generated-site&quot;/&gt;
&lt;/sync&gt; &lt;/sync&gt;
</pre></blockquote>
</pre>
<p>overwrites all files in <em>site</em> with newer files from <p>overwrites all files in <em>site</em> with newer files from
<em>generated-site</em>, deletes files from <em>site</em> that are not <em>generated-site</em>, deletes files from <em>site</em> that are not
present in <em>generated-site</em>.</p> present in <em>generated-site</em>.</p>


<blockquote><pre>
<pre>
&lt;sync todir=&quot;site&quot;&gt; &lt;sync todir=&quot;site&quot;&gt;
&lt;fileset dir=&quot;generated-site&quot;/&gt; &lt;fileset dir=&quot;generated-site&quot;/&gt;
&lt;preserveintarget&gt; &lt;preserveintarget&gt;
&lt;include name=&quot;**/CVS/**&quot;/&gt; &lt;include name=&quot;**/CVS/**&quot;/&gt;
&lt;/preserveintarget&gt; &lt;/preserveintarget&gt;
&lt;/sync&gt; &lt;/sync&gt;
</pre></blockquote>
</pre>
<p>overwrites all files in <em>site</em> with newer files from <p>overwrites all files in <em>site</em> with newer files from
<em>generated-site</em>, deletes files from <em>site</em> that are not <em>generated-site</em>, deletes files from <em>site</em> that are not
present in <em>generated-site</em> but keeps all files in any present in <em>generated-site</em> but keeps all files in any


+ 8
- 8
manual/Tasks/telnet.html View File

@@ -101,16 +101,16 @@ A simple example of connecting to a server and running a command. This assumes
a prompt of &quot;ogin:&quot; for the userid, and a prompt of &quot;assword:&quot; a prompt of &quot;ogin:&quot; for the userid, and a prompt of &quot;assword:&quot;
for the password. for the password.


<blockquote><pre>
<pre>
&lt;telnet userid=&quot;bob&quot; password=&quot;badpass&quot; server=&quot;localhost&quot;&gt; &lt;telnet userid=&quot;bob&quot; password=&quot;badpass&quot; server=&quot;localhost&quot;&gt;
&lt;read&gt;/home/bob&lt;/read&gt; &lt;read&gt;/home/bob&lt;/read&gt;
&lt;write&gt;ls&lt;/write&gt; &lt;write&gt;ls&lt;/write&gt;
&lt;read string=&quot;/home/bob&quot;/&gt; &lt;read string=&quot;/home/bob&quot;/&gt;
&lt;/telnet&gt; &lt;/telnet&gt;
</pre></blockquote>
</pre>


This task can be rewritten as: This task can be rewritten as:
<blockquote><pre>
<pre>
&lt;telnet server=&quot;localhost&quot;&gt; &lt;telnet server=&quot;localhost&quot;&gt;
&lt;read&gt;ogin:&lt;/read&gt; &lt;read&gt;ogin:&lt;/read&gt;
&lt;write&gt;bob&lt;/write&gt; &lt;write&gt;bob&lt;/write&gt;
@@ -120,28 +120,28 @@ This task can be rewritten as:
&lt;write&gt;ls&lt;/write&gt; &lt;write&gt;ls&lt;/write&gt;
&lt;read&gt;/home/bob&lt;/read&gt; &lt;read&gt;/home/bob&lt;/read&gt;
&lt;/telnet&gt; &lt;/telnet&gt;
</pre></blockquote>
</pre>


A timeout can be specified at the <code>&lt;telnet&gt;</code> level or at the <code>&lt;read&gt;</code> level. A timeout can be specified at the <code>&lt;telnet&gt;</code> level or at the <code>&lt;read&gt;</code> level.
This will connect, issue a sleep command that is suppressed from displaying and wait This will connect, issue a sleep command that is suppressed from displaying and wait
10 seconds before quitting. 10 seconds before quitting.
<blockquote><pre>
<pre>
&lt;telnet userid=&quot;bob&quot; password=&quot;badpass&quot; server=&quot;localhost&quot; timeout=&quot;20&quot;&gt; &lt;telnet userid=&quot;bob&quot; password=&quot;badpass&quot; server=&quot;localhost&quot; timeout=&quot;20&quot;&gt;
&lt;read&gt;/home/bob&lt;/read&gt; &lt;read&gt;/home/bob&lt;/read&gt;
&lt;write echo=&quot;false&quot;&gt;sleep 15&lt;/write&gt; &lt;write echo=&quot;false&quot;&gt;sleep 15&lt;/write&gt;
&lt;read timeout=&quot;10&quot;&gt;/home/bob&lt;/read&gt; &lt;read timeout=&quot;10&quot;&gt;/home/bob&lt;/read&gt;
&lt;/telnet&gt; &lt;/telnet&gt;
</pre></blockquote>
</pre>


The task can be used with other ports as well: The task can be used with other ports as well:
<blockquote><pre>
<pre>
&lt;telnet port=&quot;80&quot; server=&quot;localhost&quot; timeout=&quot;20&quot;&gt; &lt;telnet port=&quot;80&quot; server=&quot;localhost&quot; timeout=&quot;20&quot;&gt;
&lt;read/&gt; &lt;read/&gt;
&lt;write&gt;GET / http/0.9&lt;/write&gt; &lt;write&gt;GET / http/0.9&lt;/write&gt;
&lt;write/&gt; &lt;write/&gt;
&lt;read timeout=&quot;10&quot;&gt;&amp;lt;/HTML&amp;gt;&lt;/read&gt; &lt;read timeout=&quot;10&quot;&gt;&amp;lt;/HTML&amp;gt;&lt;/read&gt;
&lt;/telnet&gt; &lt;/telnet&gt;
</pre></blockquote>
</pre>
<p> <p>
To use this task against the WinNT telnet service, you need to configure the service to use To use this task against the WinNT telnet service, you need to configure the service to use
classic authentication rather than NTLM negotiated authentication. classic authentication rather than NTLM negotiated authentication.


+ 7
- 19
manual/Tasks/unpack.html View File

@@ -66,32 +66,22 @@ resource collection</h4>
<p>The specified resource will be used as src.</p> <p>The specified resource will be used as src.</p>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
&lt;gunzip src=&quot;test.tar.gz&quot;/&gt;
</pre></blockquote>
<pre>&lt;gunzip src=&quot;test.tar.gz&quot;/&gt;</pre>
<p>expands <i>test.tar.gz</i> to <i>test.tar</i></p> <p>expands <i>test.tar.gz</i> to <i>test.tar</i></p>
<blockquote><pre>
&lt;bunzip2 src=&quot;test.tar.bz2&quot;/&gt;
</pre></blockquote>
<pre>&lt;bunzip2 src=&quot;test.tar.bz2&quot;/&gt;</pre>
<p>expands <i>test.tar.bz2</i> to <i>test.tar</i></p> <p>expands <i>test.tar.bz2</i> to <i>test.tar</i></p>
<blockquote><pre>
&lt;unxz src=&quot;test.tar.xz&quot;/&gt;
</pre></blockquote>
<pre>&lt;unxz src=&quot;test.tar.xz&quot;/&gt;</pre>
<p>expands <i>test.tar.xz</i> to <i>test.tar</i></p> <p>expands <i>test.tar.xz</i> to <i>test.tar</i></p>
<blockquote><pre>
&lt;gunzip src=&quot;test.tar.gz&quot; dest=&quot;test2.tar&quot;/&gt;
</pre></blockquote>
<pre>&lt;gunzip src=&quot;test.tar.gz&quot; dest=&quot;test2.tar&quot;/&gt;</pre>
<p>expands <i>test.tar.gz</i> to <i>test2.tar</i></p> <p>expands <i>test.tar.gz</i> to <i>test2.tar</i></p>
<blockquote><pre>
&lt;gunzip src=&quot;test.tar.gz&quot; dest=&quot;subdir&quot;/&gt;
</pre></blockquote>
<pre>&lt;gunzip src=&quot;test.tar.gz&quot; dest=&quot;subdir&quot;/&gt;</pre>
<p>expands <i>test.tar.gz</i> to <i>subdir/test.tar</i> (assuming <p>expands <i>test.tar.gz</i> to <i>subdir/test.tar</i> (assuming
subdir is a directory).</p> subdir is a directory).</p>
<blockquote><pre>
<pre>
&lt;gunzip dest=&quot;.&quot;&gt; &lt;gunzip dest=&quot;.&quot;&gt;
&lt;url url="http://example.org/archive.tar.gz"/&gt; &lt;url url="http://example.org/archive.tar.gz"/&gt;
&lt;/gunzip&gt; &lt;/gunzip&gt;
</pre></blockquote>
</pre>
<p>downloads <i>http://example.org/archive.tar.gz</i> and expands it <p>downloads <i>http://example.org/archive.tar.gz</i> and expands it
to <i>archive.tar</i> in the project's basedir on the fly.</p> to <i>archive.tar</i> in the project's basedir on the fly.</p>


@@ -100,9 +90,7 @@ to <i>archive.tar</i> in the project's basedir on the fly.</p>
<pre> <pre>
&lt;gunzip src="some-archive.gz" dest="some-dest-dir"/&gt; &lt;gunzip src="some-archive.gz" dest="some-dest-dir"/&gt;
</pre> </pre>

is identical to is identical to

<pre> <pre>
&lt;copy todir="some-dest-dir"&gt; &lt;copy todir="some-dest-dir"&gt;
&lt;gzipresource&gt; &lt;gzipresource&gt;


+ 2
- 3
manual/Tasks/verifyjar.html View File

@@ -126,12 +126,11 @@ supported
</tr> </tr>
</table> </table>



<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;verifyjar jar=&quot;${dist}/lib/ant.jar&quot; &lt;verifyjar jar=&quot;${dist}/lib/ant.jar&quot;
alias=&quot;apache-group&quot; storepass=&quot;secret&quot;/&gt; alias=&quot;apache-group&quot; storepass=&quot;secret&quot;/&gt;
</pre></blockquote>
</pre>
<p> <p>
verifies the ant.jar with alias &quot;apache-group&quot; accessing the verifies the ant.jar with alias &quot;apache-group&quot; accessing the
keystore and private key via &quot;secret&quot; password. keystore and private key via &quot;secret&quot; password.


+ 24
- 28
manual/Tasks/vss.html View File

@@ -198,7 +198,7 @@ label only one will be used in the order version, date, label.</p>
</table> </table>
<p>Note that only one of version, date or label should be specified</p> <p>Note that only one of version, date or label should be specified</p>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;vssget localPath=&quot;C:\mysrc\myproject&quot; &lt;vssget localPath=&quot;C:\mysrc\myproject&quot;
recursive=&quot;true&quot; recursive=&quot;true&quot;
@@ -207,7 +207,7 @@ label only one will be used in the order version, date, label.</p>
vsspath=&quot;$/source/aProject&quot; vsspath=&quot;$/source/aProject&quot;
writable=&quot;true&quot;/&gt; writable=&quot;true&quot;/&gt;
</pre> </pre>
</blockquote>
<p>Does a get on the VSS-Project <i>$/source/myproject</i> using the username <p>Does a get on the VSS-Project <i>$/source/myproject</i> using the username
<i>me</i> and the password <i>mypassword</i>. It will recursively get the files <i>me</i> and the password <i>mypassword</i>. It will recursively get the files
which are labeled <i>Release1</i> and write them to the local directory which are labeled <i>Release1</i> and write them to the local directory
@@ -282,24 +282,24 @@ project.</p>
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;vsslabel vsspath=&quot;$/source/aProject&quot; &lt;vsslabel vsspath=&quot;$/source/aProject&quot;
login=&quot;me,mypassword&quot; login=&quot;me,mypassword&quot;
label=&quot;Release1&quot;/&gt; label=&quot;Release1&quot;/&gt;
</pre> </pre>
</blockquote>
<p>Labels the current version of the VSS project <i>$/source/aProject</i> with <p>Labels the current version of the VSS project <i>$/source/aProject</i> with
the label <i>Release1</i> using the username <i>me</i> and the password the label <i>Release1</i> using the username <i>me</i> and the password
<i>mypassword</i>. <i>mypassword</i>.
</p> </p>
<blockquote>
<pre> <pre>
&lt;vsslabel vsspath=&quot;$/source/aProject/myfile.txt&quot; &lt;vsslabel vsspath=&quot;$/source/aProject/myfile.txt&quot;
version=&quot;4&quot; version=&quot;4&quot;
label=&quot;1.03.004&quot;/&gt; label=&quot;1.03.004&quot;/&gt;
</pre> </pre>
</blockquote>
<p>Labels version 4 of the VSS file <i>$/source/aProject/myfile.txt</i> with the <p>Labels version 4 of the VSS file <i>$/source/aProject/myfile.txt</i> with the
label <i>1.03.004</i>. If this version already has a label, the operation (and label <i>1.03.004</i>. If this version already has a label, the operation (and
the build) will fail. the build) will fail.
@@ -414,25 +414,25 @@ Task to perform HISTORY commands to Microsoft Visual SourceSafe.




<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;vsshistory vsspath=&quot;$/myProject&quot; recursive=&quot;true&quot; &lt;vsshistory vsspath=&quot;$/myProject&quot; recursive=&quot;true&quot;
fromLabel=&quot;Release1&quot; fromLabel=&quot;Release1&quot;
toLabel=&quot;Release2&quot;/&gt; toLabel=&quot;Release2&quot;/&gt;
</pre> </pre>
</blockquote>
<p>Shows all changes between &quot;Release1&quot; and &quot;Release2&quot;.</p> <p>Shows all changes between &quot;Release1&quot; and &quot;Release2&quot;.</p>


<blockquote>
<pre> <pre>
&lt;vsshistory vsspath=&quot;$/myProject&quot; recursive=&quot;true&quot; &lt;vsshistory vsspath=&quot;$/myProject&quot; recursive=&quot;true&quot;
fromDate=&quot;01.01.2001&quot; fromDate=&quot;01.01.2001&quot;
toDate=&quot;31.03.2001&quot;/&gt; toDate=&quot;31.03.2001&quot;/&gt;
</pre> </pre>
</blockquote>
<p>Shows all changes between January 1st 2001 and March 31st 2001 (in Germany, date must be specified according to your locale).</p> <p>Shows all changes between January 1st 2001 and March 31st 2001 (in Germany, date must be specified according to your locale).</p>


<blockquote>
<pre> <pre>
&lt;tstamp&gt; &lt;tstamp&gt;
&lt;format property=&quot;to.tstamp&quot; pattern=&quot;M-d-yy;h:mma&quot;/&gt; &lt;format property=&quot;to.tstamp&quot; pattern=&quot;M-d-yy;h:mma&quot;/&gt;
@@ -443,7 +443,7 @@ Task to perform HISTORY commands to Microsoft Visual SourceSafe.
dateFormat=&quot;M-d-yy;h:mma&quot; dateFormat=&quot;M-d-yy;h:mma&quot;
toDate=&quot;${to.tstamp}&quot;/&gt; toDate=&quot;${to.tstamp}&quot;/&gt;
</pre> </pre>
</blockquote>
<p>Shows all changes in the 14 days before today.</p> <p>Shows all changes in the 14 days before today.</p>
<hr> <hr>


@@ -517,13 +517,13 @@ Task to perform CHECKIN commands to Microsoft Visual SourceSafe.
</table> </table>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;vsscheckin vsspath=&quot;$/test/test*&quot; &lt;vsscheckin vsspath=&quot;$/test/test*&quot;
localpath=&quot;D:\build\&quot; localpath=&quot;D:\build\&quot;
comment=&quot;Modified by automatic build&quot;/&gt; comment=&quot;Modified by automatic build&quot;/&gt;
</pre> </pre>
</blockquote>
<p>Checks in the file(s) named <i>test*</i> in the project <i>$/test</i> using <p>Checks in the file(s) named <i>test*</i> in the project <i>$/test</i> using
the local directory <i>D:\build</i>.</p> the local directory <i>D:\build</i>.</p>
<hr> <hr>
@@ -621,14 +621,14 @@ label only one will be used in the order version, date, label.</p>
</table> </table>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;vsscheckout vsspath=&quot;$/test&quot; &lt;vsscheckout vsspath=&quot;$/test&quot;
localpath=&quot;D:\build&quot; localpath=&quot;D:\build&quot;
recursive=&quot;true&quot; recursive=&quot;true&quot;
login=&quot;me,mypass&quot;/&gt; login=&quot;me,mypass&quot;/&gt;
</pre> </pre>
</blockquote>
<p>Does a recursive checkout of the project <i>$/test</i> to the directory D:\build. <p>Does a recursive checkout of the project <i>$/test</i> to the directory D:\build.
</p> </p>
<hr> <hr>
@@ -697,12 +697,12 @@ Task to perform ADD commands to Microsoft Visual SourceSafe.
</table> </table>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre> <pre>
&lt;vssadd localpath=&quot;D:\build\build.00012.zip&quot; &lt;vssadd localpath=&quot;D:\build\build.00012.zip&quot;
comment=&quot;Added by automatic build&quot;/&gt; comment=&quot;Added by automatic build&quot;/&gt;
</pre> </pre>
</blockquote>
<p>Add the file named build.00012.zip into the project current working <p>Add the file named build.00012.zip into the project current working
directory (see vsscp).</p> directory (see vsscp).</p>
<hr> <hr>
@@ -753,11 +753,9 @@ directory (see vsscp).</p>
</table> </table>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre>
&lt;vsscp vsspath=&quot;$/Projects/ant&quot;/&gt;
</pre>
</blockquote>

<pre>&lt;vsscp vsspath=&quot;$/Projects/ant&quot;/&gt;</pre>

<p>Sets the current VSS project to <i>$/Projects/ant</i>.</p> <p>Sets the current VSS project to <i>$/Projects/ant</i>.</p>
<hr> <hr>


@@ -811,11 +809,9 @@ directory (see vsscp).</p>
</tr> </tr>
</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre>
&lt;vsscreate vsspath=&quot;$/existingProject/newProject&quot;/&gt;
</pre>
</blockquote>

<pre>&lt;vsscreate vsspath=&quot;$/existingProject/newProject&quot;/&gt;</pre>

<p>Creates the VSS-Project <i>$/existingProject/newProject</i>.</p> <p>Creates the VSS-Project <i>$/existingProject/newProject</i>.</p>


</body> </body>


+ 6
- 6
manual/Tasks/waitfor.html View File

@@ -102,27 +102,27 @@ true within the specified time.</p>
<a href="conditions.html">here</a> for the full list.</p> <a href="conditions.html">here</a> for the full list.</p>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;waitfor maxwait="30" maxwaitunit="second"&gt; &lt;waitfor maxwait="30" maxwaitunit="second"&gt;
&lt;available file="errors.log"/&gt; &lt;available file="errors.log"/&gt;
&lt;/waitfor&gt; &lt;/waitfor&gt;
</pre></blockquote>
</pre>
<p>waits up to 30 seconds for a file called errors.log to appear.</p> <p>waits up to 30 seconds for a file called errors.log to appear.</p>
<blockquote><pre>
<pre>
&lt;waitfor maxwait="3" maxwaitunit="minute" checkevery="500"&gt; &lt;waitfor maxwait="3" maxwaitunit="minute" checkevery="500"&gt;
&lt;http url="http://localhost/myapp/index.html"/&gt; &lt;http url="http://localhost/myapp/index.html"/&gt;
&lt;/waitfor&gt; &lt;/waitfor&gt;
</pre></blockquote>
</pre>
<p>waits up to 3 minutes (and checks every 500 milliseconds) for a web server on localhost <p>waits up to 3 minutes (and checks every 500 milliseconds) for a web server on localhost
to serve up the specified URL.</p> to serve up the specified URL.</p>
<blockquote><pre>
<pre>
&lt;waitfor maxwait="10" maxwaitunit="second"&gt; &lt;waitfor maxwait="10" maxwaitunit="second"&gt;
&lt;and&gt; &lt;and&gt;
&lt;socket server="dbserver" port="1521"/&gt; &lt;socket server="dbserver" port="1521"/&gt;
&lt;http url="http://webserver/mypage.html"/&gt; &lt;http url="http://webserver/mypage.html"/&gt;
&lt;/and&gt; &lt;/and&gt;
&lt;/waitfor&gt; &lt;/waitfor&gt;
</pre></blockquote>
</pre>
<p>waits up to 10 seconds for a server on the dbserver machine to begin listening <p>waits up to 10 seconds for a server on the dbserver machine to begin listening
on port 1521 and for the http://webserver/mypage.html web page on port 1521 and for the http://webserver/mypage.html web page
to become available.</p> to become available.</p>


+ 6
- 6
manual/Tasks/whichresource.html View File

@@ -31,9 +31,9 @@
The named property is set if the item can be found. The named property is set if the item can be found.
For example: For example:
</p> </p>
<blockquote><pre>
<pre>
&lt;whichresource resource="/log4j.properties" property="log4j.url" &gt; &lt;whichresource resource="/log4j.properties" property="log4j.url" &gt;
</pre></blockquote>
</pre>
<h3>Parameters</h3> <h3>Parameters</h3>
<table> <table>
<tr> <tr>
@@ -91,7 +91,7 @@
<p> <p>
The following shows using a classpath reference. The following shows using a classpath reference.
</p> </p>
<blockquote><pre>
<pre>
&lt;path id="bsf.classpath"&gt; &lt;path id="bsf.classpath"&gt;
&lt;fileset dir="${user.home}/lang/bsf" includes="*.jar"/&gt; &lt;fileset dir="${user.home}/lang/bsf" includes="*.jar"/&gt;
&lt;/path&gt; &lt;/path&gt;
@@ -99,11 +99,11 @@
class="org.apache.bsf.BSFManager" class="org.apache.bsf.BSFManager"
classpathref="bsf.classpath"/&gt; classpathref="bsf.classpath"/&gt;
&lt;echo&gt;${bsf.class.location}&lt;/echo&gt; &lt;echo&gt;${bsf.class.location}&lt;/echo&gt;
</pre></blockquote>
</pre>
<p> <p>
The following shows using a nested classpath. The following shows using a nested classpath.
</p> </p>
<blockquote><pre>
<pre>
&lt;whichresource &lt;whichresource
property="ant-contrib.antlib.location" property="ant-contrib.antlib.location"
resource="net/sf/antcontrib/antlib.xml"&gt; resource="net/sf/antcontrib/antlib.xml"&gt;
@@ -112,6 +112,6 @@
&lt;/classpath&gt; &lt;/classpath&gt;
&lt;/whichresource&gt; &lt;/whichresource&gt;
&lt;echo&gt;${ant-contrib.antlib.location}&lt;/echo&gt; &lt;echo&gt;${ant-contrib.antlib.location}&lt;/echo&gt;
</pre></blockquote>
</pre>
</body> </body>
</html> </html>

+ 18
- 43
manual/Types/antlib.html View File

@@ -25,7 +25,6 @@
<body> <body>
<h2 id="antlib">Antlib</h2> <h2 id="antlib">Antlib</h2>



<h3>Description</h3> <h3>Description</h3>
<p> <p>
An antlib file is an xml file with a root element of "antlib". An antlib file is an xml file with a root element of "antlib".
@@ -53,8 +52,7 @@
A group of tasks and types may be defined together in an antlib 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: file. For example the file <i>sample.xml</i> contains the following:
</p> </p>
<blockquote>
<pre>
<pre>
&lt;?xml version="1.0"?&gt; &lt;?xml version="1.0"?&gt;
&lt;antlib&gt; &lt;antlib&gt;
&lt;typedef name="if" classname="org.acme.ant.If"/&gt; &lt;typedef name="if" classname="org.acme.ant.If"/&gt;
@@ -70,17 +68,14 @@
&lt;/sequential&gt; &lt;/sequential&gt;
&lt;/macrodef&gt; &lt;/macrodef&gt;
&lt;/antlib&gt; &lt;/antlib&gt;
</pre>
</blockquote>
</pre>
<p> <p>
It defines two types or tasks, <i>if</i> and <i>scriptpathmapper</i>. 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: This antlib file may be used in a build script as follows:
</p> </p>
<blockquote>
<pre>
<pre>
&lt;typedef file="sample.xml"/&gt; &lt;typedef file="sample.xml"/&gt;
</pre>
</blockquote>
</pre>
<p> <p>
The other attributes of <code>&lt;typedef&gt;</code> may be used as well. The other attributes of <code>&lt;typedef&gt;</code> may be used as well.
For example, assuming that the <i>sample.xml</i> is in a jar For example, assuming that the <i>sample.xml</i> is in a jar
@@ -88,25 +83,20 @@
following build fragment will define the <i>if</i> and <i>scriptpathmapper</i> 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>. tasks/types and place them in the namespace uri <i>samples:/acme.org</i>.
</p> </p>
<blockquote>
<pre>
<pre>
&lt;typedef resource="org/acme/ant/sample.xml" &lt;typedef resource="org/acme/ant/sample.xml"
uri="samples:/acme.org"/&gt; uri="samples:/acme.org"/&gt;
</pre>
</blockquote>
</pre>
<p> <p>
The definitions may then be used as follows: The definitions may then be used as follows:
</p> </p>
<blockquote>
<pre>
<pre>
&lt;sample:if valuetrue="${props}" xmlns:sample="samples:/acme.org"&gt; &lt;sample:if valuetrue="${props}" xmlns:sample="samples:/acme.org"&gt;
&lt;sample:scriptpathmapper language="beanshell"&gt; &lt;sample:scriptpathmapper language="beanshell"&gt;
some bean shell some bean shell
&lt;/sample:scriptpathmapper&gt; &lt;/sample:scriptpathmapper&gt;
&lt;/sample:if&gt; &lt;/sample:if&gt;
</pre>
</blockquote>

</pre>


<h3 id="antlibnamespace">Antlib namespace</h3> <h3 id="antlibnamespace">Antlib namespace</h3>
<p> <p>
@@ -125,8 +115,7 @@
defined, the following build file will automatically load the antcontrib defined, the following build file will automatically load the antcontrib
definitions at location <i>HERE</i>: definitions at location <i>HERE</i>:
</p> </p>
<blockquote>
<pre>
<pre>
&lt;project default="deletetest" xmlns:antcontrib="antlib:net.sf.antcontrib"&gt; &lt;project default="deletetest" xmlns:antcontrib="antlib:net.sf.antcontrib"&gt;
&lt;macrodef name="showdir"&gt; &lt;macrodef name="showdir"&gt;
&lt;attribute name="dir"/&gt; &lt;attribute name="dir"/&gt;
@@ -148,22 +137,18 @@
&lt;showdir dir="a"/&gt; &lt;showdir dir="a"/&gt;
&lt;/target&gt; &lt;/target&gt;
&lt;/project&gt; &lt;/project&gt;
</pre>
</blockquote>
</pre>
<p> <p>
The requirement that the resource is in the default classpath 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.
</p> </p>


<h3 id="loadFromInside">Load antlib from inside of the buildfile</h3> <h3 id="loadFromInside">Load antlib from inside of the buildfile</h3>
<p> <p>
If you want to separate the antlib from your local Ant installation, e.g. because you 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 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>&lt;taskdef&gt;</tt>. that Ant could find that jar. The best solution is loading the antlib with <tt>&lt;taskdef&gt;</tt>.
</p> </p>
<blockquote>
<pre>
<pre>
&lt;project xmlns:<font color="green">antcontrib</font>="<font color="red">antlib:net.sf.antcontrib</font>"&gt; &lt;project xmlns:<font color="green">antcontrib</font>="<font color="red">antlib:net.sf.antcontrib</font>"&gt;
&lt;taskdef uri="<font color="red">antlib:net.sf.antcontrib</font>" &lt;taskdef uri="<font color="red">antlib:net.sf.antcontrib</font>"
resource="net/sf/antcontrib/antlib.xml" resource="net/sf/antcontrib/antlib.xml"
@@ -178,9 +163,7 @@
&lt;/antcontrib:for&gt; &lt;/antcontrib:for&gt;
&lt;/target&gt; &lt;/target&gt;
&lt;/project&gt; &lt;/project&gt;
</pre>
</blockquote>

</pre>
<h3 id="currentnamespace">Current namespace</h3> <h3 id="currentnamespace">Current namespace</h3>
<p> <p>
Definitions defined in antlibs may be used in antlibs. However Definitions defined in antlibs may be used in antlibs. However
@@ -192,8 +175,7 @@
type <code>&lt;isallowed&gt;</code> and a macro type <code>&lt;isallowed&gt;</code> and a macro
<code>&lt;ifallowed&gt;</code> that makes use of the task and type: <code>&lt;ifallowed&gt;</code> that makes use of the task and type:
</p> </p>
<blockquote>
<pre>
<pre>
&lt;antlib xmlns:current="ant:current"&gt; &lt;antlib xmlns:current="ant:current"&gt;
&lt;taskdef name="if" classname="org.acme.ant.If"/&gt; &lt;taskdef name="if" classname="org.acme.ant.If"/&gt;
&lt;typedef name="isallowed" classname="org.acme.ant.Isallowed"/&gt; &lt;typedef name="isallowed" classname="org.acme.ant.Isallowed"/&gt;
@@ -210,10 +192,7 @@
&lt;/sequential&gt; &lt;/sequential&gt;
&lt;/macrodef&gt; &lt;/macrodef&gt;
&lt;/antlib&gt; &lt;/antlib&gt;
</pre>
</blockquote>


</pre>
<h3>Other examples and comments</h3> <h3>Other examples and comments</h3>
<p> <p>
Antlibs may make use of other antlibs. Antlibs may make use of other antlibs.
@@ -226,8 +205,7 @@
following antlib may be used to define defaults for various following antlib may be used to define defaults for various
tasks: tasks:
</p> </p>
<blockquote>
<pre>
<pre>
&lt;antlib xmlns:antcontrib="antlib:net.sf.antcontrib"&gt; &lt;antlib xmlns:antcontrib="antlib:net.sf.antcontrib"&gt;
&lt;presetdef name="javac"&gt; &lt;presetdef name="javac"&gt;
&lt;javac deprecation="${deprecation}" &lt;javac deprecation="${deprecation}"
@@ -240,21 +218,18 @@
&lt;antcontrib:shellscript shell="bash"/&gt; &lt;antcontrib:shellscript shell="bash"/&gt;
&lt;/presetdef&gt; &lt;/presetdef&gt;
&lt;/antlib&gt; &lt;/antlib&gt;
</pre>
</blockquote>
</pre>
<p> <p>
This may be used as follows: This may be used as follows:
</p> </p>
<blockquote>
<pre>
<pre>
&lt;project xmlns:local="localpresets"&gt; &lt;project xmlns:local="localpresets"&gt;
&lt;typedef file="localpresets.xml" uri="localpresets"/&gt; &lt;typedef file="localpresets.xml" uri="localpresets"/&gt;
&lt;local:shellscript&gt; &lt;local:shellscript&gt;
echo "hello world" echo "hello world"
&lt;/local:shellscript&gt; &lt;/local:shellscript&gt;
&lt;/project&gt; &lt;/project&gt;
</pre>
</blockquote>
</pre>


</body> </body>
</html> </html>

+ 6
- 6
manual/Types/classfileset.html View File

@@ -85,28 +85,28 @@ relative location of the classfile in the fileset. So, the file
<code>org.apache.tools.ant.Project</code>.</p> <code>org.apache.tools.ant.Project</code>.</p>


<h4>Examples</h4> <h4>Examples</h4>
<blockquote><pre>
<pre>
&lt;classfileset id=&quot;reqdClasses" dir=&quot;${classes.dir}&quot;&gt; &lt;classfileset id=&quot;reqdClasses" dir=&quot;${classes.dir}&quot;&gt;
&lt;root classname=&quot;org.apache.tools.ant.Project&quot;/&gt; &lt;root classname=&quot;org.apache.tools.ant.Project&quot;/&gt;
&lt;/classfileset&gt; &lt;/classfileset&gt;
</pre></blockquote>
</pre>


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


<blockquote><pre>
<pre>
&lt;jar destfile=&quot;minimal.jar&quot;&gt; &lt;jar destfile=&quot;minimal.jar&quot;&gt;
&lt;fileset refid=&quot;reqdClasses&quot;/&gt; &lt;fileset refid=&quot;reqdClasses&quot;/&gt;
&lt;/jar&gt; &lt;/jar&gt;
</pre></blockquote>
</pre>


<blockquote><pre>
<pre>
&lt;classfileset id=&quot;reqdClasses&quot; dir=&quot;${classes.dir}&quot;&gt; &lt;classfileset id=&quot;reqdClasses&quot; dir=&quot;${classes.dir}&quot;&gt;
&lt;rootfileset dir=&quot;${classes.dir}&quot; includes=&quot;org/apache/tools/ant/Project*.class&quot;/&gt; &lt;rootfileset dir=&quot;${classes.dir}&quot; includes=&quot;org/apache/tools/ant/Project*.class&quot;/&gt;
&lt;/classfileset&gt; &lt;/classfileset&gt;
</pre></blockquote>
</pre>


<p>This example constructs the classfileset using all the class with names starting with Project <p>This example constructs the classfileset using all the class with names starting with Project
in the org.apache.tools.ant package</p> in the org.apache.tools.ant package</p>


+ 27
- 53
manual/Types/custom-programming.html View File

@@ -64,8 +64,7 @@
For example a custom condition that returns true if a For example a custom condition that returns true if a
string is all upper case could be written as: string is all upper case could be written as:
</p> </p>
<blockquote>
<pre>
<pre>
package com.mydomain; package com.mydomain;


import org.apache.tools.ant.BuildException; import org.apache.tools.ant.BuildException;
@@ -87,31 +86,25 @@ public class AllUpperCaseCondition implements Condition {
return value.toUpperCase().equals(value); return value.toUpperCase().equals(value);
} }
} }
</pre>
</blockquote>

</pre>
<p> <p>
Adding the condition to the system is achieved as follows: Adding the condition to the system is achieved as follows:
</p> </p>
<blockquote>
<pre>
<pre>
&lt;typedef &lt;typedef
name="alluppercase" name="alluppercase"
classname="com.mydomain.AllUpperCaseCondition" classname="com.mydomain.AllUpperCaseCondition"
classpath="${mydomain.classes}"/&gt; classpath="${mydomain.classes}"/&gt;
</pre>
</blockquote>
</pre>
<p> <p>
This condition can now be used wherever a Core Ant condition This condition can now be used wherever a Core Ant condition
is used. is used.
</p> </p>
<blockquote>
<pre>
<pre>
&lt;condition property="allupper"&gt; &lt;condition property="allupper"&gt;
&lt;alluppercase value="THIS IS ALL UPPER CASE"/&gt; &lt;alluppercase value="THIS IS ALL UPPER CASE"/&gt;
&lt;/condition&gt; &lt;/condition&gt;
</pre>
</blockquote>
</pre>
<h3 id="customselectors">Custom Selectors</h3> <h3 id="customselectors">Custom Selectors</h3>
<p> <p>
Custom selectors are datatypes that implement Custom selectors are datatypes that implement
@@ -128,8 +121,7 @@ public class AllUpperCaseCondition implements Condition {
An example of a custom selection that selects filenames ending An example of a custom selection that selects filenames ending
in ".java" would be: in ".java" would be:
</p> </p>
<blockquote>
<pre>
<pre>
package com.mydomain; package com.mydomain;
import java.io.File; import java.io.File;
import org.apache.tools.ant.types.selectors.FileSelector; import org.apache.tools.ant.types.selectors.FileSelector;
@@ -138,34 +130,28 @@ public class JavaSelector implements FileSelector {
return filename.toLowerCase().endsWith(".java"); return filename.toLowerCase().endsWith(".java");
} }
} }
</pre>
</blockquote>
</pre>
<p> <p>
Adding the selector to the system is achieved as follows: Adding the selector to the system is achieved as follows:
</p> </p>
<blockquote>
<pre>
<pre>
&lt;typedef &lt;typedef
name="javaselector" name="javaselector"
classname="com.mydomain.JavaSelector" classname="com.mydomain.JavaSelector"
classpath="${mydomain.classes}"/&gt; classpath="${mydomain.classes}"/&gt;
</pre>
</blockquote>
<p>
</pre>
<p>
This selector can now be used wherever a Core Ant selector This selector can now be used wherever a Core Ant selector
is used, for example: is used, for example:
</p> </p>
<blockquote>
<pre>
<pre>
&lt;copy todir="to"&gt; &lt;copy todir="to"&gt;
&lt;fileset dir="src"&gt; &lt;fileset dir="src"&gt;
&lt;javaselector/&gt; &lt;javaselector/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
&lt;/copy&gt; &lt;/copy&gt;
</pre>
</blockquote>

<p>
</pre>
<p>
One may use One may use
<code>org.apache.tools.ant.types.selectors.BaseSelector</code>, <code>org.apache.tools.ant.types.selectors.BaseSelector</code>,
a convenience class that provides reasonable default a convenience class that provides reasonable default
@@ -197,8 +183,7 @@ public class JavaSelector implements FileSelector {
if a certain number of contained selectors select, one could write if a certain number of contained selectors select, one could write
a selector as follows: a selector as follows:
</p> </p>
<blockquote>
<pre>
<pre>
public class MatchNumberSelectors extends BaseSelectorContainer { public class MatchNumberSelectors extends BaseSelectorContainer {
private int number = -1; private int number = -1;
public void setNumber(int number) { public void setNumber(int number) {
@@ -221,13 +206,11 @@ public class MatchNumberSelectors extends BaseSelectorContainer {
return numberSelected == number; return numberSelected == number;
} }
} }
</pre>
</blockquote>
</pre>
<p> <p>
To define and use this selector one could do: To define and use this selector one could do:
</p> </p>
<blockquote>
<pre>
<pre>
&lt;typedef name="numberselected" &lt;typedef name="numberselected"
classname="com.mydomain.MatchNumberSelectors"/&gt; classname="com.mydomain.MatchNumberSelectors"/&gt;
... ...
@@ -238,8 +221,7 @@ public class MatchNumberSelectors extends BaseSelectorContainer {
&lt;javaselector/&gt; &lt;javaselector/&gt;
&lt;/numberselected&gt; &lt;/numberselected&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre>
</blockquote>
</pre>
<p> <p>
<i>The custom selector</i> <i>The custom selector</i>
</p> </p>
@@ -250,7 +232,7 @@ public class MatchNumberSelectors extends BaseSelectorContainer {
<p>You can write your own selectors and use them within the selector <p>You can write your own selectors and use them within the selector
containers by specifying them within the <code>&lt;custom&gt;</code> tag.</p> containers by specifying them within the <code>&lt;custom&gt;</code> tag.</p>


<p>To create a new Custom Selector, you have to create a class that
<p>To create a new Custom Selector, you have to create a class that
implements implements
<code>org.apache.tools.ant.types.selectors.ExtendFileSelector</code>. <code>org.apache.tools.ant.types.selectors.ExtendFileSelector</code>.
The easiest way to do that is through the convenience base class The easiest way to do that is through the convenience base class
@@ -305,15 +287,13 @@ public class MatchNumberSelectors extends BaseSelectorContainer {
<p>Here is how you use <code>&lt;custom&gt;</code> to <p>Here is how you use <code>&lt;custom&gt;</code> to
use your class as a selector: use your class as a selector:
</p> </p>

<blockquote><pre>
<pre>
&lt;fileset dir="${mydir}" includes="**/*"&gt; &lt;fileset dir="${mydir}" includes="**/*"&gt;
&lt;custom classname="com.mydomain.MySelector"&gt; &lt;custom classname="com.mydomain.MySelector"&gt;
&lt;param name="myattribute" value="myvalue"/&gt; &lt;param name="myattribute" value="myvalue"/&gt;
&lt;/custom&gt; &lt;/custom&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>

</pre>
<p>The core selectors that can also be used as custom selectors <p>The core selectors that can also be used as custom selectors
are</p> are</p>


@@ -337,15 +317,13 @@ public class MatchNumberSelectors extends BaseSelectorContainer {


<p>Here is the example from the Depth Selector section rewritten <p>Here is the example from the Depth Selector section rewritten
to use the selector through <code>&lt;custom&gt;</code>.</p> to use the selector through <code>&lt;custom&gt;</code>.</p>

<blockquote><pre>
<pre>
&lt;fileset dir="${doc.path}" includes="**/*"&gt; &lt;fileset dir="${doc.path}" includes="**/*"&gt;
&lt;custom classname="org.apache.tools.ant.types.selectors.DepthSelector"&gt; &lt;custom classname="org.apache.tools.ant.types.selectors.DepthSelector"&gt;
&lt;param name="max" value="1"/&gt; &lt;param name="max" value="1"/&gt;
&lt;/custom&gt; &lt;/custom&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>

</pre>
<p>Selects all files in the base directory and one directory below <p>Selects all files in the base directory and one directory below
that.</p> that.</p>


@@ -363,8 +341,7 @@ public class MatchNumberSelectors extends BaseSelectorContainer {
For example a filterreader that removes every second character For example a filterreader that removes every second character
could be: could be:
</p> </p>
<blockquote>
<pre>
<pre>
public class RemoveOddCharacters implements ChainableReader { public class RemoveOddCharacters implements ChainableReader {
public Reader chain(Reader reader) { public Reader chain(Reader reader) {
return new BaseFilterReader(reader) { return new BaseFilterReader(reader) {
@@ -384,8 +361,7 @@ public class RemoveOddCharacters implements ChainableReader {
} }
} }
} }
</pre>
</blockquote>
</pre>
<p> <p>
For line oriented filters it may be easier to extend For line oriented filters it may be easier to extend
<code>ChainableFilterReader</code> an inner class of <code>ChainableFilterReader</code> an inner class of
@@ -394,8 +370,7 @@ public class RemoveOddCharacters implements ChainableReader {
<p> <p>
For example a filter that appends the line number could be For example a filter that appends the line number could be
</p> </p>
<blockquote>
<pre>
<pre>
public class AddLineNumber extends ChainableReaderFilter { public class AddLineNumber extends ChainableReaderFilter {
private void lineNumber = 0; private void lineNumber = 0;
public String filter(String string) { public String filter(String string) {
@@ -403,8 +378,7 @@ public class AddLineNumber extends ChainableReaderFilter {
return "" + lineNumber + "\t" + string; return "" + lineNumber + "\t" + string;
} }
} }
</pre>
</blockquote>
</pre>


</body> </body>
</html> </html>

+ 10
- 11
manual/Types/dirset.html View File

@@ -98,9 +98,8 @@ equivalent to an <code>&lt;and&gt;</code> selector container.</p>
Specify what happens if the base directory does not exist. Specify what happens if the base directory does not exist.
If true a build error will happen, if false, the dirset If true a build error will happen, if false, the dirset
will be ignored/empty. will be ignored/empty.
Defaults to true.
<em>Since Apache Ant 1.7.1 (default is true for backward compatibility
reasons.)</em>
Defaults to true (for backward compatibility reasons).
<em>Since Apache Ant 1.7.1</em>
</td> </td>
<td valign="top" align="center">No</td> <td valign="top" align="center">No</td>
</tr> </tr>
@@ -108,43 +107,43 @@ equivalent to an <code>&lt;and&gt;</code> selector container.</p>


<h4>Examples</h4> <h4>Examples</h4>


<blockquote><pre>
<pre>
&lt;dirset dir=&quot;${build.dir}&quot;&gt; &lt;dirset dir=&quot;${build.dir}&quot;&gt;
&lt;include name=&quot;apps/**/classes&quot;/&gt; &lt;include name=&quot;apps/**/classes&quot;/&gt;
&lt;exclude name=&quot;apps/**/*Test*&quot;/&gt; &lt;exclude name=&quot;apps/**/*Test*&quot;/&gt;
&lt;/dirset&gt; &lt;/dirset&gt;
</pre></blockquote>
</pre>
<p>Groups all directories named <code>classes</code> found under the <p>Groups all directories named <code>classes</code> found under the
<code>apps</code> subdirectory of <code>${build.dir}</code>, except those <code>apps</code> subdirectory of <code>${build.dir}</code>, except those
that have the text <code>Test</code> in their name.</p> that have the text <code>Test</code> in their name.</p>


<blockquote><pre>
<pre>
&lt;dirset dir=&quot;${build.dir}&quot;&gt; &lt;dirset dir=&quot;${build.dir}&quot;&gt;
&lt;patternset id=&quot;non.test.classes&quot;&gt; &lt;patternset id=&quot;non.test.classes&quot;&gt;
&lt;include name=&quot;apps/**/classes&quot;/&gt; &lt;include name=&quot;apps/**/classes&quot;/&gt;
&lt;exclude name=&quot;apps/**/*Test*&quot;/&gt; &lt;exclude name=&quot;apps/**/*Test*&quot;/&gt;
&lt;/patternset&gt; &lt;/patternset&gt;
&lt;/dirset&gt; &lt;/dirset&gt;
</pre></blockquote>
</pre>
<p>Groups the same directories as the above example, but also establishes <p>Groups the same directories as the above example, but also establishes
a PatternSet that can be referenced in other a PatternSet that can be referenced in other
<code>&lt;dirset&gt;</code> elements, rooted at a different directory.</p> <code>&lt;dirset&gt;</code> elements, rooted at a different directory.</p>


<blockquote><pre>
<pre>
&lt;dirset dir=&quot;${debug_build.dir}&quot;&gt; &lt;dirset dir=&quot;${debug_build.dir}&quot;&gt;
&lt;patternset refid=&quot;non.test.classes&quot;/&gt; &lt;patternset refid=&quot;non.test.classes&quot;/&gt;
&lt;/dirset&gt; &lt;/dirset&gt;
</pre></blockquote>
</pre>
<p>Groups all directories in directory <code>${debug_build.dir}</code>, <p>Groups all directories in directory <code>${debug_build.dir}</code>,
using the same patterns as the above example.</p> using the same patterns as the above example.</p>


<blockquote><pre>
<pre>
&lt;dirset id=&quot;dirset&quot; dir=&quot;${workingdir}&quot;&gt; &lt;dirset id=&quot;dirset&quot; dir=&quot;${workingdir}&quot;&gt;
&lt;present targetdir=&quot;${workingdir}&quot;&gt; &lt;present targetdir=&quot;${workingdir}&quot;&gt;
&lt;mapper type=&quot;glob&quot; from=&quot;*&quot; to=&quot;*/${markerfile}&quot; /&gt; &lt;mapper type=&quot;glob&quot; from=&quot;*&quot; to=&quot;*/${markerfile}&quot; /&gt;
&lt;/present&gt; &lt;/present&gt;
&lt;/dirset&gt; &lt;/dirset&gt;
</pre></blockquote>
</pre>
<p>Selects all directories somewhere under <code>${workingdir}</code> <p>Selects all directories somewhere under <code>${workingdir}</code>
which contain a <code>${markerfile}</code>.</p> which contain a <code>${markerfile}</code>.</p>




+ 6
- 6
manual/Types/extension.html View File

@@ -83,7 +83,7 @@ Java2 Standard Edition package, in file
</table> </table>


<h4>Examples</h4> <h4>Examples</h4>
<blockquote><pre>
<pre>
&lt;extension id=&quot;e1&quot; &lt;extension id=&quot;e1&quot;
extensionName=&quot;MyExtensions&quot; extensionName=&quot;MyExtensions&quot;
specificationVersion=&quot;1.0&quot; specificationVersion=&quot;1.0&quot;
@@ -92,18 +92,18 @@ Java2 Standard Edition package, in file
implementationVendor=&quot;Apache&quot; implementationVendor=&quot;Apache&quot;
implementationVersion=&quot;2.0&quot; implementationVersion=&quot;2.0&quot;
implementationURL=&quot;http://somewhere.com/myExt.jar&quot;/&gt; implementationURL=&quot;http://somewhere.com/myExt.jar&quot;/&gt;
</pre></blockquote>
</pre>


<p>Fully specific extension object.</p>
<p>Fully specified extension object.</p>


<blockquote><pre>
<pre>
&lt;extension id=&quot;e1&quot; &lt;extension id=&quot;e1&quot;
extensionName=&quot;MyExtensions&quot; extensionName=&quot;MyExtensions&quot;
specificationVersion=&quot;1.0&quot; specificationVersion=&quot;1.0&quot;
specificationVendor=&quot;Peter Donald&quot;/&gt; specificationVendor=&quot;Peter Donald&quot;/&gt;
</pre></blockquote>
</pre>


<p>Extension object that just species the specification details.</p>
<p>Extension object that just specifies the specification details.</p>


</body> </body>
</html> </html>

+ 2
- 3
manual/Types/extensionset.html View File

@@ -48,7 +48,7 @@ Java2 Standard Edition package, in file
may be modified by attributes of libfileset</p> may be modified by attributes of libfileset</p>


<h4>Examples</h4> <h4>Examples</h4>
<blockquote><pre>
<pre>
&lt;extension id=&quot;e1&quot; &lt;extension id=&quot;e1&quot;
extensionName=&quot;MyExtensions&quot; extensionName=&quot;MyExtensions&quot;
specificationVersion=&quot;1.0&quot; specificationVersion=&quot;1.0&quot;
@@ -72,8 +72,7 @@ Java2 Standard Edition package, in file
&lt;libfileset refid="lfs"/&gt; &lt;libfileset refid="lfs"/&gt;
&lt;extension refid="e1"/&gt; &lt;extension refid="e1"/&gt;
&lt;/extensionSet&gt; &lt;/extensionSet&gt;

</pre></blockquote>
</pre>


</body> </body>
</html> </html>

+ 8
- 8
manual/Types/filelist.html View File

@@ -74,42 +74,42 @@ types.
</tr> </tr>
</table> </table>
<h4>Examples</h4> <h4>Examples</h4>
<blockquote><pre>
<pre>
&lt;filelist &lt;filelist
id=&quot;docfiles&quot; id=&quot;docfiles&quot;
dir=&quot;${doc.src}&quot; dir=&quot;${doc.src}&quot;
files=&quot;foo.xml,bar.xml&quot;/&gt; files=&quot;foo.xml,bar.xml&quot;/&gt;
</pre></blockquote>
</pre>


<p>The files <code>${doc.src}/foo.xml</code> and <p>The files <code>${doc.src}/foo.xml</code> and
<code>${doc.src}/bar.xml</code>. Note that these files may not (yet) <code>${doc.src}/bar.xml</code>. Note that these files may not (yet)
actually exist. actually exist.
</p> </p>


<blockquote><pre>
<pre>
&lt;filelist &lt;filelist
id=&quot;docfiles&quot; id=&quot;docfiles&quot;
dir=&quot;${doc.src}&quot; dir=&quot;${doc.src}&quot;
files=&quot;foo.xml files=&quot;foo.xml
bar.xml&quot;/&gt; bar.xml&quot;/&gt;
</pre></blockquote>
</pre>


<p>Same files as the example above.</p> <p>Same files as the example above.</p>


<blockquote><pre>
<pre>
&lt;filelist refid=&quot;docfiles&quot;/&gt; &lt;filelist refid=&quot;docfiles&quot;/&gt;
</pre></blockquote>
</pre>


<p>Same files as the example above.</p> <p>Same files as the example above.</p>


<blockquote><pre>
<pre>
&lt;filelist &lt;filelist
id=&quot;docfiles&quot; id=&quot;docfiles&quot;
dir=&quot;${doc.src}&quot;&gt; dir=&quot;${doc.src}&quot;&gt;
&lt;file name="foo.xml"/&gt; &lt;file name="foo.xml"/&gt;
&lt;file name="bar.xml"/&gt; &lt;file name="bar.xml"/&gt;
&lt;/filelist&gt; &lt;/filelist&gt;
</pre></blockquote>
</pre>


<p>Same files as the example above.</p> <p>Same files as the example above.</p>




+ 12
- 12
manual/Types/fileset.html View File

@@ -122,60 +122,60 @@ symbolic link but it may lead to false results on other
platforms.</p> platforms.</p>


<h4>Examples</h4> <h4>Examples</h4>
<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${server.src}&quot; casesensitive=&quot;yes&quot;&gt; &lt;fileset dir=&quot;${server.src}&quot; casesensitive=&quot;yes&quot;&gt;
&lt;include name=&quot;**/*.java&quot;/&gt; &lt;include name=&quot;**/*.java&quot;/&gt;
&lt;exclude name=&quot;**/*Test*&quot;/&gt; &lt;exclude name=&quot;**/*Test*&quot;/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>
<p>Groups all files in directory <code>${server.src}</code> that are Java <p>Groups all files in directory <code>${server.src}</code> that are Java
source files and don't have the text <code>Test</code> in their source files and don't have the text <code>Test</code> in their
name.</p> name.</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${server.src}&quot; casesensitive=&quot;yes&quot;&gt; &lt;fileset dir=&quot;${server.src}&quot; casesensitive=&quot;yes&quot;&gt;
&lt;patternset id=&quot;non.test.sources&quot;&gt; &lt;patternset id=&quot;non.test.sources&quot;&gt;
&lt;include name=&quot;**/*.java&quot;/&gt; &lt;include name=&quot;**/*.java&quot;/&gt;
&lt;exclude name=&quot;**/*Test*&quot;/&gt; &lt;exclude name=&quot;**/*Test*&quot;/&gt;
&lt;/patternset&gt; &lt;/patternset&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>
<p>Groups the same files as the above example, but also establishes <p>Groups the same files as the above example, but also establishes
a PatternSet that can be referenced in other a PatternSet that can be referenced in other
<code>&lt;fileset&gt;</code> elements, rooted at a different directory.</p> <code>&lt;fileset&gt;</code> elements, rooted at a different directory.</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${client.src}&quot; &gt; &lt;fileset dir=&quot;${client.src}&quot; &gt;
&lt;patternset refid=&quot;non.test.sources&quot;/&gt; &lt;patternset refid=&quot;non.test.sources&quot;/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>
<p>Groups all files in directory <code>${client.src}</code>, using the <p>Groups all files in directory <code>${client.src}</code>, using the
same patterns as the above example.</p> same patterns as the above example.</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${server.src}&quot; casesensitive=&quot;yes&quot;&gt; &lt;fileset dir=&quot;${server.src}&quot; casesensitive=&quot;yes&quot;&gt;
&lt;filename name=&quot;**/*.java&quot;/&gt; &lt;filename name=&quot;**/*.java&quot;/&gt;
&lt;filename name=&quot;**/*Test*&quot; negate=&quot;true&quot;/&gt; &lt;filename name=&quot;**/*Test*&quot; negate=&quot;true&quot;/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>
<p>Groups the same files as the top example, but using the <p>Groups the same files as the top example, but using the
<code>&lt;filename&gt;</code> selector.</p> <code>&lt;filename&gt;</code> selector.</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${server.src}&quot; casesensitive=&quot;yes&quot;&gt; &lt;fileset dir=&quot;${server.src}&quot; casesensitive=&quot;yes&quot;&gt;
&lt;filename name=&quot;**/*.java&quot;/&gt; &lt;filename name=&quot;**/*.java&quot;/&gt;
&lt;not&gt; &lt;not&gt;
&lt;filename name=&quot;**/*Test*&quot;/&gt; &lt;filename name=&quot;**/*Test*&quot;/&gt;
&lt;/not&gt; &lt;/not&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>
<p>Groups the same files as the previous example using a combination of the <p>Groups the same files as the previous example using a combination of the
<code>&lt;filename&gt;</code> selector and the <code>&lt;not&gt;</code> <code>&lt;filename&gt;</code> selector and the <code>&lt;not&gt;</code>
selector container.</p> selector container.</p>


<blockquote><pre>
<pre>
&lt;fileset dir="src" includes="main/" /&gt; &lt;fileset dir="src" includes="main/" /&gt;
</pre></blockquote>
</pre>
<p>Selects all files in <i>src/main</i> (e.g. <i>src/main/Foo.java</i> or <p>Selects all files in <i>src/main</i> (e.g. <i>src/main/Foo.java</i> or
<i>src/main/application/Bar.java</i>).</p> <i>src/main/application/Bar.java</i>).</p>




+ 140
- 141
manual/Types/filterchain.html View File

@@ -56,7 +56,7 @@ FilterReaders can be easily plugged in as nested elements of
<code>&lt;filterchain&gt;</code> by using <code>&lt;filterreader&gt;</code> elements. <code>&lt;filterchain&gt;</code> by using <code>&lt;filterreader&gt;</code> elements.
<p> <p>
Example: Example:
<blockquote><pre>
<pre>
&lt;copy file=&quot;${src.file}&quot; tofile=&quot;${dest.file}&quot;&gt; &lt;copy file=&quot;${src.file}&quot; tofile=&quot;${dest.file}&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;filterreader classname=&quot;your.extension.of.java.io.FilterReader&quot;&gt; &lt;filterreader classname=&quot;your.extension.of.java.io.FilterReader&quot;&gt;
@@ -71,21 +71,21 @@ Example:
&lt;/filterreader&gt; &lt;/filterreader&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/copy&gt; &lt;/copy&gt;
</pre></blockquote>
</pre>


Ant provides some built-in filter readers. These filter readers Ant provides some built-in filter readers. These filter readers
can also be declared using a syntax similar to the above syntax. can also be declared using a syntax similar to the above syntax.
However, they can be declared using some simpler syntax also.<p> However, they can be declared using some simpler syntax also.<p>
Example: Example:
<blockquote><pre>
<pre>
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;src.file.head&quot;&gt; &lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;src.file.head&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;headfilter lines=&quot;15&quot;/&gt; &lt;headfilter lines=&quot;15&quot;/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>
is equivalent to: is equivalent to:
<blockquote><pre>
<pre>
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;src.file.head&quot;&gt; &lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;src.file.head&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.HeadFilter&quot;&gt; &lt;filterreader classname=&quot;org.apache.tools.ant.filters.HeadFilter&quot;&gt;
@@ -93,7 +93,7 @@ is equivalent to:
&lt;/filterreader&gt; &lt;/filterreader&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


The following built-in tasks support nested <code>&lt;filterchain&gt;</code> elements.<br> The following built-in tasks support nested <code>&lt;filterchain&gt;</code> elements.<br>
<a href="../Tasks/concat.html">Concat</a>,<br> <a href="../Tasks/concat.html">Concat</a>,<br>
@@ -188,18 +188,18 @@ distribution.


This loads the basic constants defined in a Java class as Ant properties. This loads the basic constants defined in a Java class as Ant properties.


<blockquote><pre>
<pre>
&lt;loadproperties srcfile="foo.class" encoding="ISO-8859-1"&gt; &lt;loadproperties srcfile="foo.class" encoding="ISO-8859-1"&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;classconstants/&gt; &lt;classconstants/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadproperties&gt; &lt;/loadproperties&gt;
</pre></blockquote>
</pre>


This loads the constants from a Java class file as Ant properties, This loads the constants from a Java class file as Ant properties,
prepending the names with a prefix. prepending the names with a prefix.


<blockquote><pre>
<pre>
&lt;loadproperties srcfile="build/classes/org/acme/bar.class" &lt;loadproperties srcfile="build/classes/org/acme/bar.class"
encoding="ISO-8859-1"&gt; encoding="ISO-8859-1"&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
@@ -207,7 +207,7 @@ prepending the names with a prefix.
&lt;prefixlines prefix="ini."/&gt; &lt;prefixlines prefix="ini."/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadproperties&gt; &lt;/loadproperties&gt;
</pre></blockquote>
</pre>
<h3 id="escapeunicode">EscapeUnicode</h3> <h3 id="escapeunicode">EscapeUnicode</h3>
<p> <p>
This filter converts its input by changing all non US-ASCII characters This filter converts its input by changing all non US-ASCII characters
@@ -218,34 +218,34 @@ into their equivalent unicode escape backslash u plus 4 digits.</p>
<h4>Example:</h4> <h4>Example:</h4>


This loads the basic constants defined in a Java class as Ant properties. This loads the basic constants defined in a Java class as Ant properties.
<blockquote><pre>
<pre>
&lt;loadproperties srcfile=&quot;non_ascii_property.properties&quot;&gt; &lt;loadproperties srcfile=&quot;non_ascii_property.properties&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.EscapeUnicode&quot;/&gt; &lt;filterreader classname=&quot;org.apache.tools.ant.filters.EscapeUnicode&quot;/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadproperties&gt; &lt;/loadproperties&gt;
</pre></blockquote>
</pre>


Convenience method: Convenience method:
<blockquote><pre>
<pre>
&lt;loadproperties srcfile=&quot;non_ascii_property.properties&quot;&gt; &lt;loadproperties srcfile=&quot;non_ascii_property.properties&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;escapeunicode/&gt; &lt;escapeunicode/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadproperties&gt; &lt;/loadproperties&gt;
</pre></blockquote>
</pre>


<h3 id="expandproperties">ExpandProperties</h3> <h3 id="expandproperties">ExpandProperties</h3>
<p> <p>
If the data contains data that represents Ant If the data contains data that represents Ant
properties (of the form ${...}), that is substituted properties (of the form ${...}), that is substituted
with the property's actual value. with the property's actual value.
<p>
</p>
<h4>Example:</h4> <h4>Example:</h4>


This results in the property modifiedmessage holding the value This results in the property modifiedmessage holding the value
&quot;All these moments will be lost in time, like teardrops in the rain&quot; &quot;All these moments will be lost in time, like teardrops in the rain&quot;
<blockquote><pre>
<pre>
&lt;echo &lt;echo
message=&quot;All these moments will be lost in time, like teardrops in the ${weather}&quot; message=&quot;All these moments will be lost in time, like teardrops in the ${weather}&quot;
file=&quot;loadfile1.tmp&quot; file=&quot;loadfile1.tmp&quot;
@@ -256,10 +256,10 @@ This results in the property modifiedmessage holding the value
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.ExpandProperties&quot;/&gt; &lt;filterreader classname=&quot;org.apache.tools.ant.filters.ExpandProperties&quot;/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


Convenience method: Convenience method:
<blockquote><pre>
<pre>
&lt;echo &lt;echo
message=&quot;All these moments will be lost in time, like teardrops in the ${weather}&quot; message=&quot;All these moments will be lost in time, like teardrops in the ${weather}&quot;
file=&quot;loadfile1.tmp&quot; file=&quot;loadfile1.tmp&quot;
@@ -270,12 +270,12 @@ Convenience method:
&lt;expandproperties/&gt; &lt;expandproperties/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


<p><em>Since Ant 1.8.3</em>, a nested <p><em>Since Ant 1.8.3</em>, a nested
<a href="propertyset.html">PropertySet</a> can be specified:
<a href="propertyset.html">PropertySet</a> can be specified:</p>


<blockquote><pre>
<pre>
&lt;property name=&quot;weather&quot; value=&quot;rain&quot;/&gt; &lt;property name=&quot;weather&quot; value=&quot;rain&quot;/&gt;
&lt;loadfile property=&quot;modifiedmessage&quot; srcFile=&quot;loadfile1.tmp&quot;&gt; &lt;loadfile property=&quot;modifiedmessage&quot; srcFile=&quot;loadfile1.tmp&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
@@ -286,7 +286,7 @@ Convenience method:
&lt;/expandproperties&gt; &lt;/expandproperties&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


<h3 id="headfilter">HeadFilter</h3> <h3 id="headfilter">HeadFilter</h3>


@@ -316,7 +316,7 @@ This filter reads the first few lines from the data supplied to it.
<h4>Example:</h4> <h4>Example:</h4>


This stores the first 15 lines of the supplied data in the property src.file.head This stores the first 15 lines of the supplied data in the property src.file.head
<blockquote><pre>
<pre>
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;src.file.head&quot;&gt; &lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;src.file.head&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.HeadFilter&quot;&gt; &lt;filterreader classname=&quot;org.apache.tools.ant.filters.HeadFilter&quot;&gt;
@@ -324,26 +324,26 @@ This stores the first 15 lines of the supplied data in the property src.file.hea
&lt;/filterreader&gt; &lt;/filterreader&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


Convenience method: Convenience method:
<blockquote><pre>
<pre>
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;src.file.head&quot;&gt; &lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;src.file.head&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;headfilter lines=&quot;15&quot;/&gt; &lt;headfilter lines=&quot;15&quot;/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


This stores the first 15 lines, skipping the first 2 lines, of the supplied data This stores the first 15 lines, skipping the first 2 lines, of the supplied data
in the property src.file.head. (Means: lines 3-17) in the property src.file.head. (Means: lines 3-17)
<blockquote><pre>
<pre>
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;src.file.head&quot;&gt; &lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;src.file.head&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;headfilter lines=&quot;15&quot; skip=&quot;2&quot;/&gt; &lt;headfilter lines=&quot;15&quot; skip=&quot;2&quot;/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


See the testcases for more examples (<i>src\etc\testcases\filters\head-tail.xml</i> in the See the testcases for more examples (<i>src\etc\testcases\filters\head-tail.xml</i> in the
source distribution). source distribution).
@@ -376,36 +376,36 @@ strings.


This will include only those lines that contain <code>foo</code> and This will include only those lines that contain <code>foo</code> and
<code>bar</code>. <code>bar</code>.
<blockquote><pre>
<pre>
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.LineContains&quot;&gt; &lt;filterreader classname=&quot;org.apache.tools.ant.filters.LineContains&quot;&gt;
&lt;param type=&quot;contains&quot; value=&quot;foo&quot;/&gt; &lt;param type=&quot;contains&quot; value=&quot;foo&quot;/&gt;
&lt;param type=&quot;contains&quot; value=&quot;bar&quot;/&gt; &lt;param type=&quot;contains&quot; value=&quot;bar&quot;/&gt;
&lt;/filterreader&gt; &lt;/filterreader&gt;
</pre></blockquote>
</pre>


Convenience method: Convenience method:
<blockquote><pre>
<pre>
&lt;linecontains&gt; &lt;linecontains&gt;
&lt;contains value=&quot;foo&quot;/&gt; &lt;contains value=&quot;foo&quot;/&gt;
&lt;contains value=&quot;bar&quot;/&gt; &lt;contains value=&quot;bar&quot;/&gt;
&lt;/linecontains&gt; &lt;/linecontains&gt;
</pre></blockquote>
</pre>


Negation: Negation:
<blockquote><pre>
<pre>
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.LineContains&quot;&gt; &lt;filterreader classname=&quot;org.apache.tools.ant.filters.LineContains&quot;&gt;
&lt;param type=&quot;negate&quot; value=&quot;true&quot;/&gt; &lt;param type=&quot;negate&quot; value=&quot;true&quot;/&gt;
&lt;param type=&quot;contains&quot; value=&quot;foo&quot;/&gt; &lt;param type=&quot;contains&quot; value=&quot;foo&quot;/&gt;
&lt;param type=&quot;contains&quot; value=&quot;bar&quot;/&gt; &lt;param type=&quot;contains&quot; value=&quot;bar&quot;/&gt;
&lt;/filterreader&gt; &lt;/filterreader&gt;
</pre></blockquote>
</pre>
<i>or</i> <i>or</i>
<blockquote><pre>
<pre>
&lt;linecontains negate=&quot;true&quot;&gt; &lt;linecontains negate=&quot;true&quot;&gt;
&lt;contains value=&quot;foo&quot;/&gt; &lt;contains value=&quot;foo&quot;/&gt;
&lt;contains value=&quot;bar&quot;/&gt; &lt;contains value=&quot;bar&quot;/&gt;
&lt;/linecontains&gt; &lt;/linecontains&gt;
</pre></blockquote>
</pre>


<h3 id="linecontainsregexp">LineContainsRegExp</h3> <h3 id="linecontainsregexp">LineContainsRegExp</h3>


@@ -447,32 +447,32 @@ the choice of regular expression implementation.
<h4>Example:</h4> <h4>Example:</h4>


This will fetch all those lines that contain the pattern <code>foo</code> This will fetch all those lines that contain the pattern <code>foo</code>
<blockquote><pre>
<pre>
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.LineContainsRegExp&quot;&gt; &lt;filterreader classname=&quot;org.apache.tools.ant.filters.LineContainsRegExp&quot;&gt;
&lt;param type=&quot;regexp&quot; value=&quot;foo*&quot;/&gt; &lt;param type=&quot;regexp&quot; value=&quot;foo*&quot;/&gt;
&lt;/filterreader&gt; &lt;/filterreader&gt;
</pre></blockquote>
</pre>


Convenience method: Convenience method:
<blockquote><pre>
<pre>
&lt;linecontainsregexp&gt; &lt;linecontainsregexp&gt;
&lt;regexp pattern=&quot;foo*&quot;/&gt; &lt;regexp pattern=&quot;foo*&quot;/&gt;
&lt;/linecontainsregexp&gt; &lt;/linecontainsregexp&gt;
</pre></blockquote>
</pre>


Negation: Negation:
<blockquote><pre>
<pre>
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.LineContainsRegExp&quot;&gt; &lt;filterreader classname=&quot;org.apache.tools.ant.filters.LineContainsRegExp&quot;&gt;
&lt;param type=&quot;negate&quot; value=&quot;true&quot;/&gt; &lt;param type=&quot;negate&quot; value=&quot;true&quot;/&gt;
&lt;param type=&quot;regexp&quot; value=&quot;foo*&quot;/&gt; &lt;param type=&quot;regexp&quot; value=&quot;foo*&quot;/&gt;
&lt;/filterreader&gt; &lt;/filterreader&gt;
</pre></blockquote>
</pre>
<i>or</i> <i>or</i>
<blockquote><pre>
<pre>
&lt;linecontainsregexp negate=&quot;true&quot;&gt; &lt;linecontainsregexp negate=&quot;true&quot;&gt;
&lt;regexp pattern=&quot;foo*&quot;/&gt; &lt;regexp pattern=&quot;foo*&quot;/&gt;
&lt;/linecontainsregexp&gt; &lt;/linecontainsregexp&gt;
</pre></blockquote>
</pre>


<h3 id="prefixlines">PrefixLines</h3> <h3 id="prefixlines">PrefixLines</h3>


@@ -494,16 +494,16 @@ Attaches a prefix to every line.
<h4>Example:</h4> <h4>Example:</h4>


This will attach the prefix <code>Foo</code> to all lines. This will attach the prefix <code>Foo</code> to all lines.
<blockquote><pre>
<pre>
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.PrefixLines&quot;&gt; &lt;filterreader classname=&quot;org.apache.tools.ant.filters.PrefixLines&quot;&gt;
&lt;param name=&quot;prefix&quot; value=&quot;Foo&quot;/&gt; &lt;param name=&quot;prefix&quot; value=&quot;Foo&quot;/&gt;
&lt;/filterreader&gt; &lt;/filterreader&gt;
</pre></blockquote>
</pre>


Convenience method: Convenience method:
<blockquote><pre>
<pre>
&lt;prefixlines prefix=&quot;Foo&quot;/&gt; &lt;prefixlines prefix=&quot;Foo&quot;/&gt;
</pre></blockquote>
</pre>


<h3 id="suffixlines">SuffixLines</h3> <h3 id="suffixlines">SuffixLines</h3>


@@ -527,16 +527,16 @@ Attaches a suffix to every line.
<h4>Example:</h4> <h4>Example:</h4>


This will attach the suffix <code>Foo</code> to all lines. This will attach the suffix <code>Foo</code> to all lines.
<blockquote><pre>
<pre>
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.SuffixLines&quot;&gt; &lt;filterreader classname=&quot;org.apache.tools.ant.filters.SuffixLines&quot;&gt;
&lt;param name=&quot;suffix&quot; value=&quot;Foo&quot;/&gt; &lt;param name=&quot;suffix&quot; value=&quot;Foo&quot;/&gt;
&lt;/filterreader&gt; &lt;/filterreader&gt;
</pre></blockquote>
</pre>


Convenience method: Convenience method:
<blockquote><pre>
<pre>
&lt;suffixlines suffix=&quot;Foo&quot;/&gt; &lt;suffixlines suffix=&quot;Foo&quot;/&gt;
</pre></blockquote>
</pre>


<h3 id="replacetokens">ReplaceTokens</h3> <h3 id="replacetokens">ReplaceTokens</h3>


@@ -598,7 +598,7 @@ user defined values.


This replaces occurrences of the string &#64;DATE&#64; in the data This replaces occurrences of the string &#64;DATE&#64; in the data
with today's date and stores it in the property ${src.file.replaced}. with today's date and stores it in the property ${src.file.replaced}.
<blockquote><pre>
<pre>
&lt;tstamp/&gt; &lt;tstamp/&gt;
&lt;!-- just for explaining the use of the properties --&gt; &lt;!-- just for explaining the use of the properties --&gt;
&lt;property name=&quot;src.file&quot; value=&quot;orders.csv&quot;/&gt; &lt;property name=&quot;src.file&quot; value=&quot;orders.csv&quot;/&gt;
@@ -615,10 +615,10 @@ with today's date and stores it in the property ${src.file.replaced}.


&lt;!-- just for explaining the use of the properties --&gt; &lt;!-- just for explaining the use of the properties --&gt;
&lt;echo message=&quot;${orders.replaced}&quot;/> &lt;echo message=&quot;${orders.replaced}&quot;/>
</pre></blockquote>
</pre>


Convenience method: Convenience method:
<blockquote><pre>
<pre>
&lt;tstamp/&gt; &lt;tstamp/&gt;
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.replaced}&quot;&gt; &lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.replaced}&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
@@ -627,11 +627,11 @@ Convenience method:
&lt;/replacetokens&gt; &lt;/replacetokens&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


This replaces occurrences of the string {{DATE}} in the data This replaces occurrences of the string {{DATE}} in the data
with today's date and stores it in the property ${src.file.replaced}. with today's date and stores it in the property ${src.file.replaced}.
<blockquote><pre>
<pre>
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.replaced}&quot;&gt; &lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.replaced}&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.ReplaceTokens&quot;&gt; &lt;filterreader classname=&quot;org.apache.tools.ant.filters.ReplaceTokens&quot;&gt;
@@ -640,10 +640,10 @@ with today's date and stores it in the property ${src.file.replaced}.
&lt;/filterreader&gt; &lt;/filterreader&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


Convenience method: Convenience method:
<blockquote><pre>
<pre>
&lt;tstamp/&gt; &lt;tstamp/&gt;
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.replaced}&quot;&gt; &lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.replaced}&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
@@ -652,10 +652,10 @@ Convenience method:
&lt;/replacetokens&gt; &lt;/replacetokens&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


This will treat each properties file entry in sample.properties as a token/key pair : This will treat each properties file entry in sample.properties as a token/key pair :
<blockquote><pre>
<pre>
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.replaced}&quot;&gt; &lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.replaced}&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.ReplaceTokens&quot;&gt; &lt;filterreader classname=&quot;org.apache.tools.ant.filters.ReplaceTokens&quot;&gt;
@@ -663,10 +663,10 @@ This will treat each properties file entry in sample.properties as a token/key p
&lt;/filterreader&gt; &lt;/filterreader&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


This reads the properties from an Ant resource referenced by its id: This reads the properties from an Ant resource referenced by its id:
<blockquote><pre>
<pre>
&lt;string id=&quot;embedded-properties&quot;&gt; &lt;string id=&quot;embedded-properties&quot;&gt;
foo=bar foo=bar
baz=xyzzy baz=xyzzy
@@ -676,7 +676,7 @@ baz=xyzzy
&lt;replacetokens propertiesResource=&quot;${ant.refid:embedded-properties}&quot;/&gt; &lt;replacetokens propertiesResource=&quot;${ant.refid:embedded-properties}&quot;/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


<h3 id="stripjavacomments">StripJavaComments</h3> <h3 id="stripjavacomments">StripJavaComments</h3>


@@ -686,22 +686,22 @@ take in any parameters.
<p> <p>
<h4>Example:</h4> <h4>Example:</h4>


<blockquote><pre>
<pre>
&lt;loadfile srcfile=&quot;${java.src.file}&quot; property=&quot;${java.src.file.nocomments}&quot;&gt; &lt;loadfile srcfile=&quot;${java.src.file}&quot; property=&quot;${java.src.file.nocomments}&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.StripJavaComments&quot;/&gt; &lt;filterreader classname=&quot;org.apache.tools.ant.filters.StripJavaComments&quot;/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


Convenience method: Convenience method:
<blockquote><pre>
<pre>
&lt;loadfile srcfile=&quot;${java.src.file}&quot; property=&quot;${java.src.file.nocomments}&quot;&gt; &lt;loadfile srcfile=&quot;${java.src.file}&quot; property=&quot;${java.src.file.nocomments}&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;stripjavacomments/&gt; &lt;stripjavacomments/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


<h3 id="striplinebreaks">StripLineBreaks</h3> <h3 id="striplinebreaks">StripLineBreaks</h3>


@@ -725,26 +725,26 @@ from the data supplied to it.
<h4>Examples:</h4> <h4>Examples:</h4>


This strips the '\r' and '\n' characters. This strips the '\r' and '\n' characters.
<blockquote><pre>
<pre>
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.contents}&quot;&gt; &lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.contents}&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.StripLineBreaks&quot;/&gt; &lt;filterreader classname=&quot;org.apache.tools.ant.filters.StripLineBreaks&quot;/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


Convenience method: Convenience method:
<blockquote><pre>
<pre>
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.contents}&quot;&gt; &lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.contents}&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;striplinebreaks/&gt; &lt;striplinebreaks/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


This treats the '(' and ')' characters as line break characters and This treats the '(' and ')' characters as line break characters and
strips them. strips them.
<blockquote><pre>
<pre>
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.contents}&quot;&gt; &lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.contents}&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.StripLineBreaks&quot;&gt; &lt;filterreader classname=&quot;org.apache.tools.ant.filters.StripLineBreaks&quot;&gt;
@@ -752,7 +752,7 @@ strips them.
&lt;/filterreader&gt; &lt;/filterreader&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


<h3 id="striplinecomments">StripLineComments</h3> <h3 id="striplinecomments">StripLineComments</h3>


@@ -776,7 +776,7 @@ that represent comments as specified by the user.
<h4>Examples:</h4> <h4>Examples:</h4>


This removes all lines that begin with #, --, REM, rem and // This removes all lines that begin with #, --, REM, rem and //
<blockquote><pre>
<pre>
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.StripLineComments&quot;&gt; &lt;filterreader classname=&quot;org.apache.tools.ant.filters.StripLineComments&quot;&gt;
&lt;param type=&quot;comment&quot; value=&quot;#&quot;/&gt; &lt;param type=&quot;comment&quot; value=&quot;#&quot;/&gt;
&lt;param type=&quot;comment&quot; value=&quot;--&quot;/&gt; &lt;param type=&quot;comment&quot; value=&quot;--&quot;/&gt;
@@ -784,10 +784,10 @@ This removes all lines that begin with #, --, REM, rem and //
&lt;param type=&quot;comment&quot; value=&quot;rem &quot;/&gt; &lt;param type=&quot;comment&quot; value=&quot;rem &quot;/&gt;
&lt;param type=&quot;comment&quot; value=&quot;//&quot;/&gt; &lt;param type=&quot;comment&quot; value=&quot;//&quot;/&gt;
&lt;/filterreader&gt; &lt;/filterreader&gt;
</pre></blockquote>
</pre>


Convenience method: Convenience method:
<blockquote><pre>
<pre>
&lt;striplinecomments&gt; &lt;striplinecomments&gt;
&lt;comment value=&quot;#&quot;/&gt; &lt;comment value=&quot;#&quot;/&gt;
&lt;comment value=&quot;--&quot;/&gt; &lt;comment value=&quot;--&quot;/&gt;
@@ -795,7 +795,7 @@ Convenience method:
&lt;comment value=&quot;rem &quot;/&gt; &lt;comment value=&quot;rem &quot;/&gt;
&lt;comment value=&quot;//&quot;/&gt; &lt;comment value=&quot;//&quot;/&gt;
&lt;/striplinecomments&gt; &lt;/striplinecomments&gt;
</pre></blockquote>
</pre>


<h3 id="tabstospaces">TabsToSpaces</h3> <h3 id="tabstospaces">TabsToSpaces</h3>


@@ -817,22 +817,22 @@ This filter replaces tabs with spaces
<h4>Examples:</h4> <h4>Examples:</h4>


This replaces tabs in ${src.file} with spaces. This replaces tabs in ${src.file} with spaces.
<blockquote><pre>
<pre>
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.notab}&quot;&gt; &lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.notab}&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.TabsToSpaces&quot;/&gt; &lt;filterreader classname=&quot;org.apache.tools.ant.filters.TabsToSpaces&quot;/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


Convenience method: Convenience method:
<blockquote><pre>
<pre>
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.notab}&quot;&gt; &lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.notab}&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;tabstospaces/&gt; &lt;tabstospaces/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


<h3 id="tailfilter">TailFilter</h3> <h3 id="tailfilter">TailFilter</h3>


@@ -931,7 +931,7 @@ This graphic shows the dependencies:
<h4>Examples:</h4> <h4>Examples:</h4>


This stores the last 15 lines of the supplied data in the property ${src.file.tail} This stores the last 15 lines of the supplied data in the property ${src.file.tail}
<blockquote><pre>
<pre>
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.tail}&quot;&gt; &lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.tail}&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.TailFilter&quot;&gt; &lt;filterreader classname=&quot;org.apache.tools.ant.filters.TailFilter&quot;&gt;
@@ -939,20 +939,20 @@ This stores the last 15 lines of the supplied data in the property ${src.file.ta
&lt;/filterreader&gt; &lt;/filterreader&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


Convenience method: Convenience method:
<blockquote><pre>
<pre>
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.tail}&quot;&gt; &lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.tail}&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;tailfilter lines=&quot;15&quot;/&gt; &lt;tailfilter lines=&quot;15&quot;/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


This stores the last 5 lines of the first 15 lines of the supplied This stores the last 5 lines of the first 15 lines of the supplied
data in the property ${src.file.mid} data in the property ${src.file.mid}
<blockquote><pre>
<pre>
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.mid}&quot;&gt; &lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.mid}&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.HeadFilter&quot;&gt; &lt;filterreader classname=&quot;org.apache.tools.ant.filters.HeadFilter&quot;&gt;
@@ -963,28 +963,28 @@ data in the property ${src.file.mid}
&lt;/filterreader&gt; &lt;/filterreader&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


Convenience method: Convenience method:
<blockquote><pre>
<pre>
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.mid}&quot;&gt; &lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.mid}&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;headfilter lines=&quot;15&quot;/&gt; &lt;headfilter lines=&quot;15&quot;/&gt;
&lt;tailfilter lines=&quot;5&quot;/&gt; &lt;tailfilter lines=&quot;5&quot;/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


This stores the last 10 lines, skipping the last 2 lines, of the supplied data 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, in the property src.file.head. (Means: if supplied data contains 60 lines,
lines 49-58 are extracted) lines 49-58 are extracted)
<blockquote><pre>
<pre>
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;src.file.head&quot;&gt; &lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;src.file.head&quot;&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;tailfilter lines=&quot;10&quot; skip=&quot;2&quot;/&gt; &lt;tailfilter lines=&quot;10&quot; skip=&quot;2&quot;/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/loadfile&gt; &lt;/loadfile&gt;
</pre></blockquote>
</pre>


<h3 id="deletecharacters">DeleteCharacters</h3> <h3 id="deletecharacters">DeleteCharacters</h3>


@@ -1011,9 +1011,9 @@ lines 49-58 are extracted)
<h4>Examples:</h4> <h4>Examples:</h4>


Delete tabs and returns from the data. Delete tabs and returns from the data.
<blockquote><pre>
<pre>
&lt;deletecharacters chars="\t\r"/&gt; &lt;deletecharacters chars="\t\r"/&gt;
</pre></blockquote>
</pre>


<h3 id="concatfilter">ConcatFilter</h3> <h3 id="concatfilter">ConcatFilter</h3>
<p>This filter prepends or appends the content file to the filtered files.</p> <p>This filter prepends or appends the content file to the filtered files.</p>
@@ -1044,18 +1044,18 @@ Delete tabs and returns from the data.
<h4>Examples:</h4> <h4>Examples:</h4>


Do nothing: Do nothing:
<blockquote><pre>
<pre>
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;concatfilter/&gt; &lt;concatfilter/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
</pre></blockquote>
</pre>


Adds a license text before each java source: Adds a license text before each java source:
<blockquote><pre>
<pre>
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;concatfilter prepend="apache-license-java.txt"/&gt; &lt;concatfilter prepend="apache-license-java.txt"/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
</pre></blockquote>
</pre>


<h3 id="sortfilter">SortFilter</h3> <h3 id="sortfilter">SortFilter</h3>
<p><em>since Ant 1.8.0</em></p> <p><em>since Ant 1.8.0</em></p>
@@ -1094,14 +1094,14 @@ Adds a license text before each java source:


<h4>Examples:</h4> <h4>Examples:</h4>


<blockquote><pre>
<pre>
&lt;copy todir=&quot;build&quot;&gt; &lt;copy todir=&quot;build&quot;&gt;
&lt;fileset dir=&quot;input&quot; includes=&quot;*.txt&quot;/&gt; &lt;fileset dir=&quot;input&quot; includes=&quot;*.txt&quot;/&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;sortfilter/&gt; &lt;sortfilter/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/copy&gt; &lt;/copy&gt;
</pre></blockquote>
</pre>


<p> <p>
Sort all files <code>*.txt</code> from <i>src</i> location Sort all files <code>*.txt</code> from <i>src</i> location
@@ -1110,21 +1110,21 @@ ascendant order comparing the lines via the
<code>String.compareTo(Object o)</code> method. <code>String.compareTo(Object o)</code> method.
</p> </p>


<blockquote><pre>
<pre>
&lt;copy todir=&quot;build&quot;&gt; &lt;copy todir=&quot;build&quot;&gt;
&lt;fileset dir=&quot;input&quot; includes=&quot;*.txt&quot;/&gt; &lt;fileset dir=&quot;input&quot; includes=&quot;*.txt&quot;/&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
&lt;sortfilter reverse=&quot;true&quot;/&gt; &lt;sortfilter reverse=&quot;true&quot;/&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/copy&gt; &lt;/copy&gt;
</pre></blockquote>
</pre>


<p> <p>
Sort all files <code>*.txt</code> from <i>src</i> location into reverse Sort all files <code>*.txt</code> from <i>src</i> location into reverse
order and copy them into <i>build</i> location. order and copy them into <i>build</i> location.
</p> </p>


<blockquote><pre>
<pre>
&lt;copy todir=&quot;build&quot;&gt; &lt;copy todir=&quot;build&quot;&gt;
&lt;fileset dir=&quot;input&quot; includes=&quot;*.txt&quot;/&gt; &lt;fileset dir=&quot;input&quot; includes=&quot;*.txt&quot;/&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
@@ -1133,7 +1133,7 @@ order and copy them into <i>build</i> location.
&lt;/filterreader&gt; &lt;/filterreader&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/copy&gt; &lt;/copy&gt;
</pre></blockquote>
</pre>


<p> <p>
Sort all files <code>*.txt</code> from <i>src</i> location using as Sort all files <code>*.txt</code> from <i>src</i> location using as
@@ -1157,7 +1157,7 @@ implement <code>java.util.Comparator</code> interface, for example:


<p>The example above is equivalent to:</p> <p>The example above is equivalent to:</p>


<blockquote><pre>
<pre>
&lt;componentdef name=&quot;evenfirst&quot; &lt;componentdef name=&quot;evenfirst&quot;
classname=&quot;org.apache.tools.ant.filters.EvenFirstCmp&quot;/&gt; classname=&quot;org.apache.tools.ant.filters.EvenFirstCmp&quot;/&gt;
&lt;copy todir=&quot;build&quot;&gt; &lt;copy todir=&quot;build&quot;&gt;
@@ -1168,7 +1168,7 @@ implement <code>java.util.Comparator</code> interface, for example:
&lt;/sortfilter&gt; &lt;/sortfilter&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/copy&gt; &lt;/copy&gt;
</pre></blockquote>
</pre>


<h3 id="tokenfilter">TokenFilter</h3> <h3 id="tokenfilter">TokenFilter</h3>
This filter tokenizes the inputstream into strings and passes these This filter tokenizes the inputstream into strings and passes these
@@ -1274,17 +1274,17 @@ This is the default tokenizer.
<h5>Examples:</h5> <h5>Examples:</h5>


Convert input current line endings to unix style line endings. Convert input current line endings to unix style line endings.
<blockquote><pre>
<pre>
&lt;tokenfilter delimoutput=&quot;\n&quot;/&gt; &lt;tokenfilter delimoutput=&quot;\n&quot;/&gt;
</pre></blockquote>
</pre>


Remove blank lines. Remove blank lines.
<blockquote><pre>
<pre>
&lt;tokenfilter&gt; &lt;tokenfilter&gt;
&lt;ignoreblank/&gt; &lt;ignoreblank/&gt;
&lt;/tokenfilter&gt; &lt;/tokenfilter&gt;


</pre></blockquote>
</pre>


<h4 id="filetokenizer">FileTokenizer</h4> <h4 id="filetokenizer">FileTokenizer</h4>
This tokenizer treats <b>all</b> the input as a token. So be This tokenizer treats <b>all</b> the input as a token. So be
@@ -1292,14 +1292,14 @@ careful not to use this on very large input.
<h5>Examples:</h5> <h5>Examples:</h5>


Replace the first occurrence of package with //package. Replace the first occurrence of package with //package.
<blockquote><pre>
<pre>
&lt;tokenfilter&gt; &lt;tokenfilter&gt;
&lt;filetokenizer/&gt; &lt;filetokenizer/&gt;
&lt;replaceregex pattern="([\n\r]+[ \t]*|^[ \t]*)package" &lt;replaceregex pattern="([\n\r]+[ \t]*|^[ \t]*)package"
flags="s" flags="s"
replace="\1//package"/&gt; replace="\1//package"/&gt;
&lt;/tokenfilter&gt; &lt;/tokenfilter&gt;
</pre></blockquote>
</pre>


<h4 id="stringtokenizer">StringTokenizer</h4> <h4 id="stringtokenizer">StringTokenizer</h4>
This tokenizer is based on java.util.StringTokenizer. This tokenizer is based on java.util.StringTokenizer.
@@ -1353,13 +1353,13 @@ attribute is used).


Surround each non space token with a "[]". Surround each non space token with a "[]".


<blockquote><pre>
<pre>
&lt;tokenfilter&gt; &lt;tokenfilter&gt;
&lt;stringtokenizer/&gt; &lt;stringtokenizer/&gt;
&lt;replaceregex pattern="(.+)" replace="[\1]"/&gt; &lt;replaceregex pattern="(.+)" replace="[\1]"/&gt;
&lt;/tokenfilter&gt; &lt;/tokenfilter&gt;


</pre></blockquote>
</pre>


<h4 id="replacestring">ReplaceString</h4> <h4 id="replacestring">ReplaceString</h4>
This is a simple filter to replace strings. This is a simple filter to replace strings.
@@ -1389,11 +1389,11 @@ This filter may be used directly within a filterchain.


Replace "sun" with "moon". Replace "sun" with "moon".


<blockquote><pre>
<pre>
&lt;tokenfilter&gt; &lt;tokenfilter&gt;
&lt;replacestring from="sun" to="moon"/&gt; &lt;replacestring from="sun" to="moon"/&gt;
&lt;/tokenfilter&gt; &lt;/tokenfilter&gt;
</pre></blockquote>
</pre>


<h4 id="containsstring">ContainsString</h4> <h4 id="containsstring">ContainsString</h4>
This is a simple filter to filter tokens that contains This is a simple filter to filter tokens that contains
@@ -1416,12 +1416,12 @@ a specified string.


Include only lines that contain "foo"; Include only lines that contain "foo";


<blockquote><pre>
<pre>
&lt;tokenfilter&gt; &lt;tokenfilter&gt;
&lt;containsstring contains="foo"/&gt; &lt;containsstring contains="foo"/&gt;
&lt;/tokenfilter&gt; &lt;/tokenfilter&gt;


</pre></blockquote>
</pre>


<h4 id="replaceregex">ReplaceRegex</h4> <h4 id="replaceregex">ReplaceRegex</h4>
This string filter replaces regular expressions. This string filter replaces regular expressions.
@@ -1461,12 +1461,12 @@ for an explanation of regex flags.</td>


Replace all occurrences of "hello" with "world", ignoring case. Replace all occurrences of "hello" with "world", ignoring case.


<blockquote><pre>
<pre>
&lt;tokenfilter&gt; &lt;tokenfilter&gt;
&lt;replaceregex pattern="hello" replace="world" flags="gi"/&gt; &lt;replaceregex pattern="hello" replace="world" flags="gi"/&gt;
&lt;/tokenfilter&gt; &lt;/tokenfilter&gt;


</pre></blockquote>
</pre>


<h4 id="containsregex">ContainsRegex</h4> <h4 id="containsregex">ContainsRegex</h4>
This filters strings that match regular expressions. This filters strings that match regular expressions.
@@ -1509,23 +1509,23 @@ for an explanation of regex flags.</td>


Filter lines that contain "hello" or "world", ignoring case. Filter lines that contain "hello" or "world", ignoring case.


<blockquote><pre>
<pre>
&lt;tokenfilter&gt; &lt;tokenfilter&gt;
&lt;containsregex pattern="(hello|world)" flags="i"/&gt; &lt;containsregex pattern="(hello|world)" flags="i"/&gt;
&lt;/tokenfilter&gt; &lt;/tokenfilter&gt;


</pre></blockquote>
</pre>


This example replaces lines like "SUITE(TestSuite, bits);" with This example replaces lines like "SUITE(TestSuite, bits);" with
"void register_bits();" and removes other lines. "void register_bits();" and removes other lines.


<blockquote><pre>
<pre>
&lt;tokenfilter&gt; &lt;tokenfilter&gt;
&lt;containsregex &lt;containsregex
pattern="^ *SUITE\(.*,\s*(.*)\s*\).*" pattern="^ *SUITE\(.*,\s*(.*)\s*\).*"
replace="void register_\1();"/&gt; replace="void register_\1();"/&gt;
&lt;/tokenfilter&gt; &lt;/tokenfilter&gt;
</pre></blockquote>
</pre>


<h4 id="trim">Trim</h4> <h4 id="trim">Trim</h4>
This filter trims whitespace from the start and end of This filter trims whitespace from the start and end of
@@ -1557,14 +1557,14 @@ This filter deletes specified characters from tokens.


Delete tabs from lines, trim the lines and removes empty lines. Delete tabs from lines, trim the lines and removes empty lines.


<blockquote><pre>
<pre>
&lt;tokenfilter&gt; &lt;tokenfilter&gt;
&lt;deletecharacters chars="\t"/&gt; &lt;deletecharacters chars="\t"/&gt;
&lt;trim/&gt; &lt;trim/&gt;
&lt;ignoreblank/&gt; &lt;ignoreblank/&gt;
&lt;/tokenfilter&gt; &lt;/tokenfilter&gt;


</pre></blockquote>
</pre>


<h4 id="uniqfilter">UniqFilter</h4> <h4 id="uniqfilter">UniqFilter</h4>


@@ -1576,11 +1576,11 @@ Delete tabs from lines, trim the lines and removes empty lines.
<h5>Example:</h5> <h5>Example:</h5>


This suppresses duplicate lines. This suppresses duplicate lines.
<blockquote><pre>
<pre>
&lt;tokenfilter&gt; &lt;tokenfilter&gt;
&lt;uniqfilter/&gt; &lt;uniqfilter/&gt;
&lt;/tokenfilter&gt; &lt;/tokenfilter&gt;
</pre></blockquote>
</pre>


<h4 id="native2asciifilter">Native2AsciiFilter</h4> <h4 id="native2asciifilter">Native2AsciiFilter</h4>


@@ -1609,11 +1609,11 @@ This suppresses duplicate lines.
<h5>Example:</h5> <h5>Example:</h5>


<p>This replaces all non-ASCII characters by their Unicode-escapes.</p> <p>This replaces all non-ASCII characters by their Unicode-escapes.</p>
<blockquote><pre>
<pre>
&lt;tokenfilter&gt; &lt;tokenfilter&gt;
&lt;native2asciifilter/&gt; &lt;native2asciifilter/&gt;
&lt;/tokenfilter&gt; &lt;/tokenfilter&gt;
</pre></blockquote>
</pre>


<h4 id="scriptfilter">ScriptFilter</h4> <h4 id="scriptfilter">ScriptFilter</h4>
<p> <p>
@@ -1694,18 +1694,17 @@ Must be a supported Apache BSF or JSR 223 language</td>
<h5>Examples:</h5> <h5>Examples:</h5>


Convert to uppercase: Convert to uppercase:
<blockquote><pre>
<pre>
&lt;tokenfilter&gt; &lt;tokenfilter&gt;
&lt;scriptfilter language="javascript"&gt; &lt;scriptfilter language="javascript"&gt;
self.setToken(self.getToken().toUpperCase()); self.setToken(self.getToken().toUpperCase());
&lt;/scriptfilter&gt; &lt;/scriptfilter&gt;
&lt;/tokenfilter&gt; &lt;/tokenfilter&gt;
</pre></blockquote>
</pre>


Remove lines containing the string "bad" while Remove lines containing the string "bad" while
copying text files: copying text files:
<blockquote>
<pre>
<pre>
&lt;copy todir="dist"&gt; &lt;copy todir="dist"&gt;
&lt;fileset dir="src" includes="**/*.txt"/&gt; &lt;fileset dir="src" includes="**/*.txt"/&gt;
&lt;filterchain&gt; &lt;filterchain&gt;
@@ -1716,8 +1715,7 @@ copying text files:
&lt;/scriptfilter&gt; &lt;/scriptfilter&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/copy&gt; &lt;/copy&gt;
</pre>
</blockquote>
</pre>


<h4 id="custom">Custom tokenizers and string filters</h4> <h4 id="custom">Custom tokenizers and string filters</h4>


@@ -1727,7 +1725,7 @@ and org.apache.tools.ant.util.Tokenizer respectly.


They are defined in the build file using <code>&lt;typedef/&gt;</code>. For They are defined in the build file using <code>&lt;typedef/&gt;</code>. For
example a string filter that capitalizes words may be declared as: example a string filter that capitalizes words may be declared as:
<blockquote><pre>
<pre>
package my.customant; package my.customant;
import org.apache.tools.ant.filters.TokenFilter; import org.apache.tools.ant.filters.TokenFilter;


@@ -1741,10 +1739,10 @@ public class Capitalize
token.substring(1); token.substring(1);
} }
} }
</pre></blockquote>
</pre>


This may be used as follows: This may be used as follows:
<blockquote><pre>
<pre>
&lt;typedef name="capitalize" classname="my.customant.Capitalize" &lt;typedef name="capitalize" classname="my.customant.Capitalize"
classpath="my.customant.path"/&gt; classpath="my.customant.path"/&gt;
&lt;copy file="input" tofile="output"&gt; &lt;copy file="input" tofile="output"&gt;
@@ -1755,6 +1753,7 @@ This may be used as follows:
&lt;/tokenfilter&gt; &lt;/tokenfilter&gt;
&lt;/filterchain&gt; &lt;/filterchain&gt;
&lt;/copy&gt; &lt;/copy&gt;
</pre></blockquote>
</pre>


</body></html>
</body>
</html>

+ 12
- 11
manual/Types/filterset.html View File

@@ -141,27 +141,27 @@ you should ensure that the set of files being filtered are all text files.
<p>You are copying the <code>version.txt</code> file to the <code>dist</code> <p>You are copying the <code>version.txt</code> file to the <code>dist</code>
directory from the <code>build</code> directory directory from the <code>build</code> directory
but wish to replace the token <code>&#64;DATE&#64;</code> with today's date.</p> but wish to replace the token <code>&#64;DATE&#64;</code> with today's date.</p>
<blockquote><pre>
<pre>
&lt;copy file=&quot;${build.dir}/version.txt&quot; toFile=&quot;${dist.dir}/version.txt&quot;&gt; &lt;copy file=&quot;${build.dir}/version.txt&quot; toFile=&quot;${dist.dir}/version.txt&quot;&gt;
&lt;filterset&gt; &lt;filterset&gt;
&lt;filter token=&quot;DATE&quot; value=&quot;${TODAY}&quot;/&gt; &lt;filter token=&quot;DATE&quot; value=&quot;${TODAY}&quot;/&gt;
&lt;/filterset&gt; &lt;/filterset&gt;
&lt;/copy&gt; &lt;/copy&gt;
</pre></blockquote>
</pre>


<p>You are copying the <code>version.txt</code> file to the <code>dist</code> <p>You are copying the <code>version.txt</code> file to the <code>dist</code>
directory from the build directory directory from the build directory
but wish to replace the token <code>%DATE*</code> with today's date.</p> but wish to replace the token <code>%DATE*</code> with today's date.</p>
<blockquote><pre>
<pre>
&lt;copy file=&quot;${build.dir}/version.txt&quot; toFile=&quot;${dist.dir}/version.txt&quot;&gt; &lt;copy file=&quot;${build.dir}/version.txt&quot; toFile=&quot;${dist.dir}/version.txt&quot;&gt;
&lt;filterset begintoken=&quot;%&quot; endtoken=&quot;*&quot;&gt; &lt;filterset begintoken=&quot;%&quot; endtoken=&quot;*&quot;&gt;
&lt;filter token=&quot;DATE&quot; value=&quot;${TODAY}&quot;/&gt; &lt;filter token=&quot;DATE&quot; value=&quot;${TODAY}&quot;/&gt;
&lt;/filterset&gt; &lt;/filterset&gt;
&lt;/copy&gt; &lt;/copy&gt;
</pre></blockquote>
</pre>


<p>Copy all the docs but change all dates and appropriate notices as stored in a file.</p> <p>Copy all the docs but change all dates and appropriate notices as stored in a file.</p>
<blockquote><pre>
<pre>
&lt;copy toDir=&quot;${dist.dir}/docs&quot;&gt; &lt;copy toDir=&quot;${dist.dir}/docs&quot;&gt;
&lt;fileset dir=&quot;${build.dir}/docs&quot;&gt; &lt;fileset dir=&quot;${build.dir}/docs&quot;&gt;
&lt;include name=&quot;**/*.html&quot;&gt; &lt;include name=&quot;**/*.html&quot;&gt;
@@ -170,10 +170,10 @@ but wish to replace the token <code>%DATE*</code> with today's date.</p>
&lt;filtersfile file=&quot;${user.dir}/dist.properties&quot;/&gt; &lt;filtersfile file=&quot;${user.dir}/dist.properties&quot;/&gt;
&lt;/filterset&gt; &lt;/filterset&gt;
&lt;/copy&gt; &lt;/copy&gt;
</pre></blockquote>
</pre>


<p>Define a FilterSet and reference it later.</p> <p>Define a FilterSet and reference it later.</p>
<blockquote><pre>
<pre>
&lt;filterset id=&quot;myFilterSet&quot; begintoken=&quot;%&quot; endtoken=&quot;*&quot;&gt; &lt;filterset id=&quot;myFilterSet&quot; begintoken=&quot;%&quot; endtoken=&quot;*&quot;&gt;
&lt;filter token=&quot;DATE&quot; value=&quot;${TODAY}&quot;/&gt; &lt;filter token=&quot;DATE&quot; value=&quot;${TODAY}&quot;/&gt;
&lt;/filterset&gt; &lt;/filterset&gt;
@@ -181,12 +181,12 @@ but wish to replace the token <code>%DATE*</code> with today's date.</p>
&lt;copy file=&quot;${build.dir}/version.txt&quot; toFile=&quot;${dist.dir}/version.txt&quot;&gt; &lt;copy file=&quot;${build.dir}/version.txt&quot; toFile=&quot;${dist.dir}/version.txt&quot;&gt;
&lt;filterset refid=&quot;myFilterSet&quot;/&gt; &lt;filterset refid=&quot;myFilterSet&quot;/&gt;
&lt;/copy&gt; &lt;/copy&gt;
</pre></blockquote>
</pre>


<p>You are copying the <code>version.txt</code> file to the <code>dist</code> <p>You are copying the <code>version.txt</code> file to the <code>dist</code>
directory from the <code>build</code> directory directory from the <code>build</code> directory
but wish to replace the token <code>&#64;project.date&#64;</code> with the property of the same name.</p> but wish to replace the token <code>&#64;project.date&#64;</code> with the property of the same name.</p>
<blockquote><pre>
<pre>
&lt;copy file=&quot;${build.dir}/version.txt&quot; toFile=&quot;${dist.dir}/version.txt&quot;&gt; &lt;copy file=&quot;${build.dir}/version.txt&quot; toFile=&quot;${dist.dir}/version.txt&quot;&gt;
&lt;filterset&gt; &lt;filterset&gt;
&lt;propertyset&gt; &lt;propertyset&gt;
@@ -194,5 +194,6 @@ but wish to replace the token <code>&#64;project.date&#64;</code> with the prope
&lt;/propertyset&gt; &lt;/propertyset&gt;
&lt;/filterset&gt; &lt;/filterset&gt;
&lt;/copy&gt; &lt;/copy&gt;
</pre></blockquote>
</body></html>
</pre>
</body>
</html>

+ 36
- 36
manual/Types/mapper.html View File

@@ -117,10 +117,10 @@ implicitly configured as a <a href="#composite-mapper">composite mapper</a>.
<p>The target file name is identical to the source file name. Both <p>The target file name is identical to the source file name. Both
<code>to</code> and <code>from</code> will be ignored.</p> <code>to</code> and <code>from</code> will be ignored.</p>
<b>Examples:</b> <b>Examples:</b>
<blockquote><pre>
<pre>
&lt;mapper type=&quot;identity&quot;/&gt; &lt;mapper type=&quot;identity&quot;/&gt;
&lt;identitymapper/&gt; &lt;identitymapper/&gt;
</pre></blockquote>
</pre>
<table> <table>
<tr> <tr>
<td valign="top"><b>Source file name</b></td> <td valign="top"><b>Source file name</b></td>
@@ -153,10 +153,10 @@ implicitly configured as a <a href="#composite-mapper">composite mapper</a>.
leading directory information stripped off. Both <code>to</code> and leading directory information stripped off. Both <code>to</code> and
<code>from</code> will be ignored.</p> <code>from</code> will be ignored.</p>
<b>Examples:</b> <b>Examples:</b>
<blockquote><pre>
<pre>
&lt;mapper type=&quot;flatten&quot;/&gt; &lt;mapper type=&quot;flatten&quot;/&gt;
&lt;flattenmapper/&gt; &lt;flattenmapper/&gt;
</pre></blockquote>
</pre>
<table> <table>
<tr> <tr>
<td valign="top"><b>Source file name</b></td> <td valign="top"><b>Source file name</b></td>
@@ -188,10 +188,10 @@ leading directory information stripped off. Both <code>to</code> and
<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>
<pre>
&lt;mapper type=&quot;merge&quot; to=&quot;archive.tar&quot;/&gt; &lt;mapper type=&quot;merge&quot; to=&quot;archive.tar&quot;/&gt;
&lt;mergemapper to=&quot;archive.tar&quot;/&gt; &lt;mergemapper to=&quot;archive.tar&quot;/&gt;
</pre></blockquote>
</pre>
<table> <table>
<tr> <tr>
<td valign="top"><b>Source file name</b></td> <td valign="top"><b>Source file name</b></td>
@@ -228,10 +228,10 @@ the <code>to</code> pattern with the text that matches the
<code>*</code> in the <code>from</code> pattern. Source file names <code>*</code> in the <code>from</code> pattern. Source file names
that don't match the <code>from</code> pattern will be ignored.</p> that don't match the <code>from</code> pattern will be ignored.</p>
<b>Examples:</b> <b>Examples:</b>
<blockquote><pre>
<pre>
&lt;mapper type=&quot;glob&quot; from=&quot;*.java&quot; to=&quot;*.java.bak&quot;/&gt; &lt;mapper type=&quot;glob&quot; from=&quot;*.java&quot; to=&quot;*.java.bak&quot;/&gt;
&lt;globmapper from=&quot;*.java&quot; to=&quot;*.java.bak&quot;/&gt; &lt;globmapper from=&quot;*.java&quot; to=&quot;*.java.bak&quot;/&gt;
</pre></blockquote>
</pre>
<table> <table>
<tr> <tr>
<td valign="top"><b>Source file name</b></td> <td valign="top"><b>Source file name</b></td>
@@ -254,10 +254,10 @@ that don't match the <code>from</code> pattern will be ignored.</p>
<td valign="top">ignored</td> <td valign="top">ignored</td>
</tr> </tr>
</table> </table>
<blockquote><pre>
<pre>
&lt;mapper type=&quot;glob&quot; from=&quot;C*ies&quot; to=&quot;Q*y&quot;/&gt; &lt;mapper type=&quot;glob&quot; from=&quot;C*ies&quot; to=&quot;Q*y&quot;/&gt;
&lt;globmapper from=&quot;C*ies&quot; to=&quot;Q*y&quot;/&gt; &lt;globmapper from=&quot;C*ies&quot; to=&quot;Q*y&quot;/&gt;
</pre></blockquote>
</pre>
<table> <table>
<tr> <tr>
<td valign="top"><b>Source file name</b></td> <td valign="top"><b>Source file name</b></td>
@@ -404,10 +404,10 @@ should be used.</li>
</ul> </ul>


<b>Examples:</b> <b>Examples:</b>
<blockquote><pre>
<pre>
&lt;mapper type=&quot;regexp&quot; from=&quot;^(.*)\.java$$&quot; to=&quot;\1.java.bak&quot;/&gt; &lt;mapper type=&quot;regexp&quot; from=&quot;^(.*)\.java$$&quot; to=&quot;\1.java.bak&quot;/&gt;
&lt;regexpmapper from=&quot;^(.*)\.java$$&quot; to=&quot;\1.java.bak&quot;/&gt; &lt;regexpmapper from=&quot;^(.*)\.java$$&quot; to=&quot;\1.java.bak&quot;/&gt;
</pre></blockquote>
</pre>
<table> <table>
<tr> <tr>
<td valign="top"><b>Source file name</b></td> <td valign="top"><b>Source file name</b></td>
@@ -430,10 +430,10 @@ should be used.</li>
<td valign="top">ignored</td> <td valign="top">ignored</td>
</tr> </tr>
</table> </table>
<blockquote><pre>
<pre>
&lt;mapper type=&quot;regexp&quot; from=&quot;^(.*)/([^/]+)/([^/]*)$$&quot; to=&quot;\1/\2/\2-\3&quot;/&gt; &lt;mapper type=&quot;regexp&quot; from=&quot;^(.*)/([^/]+)/([^/]*)$$&quot; to=&quot;\1/\2/\2-\3&quot;/&gt;
&lt;regexpmapper from=&quot;^(.*)/([^/]+)/([^/]*)$$&quot; to=&quot;\1/\2/\2-\3&quot;/&gt; &lt;regexpmapper from=&quot;^(.*)/([^/]+)/([^/]*)$$&quot; to=&quot;\1/\2/\2-\3&quot;/&gt;
</pre></blockquote>
</pre>
<table> <table>
<tr> <tr>
<td valign="top"><b>Source file name</b></td> <td valign="top"><b>Source file name</b></td>
@@ -456,10 +456,10 @@ should be used.</li>
<td valign="top"><code>Classes/dir/dir2/dir2-A.properties</code></td> <td valign="top"><code>Classes/dir/dir2/dir2-A.properties</code></td>
</tr> </tr>
</table> </table>
<blockquote><pre>
<pre>
&lt;mapper type="regexp" from="^(.*)\.(.*)$$" to="\2.\1"/&gt; &lt;mapper type="regexp" from="^(.*)\.(.*)$$" to="\2.\1"/&gt;
&lt;regexpmapper from="^(.*)\.(.*)$$" to="\2.\1"/&gt; &lt;regexpmapper from="^(.*)\.(.*)$$" to="\2.\1"/&gt;
</pre></blockquote>
</pre>
<table> <table>
<tr> <tr>
<td valign="top"><b>Source file name</b></td> <td valign="top"><b>Source file name</b></td>
@@ -482,10 +482,10 @@ should be used.</li>
<td valign="top"><code>properties.Classes/dir/dir2/A</code></td> <td valign="top"><code>properties.Classes/dir/dir2/A</code></td>
</tr> </tr>
</table> </table>
<blockquote><pre>
<pre>
&lt;mapper type="regexp" from="^(.*?)(\$$[^/\\\.]*)?\.class$$" to="\1.java"/&gt; &lt;mapper type="regexp" from="^(.*?)(\$$[^/\\\.]*)?\.class$$" to="\1.java"/&gt;
&lt;regexpmapper from="^(.*?)(\$$[^/\\\.]*)?\.class$$" to="\1.java"/&gt; &lt;regexpmapper from="^(.*?)(\$$[^/\\\.]*)?\.class$$" to="\1.java"/&gt;
</pre></blockquote>
</pre>
<table> <table>
<tr> <tr>
<td valign="top"><b>Source file name</b></td> <td valign="top"><b>Source file name</b></td>
@@ -580,10 +580,10 @@ pattern placeholder. This mapper is particularly useful in combination
with <code>&lt;uptodate&gt;</code> and <code>&lt;junit&gt;</code> output.</p> with <code>&lt;uptodate&gt;</code> and <code>&lt;junit&gt;</code> output.</p>
<p>The to and from attributes are both required.</p> <p>The to and from attributes are both required.</p>
<b>Example:</b> <b>Example:</b>
<blockquote><pre>
<pre>
&lt;mapper type="package" from="*Test.java" to="TEST-*Test.xml"/&gt; &lt;mapper type="package" from="*Test.java" to="TEST-*Test.xml"/&gt;
&lt;packagemapper from="*Test.java" to="TEST-*Test.xml"/&gt; &lt;packagemapper from="*Test.java" to="TEST-*Test.xml"/&gt;
</pre></blockquote>
</pre>
<table> <table>
<tr> <tr>
<td valign="top"><b>Source file name</b></td> <td valign="top"><b>Source file name</b></td>
@@ -612,10 +612,10 @@ with <code>&lt;uptodate&gt;</code> and <code>&lt;junit&gt;</code> output.</p>
</p> </p>
<p>The to and from attributes are both required.</p> <p>The to and from attributes are both required.</p>
<b>Example:</b> <b>Example:</b>
<blockquote><pre>
<pre>
&lt;mapper type="unpackage" from="TEST-*Test.xml" to="${test.src.dir}/*Test.java"&gt; &lt;mapper type="unpackage" from="TEST-*Test.xml" to="${test.src.dir}/*Test.java"&gt;
&lt;unpackagemapper from="TEST-*Test.xml" to="${test.src.dir}/*Test.java"&gt; &lt;unpackagemapper from="TEST-*Test.xml" to="${test.src.dir}/*Test.java"&gt;
</pre></blockquote>
</pre>
<table> <table>
<tr> <tr>
<td valign="top"><b>Source file name</b></td> <td valign="top"><b>Source file name</b></td>
@@ -640,12 +640,12 @@ with <code>&lt;uptodate&gt;</code> and <code>&lt;junit&gt;</code> output.</p>
same as the order of the nested mappers; prior to Ant 1.8.0 the same as the order of the nested mappers; prior to Ant 1.8.0 the
order has been undefined.</p> order has been undefined.</p>
<b>Examples:</b> <b>Examples:</b>
<blockquote><pre>
<pre>
&lt;compositemapper&gt; &lt;compositemapper&gt;
&lt;identitymapper/&gt; &lt;identitymapper/&gt;
&lt;packagemapper from="*.java" to="*"/&gt; &lt;packagemapper from="*.java" to="*"/&gt;
&lt;/compositemapper&gt; &lt;/compositemapper&gt;
</pre></blockquote>
</pre>
<table> <table>
<tr> <tr>
<td valign="top"><b>Source file name</b></td> <td valign="top"><b>Source file name</b></td>
@@ -674,7 +674,7 @@ with <code>&lt;uptodate&gt;</code> and <code>&lt;junit&gt;</code> output.</p>
generated by the last nested mapper comprise the ultimate results of the generated by the last nested mapper comprise the ultimate results of the
mapping operation. The <i>to</i> and <i>from</i> attributes are ignored.</p> mapping operation. The <i>to</i> and <i>from</i> attributes are ignored.</p>
<b>Examples:</b> <b>Examples:</b>
<blockquote><pre>
<pre>
&lt;chainedmapper&gt; &lt;chainedmapper&gt;
&lt;flattenmapper/&gt; &lt;flattenmapper/&gt;
&lt;globmapper from="*" to="new/path/*"/&gt; &lt;globmapper from="*" to="new/path/*"/&gt;
@@ -683,7 +683,7 @@ with <code>&lt;uptodate&gt;</code> and <code>&lt;junit&gt;</code> output.</p>
&lt;globmapper from="*" to="*2"/&gt; &lt;globmapper from="*" to="*2"/&gt;
&lt;/mapper&gt; &lt;/mapper&gt;
&lt;/chainedmapper&gt; &lt;/chainedmapper&gt;
</pre></blockquote>
</pre>
<table> <table>
<tr> <tr>
<td valign="top"><b>Source file name</b></td> <td valign="top"><b>Source file name</b></td>
@@ -718,11 +718,11 @@ with <code>&lt;uptodate&gt;</code> and <code>&lt;junit&gt;</code> output.</p>
to the source file name. to the source file name.
</p> </p>
<b>Examples:</b> <b>Examples:</b>
<blockquote><pre>
<pre>
&lt;filtermapper&gt; &lt;filtermapper&gt;
&lt;replacestring from="\" to="/"/&gt; &lt;replacestring from="\" to="/"/&gt;
&lt;/filtermapper&gt; &lt;/filtermapper&gt;
</pre></blockquote>
</pre>


<table> <table>
<tr> <tr>
@@ -734,13 +734,13 @@ with <code>&lt;uptodate&gt;</code> and <code>&lt;junit&gt;</code> output.</p>
<td valign="top"><code>foo/bar/A.java</code></td> <td valign="top"><code>foo/bar/A.java</code></td>
</tr> </tr>
</table> </table>
<blockquote><pre>
<pre>
&lt;filtermapper&gt; &lt;filtermapper&gt;
&lt;scriptfilter language="beanshell"&gt; &lt;scriptfilter language="beanshell"&gt;
self.setToken(self.getToken().toUpperCase()); self.setToken(self.getToken().toUpperCase());
&lt;/scriptfilter&gt; &lt;/scriptfilter&gt;
&lt;/filtermapper&gt; &lt;/filtermapper&gt;
</pre></blockquote>
</pre>


<table> <table>
<tr> <tr>
@@ -838,12 +838,12 @@ an explanation of scripts and dependencies.
<p> <p>
<b>Example:</b> <b>Example:</b>
</p> </p>
<blockquote><pre>
<pre>
&lt;scriptmapper language="javascript"&gt; &lt;scriptmapper language="javascript"&gt;
self.addMappedName(source.toUpperCase()); self.addMappedName(source.toUpperCase());
self.addMappedName(source.toLowerCase()); self.addMappedName(source.toLowerCase());
&lt;/scriptmapper&gt; &lt;/scriptmapper&gt;
</pre></blockquote>
</pre>


<table> <table>
<tr> <tr>
@@ -907,12 +907,12 @@ list of mapped names reset after every invocation.
different from <a href="#composite-mapper">composite mapper</a> different from <a href="#composite-mapper">composite mapper</a>
which collects the results of all matching children.</p> which collects the results of all matching children.</p>
<b>Examples:</b> <b>Examples:</b>
<blockquote><pre>
<pre>
&lt;firstmatchmapper&gt; &lt;firstmatchmapper&gt;
&lt;globmapper from="*.txt" to="*.bak"/&gt; &lt;globmapper from="*.txt" to="*.bak"/&gt;
&lt;globmapper from="*A.*" to="*B.*"/&gt; &lt;globmapper from="*A.*" to="*B.*"/&gt;
&lt;/firstmatchmapper&gt; &lt;/firstmatchmapper&gt;
</pre></blockquote>
</pre>


<table> <table>
<tr> <tr>
@@ -939,9 +939,9 @@ list of mapped names reset after every invocation.
the source file name.</p> the source file name.</p>


<b>Examples:</b> <b>Examples:</b>
<blockquote><pre>
<pre>
&lt;cutdirsmapper dirs="1"/&gt; &lt;cutdirsmapper dirs="1"/&gt;
</pre></blockquote>
</pre>


<table> <table>
<tr> <tr>


+ 4
- 4
manual/Types/multirootfileset.html View File

@@ -143,25 +143,25 @@ an <code>&lt;and&gt;</code> selector container.</p>


<h4>Examples</h4> <h4>Examples</h4>


<blockquote><pre>
<pre>
&lt;multirootfileset basedirs=&quot;${build.dir},${other.project.dir}&quot;&gt; &lt;multirootfileset basedirs=&quot;${build.dir},${other.project.dir}&quot;&gt;
&lt;include name=&quot;apps/**/classes&quot;/&gt; &lt;include name=&quot;apps/**/classes&quot;/&gt;
&lt;exclude name=&quot;apps/**/*Test*&quot;/&gt; &lt;exclude name=&quot;apps/**/*Test*&quot;/&gt;
&lt;/multirootfileset&gt; &lt;/multirootfileset&gt;
</pre></blockquote>
</pre>
<p>Groups all files inside <code>classes</code> found under the <p>Groups all files inside <code>classes</code> found under the
<code>apps</code> subdirectory of <code>${build.dir}</code> or <code>apps</code> subdirectory of <code>${build.dir}</code> or
<code>${other.project.dir}</code>, except those that have the text <code>${other.project.dir}</code>, except those that have the text
<code>Test</code> in their name.</p> <code>Test</code> in their name.</p>


<blockquote><pre>
<pre>
&lt;multirootfileset&gt; &lt;multirootfileset&gt;
&lt;basedir file=&quot;${build.dir}&quot;/&gt; &lt;basedir file=&quot;${build.dir}&quot;/&gt;
&lt;basedir file=&quot;${other.project.dir}&quot; &lt;basedir file=&quot;${other.project.dir}&quot;
&lt;include name=&quot;apps/**/classes&quot;/&gt; &lt;include name=&quot;apps/**/classes&quot;/&gt;
&lt;exclude name=&quot;apps/**/*Test*&quot;/&gt; &lt;exclude name=&quot;apps/**/*Test*&quot;/&gt;
&lt;/multirootfileset&gt; &lt;/multirootfileset&gt;
</pre></blockquote>
</pre>
<p>Is equivalent to the first example but used <p>Is equivalent to the first example but used
nested <code>basedir</code> elements. The nested elements and nested <code>basedir</code> elements. The nested elements and
the <code>basedirs</code> attribute can be used at the same time and the <code>basedirs</code> attribute can be used at the same time and


+ 10
- 10
manual/Types/patternset.html View File

@@ -133,12 +133,12 @@ patterns to the parent patternset.</p>
<p>A nested patternset can be inverted using the <code>&lt;invert&gt;</code> <p>A nested patternset can be inverted using the <code>&lt;invert&gt;</code>
element. <em>Since Apache Ant 1.7.1</em></p> element. <em>Since Apache Ant 1.7.1</em></p>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;patternset id=&quot;non.test.sources&quot;&gt; &lt;patternset id=&quot;non.test.sources&quot;&gt;
&lt;include name=&quot;**/*.java&quot;/&gt; &lt;include name=&quot;**/*.java&quot;/&gt;
&lt;exclude name=&quot;**/*Test*&quot;/&gt; &lt;exclude name=&quot;**/*Test*&quot;/&gt;
&lt;/patternset&gt; &lt;/patternset&gt;
</pre></blockquote>
</pre>
<p>Builds a set of patterns that matches all <code>.java</code> files <p>Builds a set of patterns that matches all <code>.java</code> files
that do not contain the text <code>Test</code> in their name. This set that do not contain the text <code>Test</code> in their name. This set
can be <a href="../using.html#references">referred</a> to via can be <a href="../using.html#references">referred</a> to via
@@ -153,34 +153,34 @@ attribute to hold a single pattern.</p>
specify that the element should only be used if a property is set, or specify that the element should only be used if a property is set, or
that it should be used only if a property is not set.</p> that it should be used only if a property is not set.</p>
<p>For example</p> <p>For example</p>
<blockquote><pre>
<pre>
&lt;patternset id=&quot;sources&quot;&gt; &lt;patternset id=&quot;sources&quot;&gt;
&lt;include name=&quot;std/**/*.java&quot;/&gt; &lt;include name=&quot;std/**/*.java&quot;/&gt;
&lt;include name=&quot;prof/**/*.java&quot; if=&quot;professional&quot;/&gt; &lt;include name=&quot;prof/**/*.java&quot; if=&quot;professional&quot;/&gt;
&lt;exclude name=&quot;**/*Test*&quot;/&gt; &lt;exclude name=&quot;**/*Test*&quot;/&gt;
&lt;/patternset&gt; &lt;/patternset&gt;
</pre></blockquote>
</pre>
<p>will only include the files in the sub-directory <em>prof</em> if the property <p>will only include the files in the sub-directory <em>prof</em> if the property
<em>professional</em> is set to some value.</p> <em>professional</em> is set to some value.</p>
<p>The two sets</p> <p>The two sets</p>
<blockquote><pre>
<pre>
&lt;patternset includesfile=&quot;some-file&quot;/&gt; &lt;patternset includesfile=&quot;some-file&quot;/&gt;
</pre></blockquote>
</pre>
<p>and</p> <p>and</p>
<blockquote><pre>
<pre>
&lt;patternset&gt; &lt;patternset&gt;
&lt;includesfile name=&quot;some-file&quot;/&gt; &lt;includesfile name=&quot;some-file&quot;/&gt;
&lt;patternset/&gt; &lt;patternset/&gt;
</pre></blockquote>
</pre>
<p>are identical. The include patterns will be read from the file <p>are identical. The include patterns will be read from the file
<code>some-file</code>, one pattern per line.</p> <code>some-file</code>, one pattern per line.</p>
<blockquote><pre>
<pre>
&lt;patternset&gt; &lt;patternset&gt;
&lt;includesfile name=&quot;some-file&quot;/&gt; &lt;includesfile name=&quot;some-file&quot;/&gt;
&lt;includesfile name=&quot;${some-other-file}&quot; &lt;includesfile name=&quot;${some-other-file}&quot;
if=&quot;some-other-file&quot;/&gt; if=&quot;some-other-file&quot;/&gt;
&lt;patternset/&gt; &lt;patternset/&gt;
</pre></blockquote>
</pre>
<p>will also read include patterns from the file the property <p>will also read include patterns from the file the property
<code>some-other-file</code> points to, if a property of that name has <code>some-other-file</code> points to, if a property of that name has
been defined.</p> been defined.</p>


+ 6
- 6
manual/Types/permissions.html View File

@@ -114,7 +114,7 @@ If the actions are left empty all actions match, and are revoked.
</p> </p>
<h3 id="baseset">Base set</h3> <h3 id="baseset">Base set</h3>
A permissions set implicitly contains the following permissions: A permissions set implicitly contains the following permissions:
<blockquote><pre>
<pre>
&lt;grant class=&quot;java.net.SocketPermission&quot; name=&quot;localhost:1024-&quot; actions=&quot;listen&quot;&gt; &lt;grant class=&quot;java.net.SocketPermission&quot; name=&quot;localhost:1024-&quot; actions=&quot;listen&quot;&gt;
&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.version&quot; actions=&quot;read&quot;&gt; &lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.version&quot; actions=&quot;read&quot;&gt;
&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.vendor&quot; actions=&quot;read&quot;&gt; &lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.vendor&quot; actions=&quot;read&quot;&gt;
@@ -136,25 +136,25 @@ A permissions set implicitly contains the following permissions:
&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.vm.version&quot; actions=&quot;read&quot;&gt; &lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.vm.version&quot; actions=&quot;read&quot;&gt;
&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.vm.vendor&quot; actions=&quot;read&quot;&gt; &lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.vm.vendor&quot; actions=&quot;read&quot;&gt;
&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.vm.name&quot; actions=&quot;read&quot;&gt; &lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.vm.name&quot; actions=&quot;read&quot;&gt;
</pre></blockquote>
</pre>
These permissions can be revoked via <code>&lt;revoke&gt;</code> elements if necessary. These permissions can be revoked via <code>&lt;revoke&gt;</code> elements if necessary.


<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
<pre>
&lt;permissions&gt; &lt;permissions&gt;
&lt;grant class=&quot;java.security.AllPermission&quot;/&gt; &lt;grant class=&quot;java.security.AllPermission&quot;/&gt;
&lt;revoke class=&quot;java.util.PropertyPermission&quot;/&gt; &lt;revoke class=&quot;java.util.PropertyPermission&quot;/&gt;
&lt;/permissions&gt; &lt;/permissions&gt;
</pre></blockquote>
</pre>
<p> <p>
Grants all permissions to the code except for those handling Properties. Grants all permissions to the code except for those handling Properties.
</p> </p>
<blockquote><pre>
<pre>
&lt;permissions&gt; &lt;permissions&gt;
&lt;grant class=&quot;java.net.SocketPermission&quot; name=&quot;foo.bar.com&quot; action=&quot;connect&quot;/&gt; &lt;grant class=&quot;java.net.SocketPermission&quot; name=&quot;foo.bar.com&quot; action=&quot;connect&quot;/&gt;
&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;user.home&quot; action=&quot;read,write&quot;/&gt; &lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;user.home&quot; action=&quot;read,write&quot;/&gt;
&lt;/permissions&gt; &lt;/permissions&gt;
</pre></blockquote>
</pre>
<p> <p>
Grants the base set of permissions with the addition of a SocketPermission to connect 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. to foo.bar.com and the permission to read and write the user.home system property.


+ 5
- 6
manual/Types/propertyset.html View File

@@ -56,8 +56,7 @@ supports this.</p>


<h4>propertyref</h4> <h4>propertyref</h4>


<p>Selects properties from the current project to be included in the
set.</p>
<p>Selects properties from the current project to be included in the set.</p>


<table> <table>
<tr> <tr>
@@ -100,7 +99,7 @@ set.</p>


<p>For example:</p> <p>For example:</p>


<blockquote><pre>
<pre>
&lt;propertyset id=&quot;properties-starting-with-foo&quot;&gt; &lt;propertyset id=&quot;properties-starting-with-foo&quot;&gt;
&lt;propertyref prefix=&quot;foo&quot;/&gt; &lt;propertyref prefix=&quot;foo&quot;/&gt;
&lt;/propertyset&gt; &lt;/propertyset&gt;
@@ -111,7 +110,7 @@ set.</p>
&lt;propertyset refid=&quot;properties-starting-with-foo&quot;/&gt; &lt;propertyset refid=&quot;properties-starting-with-foo&quot;/&gt;
&lt;propertyset refid=&quot;properties-starting-with-bar&quot;/&gt; &lt;propertyset refid=&quot;properties-starting-with-bar&quot;/&gt;
&lt;/propertyset&gt; &lt;/propertyset&gt;
</pre></blockquote>
</pre>


<p>collects all properties whose name starts with either <p>collects all properties whose name starts with either
&quot;foo&quot; or &quot;bar&quot; in the set named &quot;foo&quot; or &quot;bar&quot; in the set named
@@ -123,12 +122,12 @@ set.</p>
specified. The mapper is used to change the names of the property specified. The mapper is used to change the names of the property
keys, for example: keys, for example:


<blockquote><pre>
<pre>
&lt;propertyset id=&quot;properties-starting-with-foo&quot;&gt; &lt;propertyset id=&quot;properties-starting-with-foo&quot;&gt;
&lt;propertyref prefix=&quot;foo&quot;/&gt; &lt;propertyref prefix=&quot;foo&quot;/&gt;
&lt;mapper type=&quot;glob&quot; from=&quot;foo*&quot; to=&quot;bar*&quot;/&gt; &lt;mapper type=&quot;glob&quot; from=&quot;foo*&quot; to=&quot;bar*&quot;/&gt;
&lt;/propertyset&gt; &lt;/propertyset&gt;
</pre></blockquote>
</pre>


<p>collects all properties whose name starts with &quot;foo&quot;, but <p>collects all properties whose name starts with &quot;foo&quot;, but
changes the names to start with &quot;bar&quot; instead.</p> changes the names to start with &quot;bar&quot; instead.</p>


+ 5
- 15
manual/Types/regexp.html View File

@@ -42,15 +42,11 @@ Regexp represents a regular expression.
</table> </table>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote><pre>
&lt;regexp id="myregexp" pattern="alpha(.+)beta"/&gt;<br>
</pre></blockquote>
<pre>&lt;regexp id="myregexp" pattern="alpha(.+)beta"/&gt;</pre>
<p> <p>
Defines a regular expression for later use with id myregexp. Defines a regular expression for later use with id myregexp.
</p> </p>
<blockquote><pre>
&lt;regexp refid="myregexp"/&gt;<br>
</pre></blockquote>
<pre>&lt;regexp refid="myregexp"/&gt;</pre>
<p> <p>
Use the regular expression with id myregexp. Use the regular expression with id myregexp.
</p> </p>
@@ -67,15 +63,9 @@ See <a href="../install.html#librarydependencies">installation dependencies</a>
The property <code>ant.regexp.regexpimpl</code> governs which regular expression implementation will be chosen. The property <code>ant.regexp.regexpimpl</code> governs which regular expression implementation will be chosen.
Possible values for this property are:</p> Possible values for this property are:</p>
<ul> <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>
<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> </ul>
<p>It can also be another implementation of the interface <code>org.apache.tools.ant.util.regexp.Regexp</code>. <p>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 uses Jdk14Regexp as this is always available.</p> If <code>ant.regexp.regexpimpl</code> is not defined, Ant uses Jdk14Regexp as this is always available.</p>


+ 0
- 2
manual/Types/resources.html View File

@@ -440,7 +440,6 @@ Ant's "legacy" datatypes have been modified to behave as Resource Collections:
preserving the order of nested collections as well as preserving the order of nested collections as well as
duplicate resources (contrast with <a href="#union">union</a>). duplicate resources (contrast with <a href="#union">union</a>).
</p> </p>
<blockquote>
<table> <table>
<tr> <tr>
<td valign="top"><b>Attribute</b></td> <td valign="top"><b>Attribute</b></td>
@@ -453,7 +452,6 @@ Ant's "legacy" datatypes have been modified to behave as Resource Collections:
<td valign="top" align="center">No, default <i>false</i></td> <td valign="top" align="center">No, default <i>false</i></td>
</tr> </tr>
</table> </table>
</blockquote>


<h4 id="files">files</h4> <h4 id="files">files</h4>
<p>A group of files. These files are matched by <b>absolute</b> patterns <p>A group of files. These files are matched by <b>absolute</b> patterns


+ 50
- 50
manual/Types/selectors.html View File

@@ -151,11 +151,11 @@


<p>Here is an example of how to use the Contains Selector:</p> <p>Here is an example of how to use the Contains Selector:</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${doc.path}&quot; includes=&quot;**/*.html&quot;&gt; &lt;fileset dir=&quot;${doc.path}&quot; includes=&quot;**/*.html&quot;&gt;
&lt;contains text=&quot;script&quot; casesensitive=&quot;no&quot;/&gt; &lt;contains text=&quot;script&quot; casesensitive=&quot;no&quot;/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>


<p>Selects all the HTML files that contain the string <p>Selects all the HTML files that contain the string
<code>script</code>.</p> <code>script</code>.</p>
@@ -232,11 +232,11 @@


<p>Here is an example of how to use the Date Selector:</p> <p>Here is an example of how to use the Date Selector:</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${jar.path}&quot; includes=&quot;**/*.jar&quot;&gt; &lt;fileset dir=&quot;${jar.path}&quot; includes=&quot;**/*.jar&quot;&gt;
&lt;date datetime=&quot;01/01/2001 12:00 AM&quot; when=&quot;before&quot;/&gt; &lt;date datetime=&quot;01/01/2001 12:00 AM&quot; when=&quot;before&quot;/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>


<p>Selects all JAR files which were last modified before midnight <p>Selects all JAR files which were last modified before midnight
January 1, 2001.</p> January 1, 2001.</p>
@@ -282,11 +282,11 @@


<p>Here is an example of how to use the Depend Selector:</p> <p>Here is an example of how to use the Depend Selector:</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${ant.1.5}/src/main&quot; includes=&quot;**/*.java&quot;&gt; &lt;fileset dir=&quot;${ant.1.5}/src/main&quot; includes=&quot;**/*.java&quot;&gt;
&lt;depend targetdir=&quot;${ant.1.4.1}/src/main&quot;/&gt; &lt;depend targetdir=&quot;${ant.1.4.1}/src/main&quot;/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>


<p>Selects all the Java source files which were modified in the <p>Selects all the Java source files which were modified in the
1.5 release. 1.5 release.
@@ -324,11 +324,11 @@


<p>Here is an example of how to use the Depth Selector:</p> <p>Here is an example of how to use the Depth Selector:</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${doc.path}&quot; includes=&quot;**/*&quot;&gt; &lt;fileset dir=&quot;${doc.path}&quot; includes=&quot;**/*&quot;&gt;
&lt;depth max=&quot;1&quot;/&gt; &lt;depth max=&quot;1&quot;/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>


<p>Selects all files in the base directory and one directory below <p>Selects all files in the base directory and one directory below
that.</p> that.</p>
@@ -410,12 +410,12 @@


<p>Here is an example of how to use the Different Selector:</p> <p>Here is an example of how to use the Different Selector:</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${ant.1.5}/src/main&quot; includes=&quot;**/*.java&quot;&gt; &lt;fileset dir=&quot;${ant.1.5}/src/main&quot; includes=&quot;**/*.java&quot;&gt;
&lt;different targetdir=&quot;${ant.1.4.1}/src/main&quot; &lt;different targetdir=&quot;${ant.1.4.1}/src/main&quot;
ignoreFileTimes="true"/&gt; ignoreFileTimes="true"/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>


<p>Compares all the Java source files between the 1.4.1 and the 1.5 release <p>Compares all the Java source files between the 1.4.1 and the 1.5 release
and selects those who are different, disregarding file times. and selects those who are different, disregarding file times.
@@ -470,11 +470,11 @@


<p>Here is an example of how to use the Filename Selector:</p> <p>Here is an example of how to use the Filename Selector:</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${doc.path}&quot; includes=&quot;**/*&quot;&gt; &lt;fileset dir=&quot;${doc.path}&quot; includes=&quot;**/*&quot;&gt;
&lt;filename name=&quot;**/*.css&quot;/&gt; &lt;filename name=&quot;**/*.css&quot;/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>


<p>Selects all the cascading style sheet files.</p> <p>Selects all the cascading style sheet files.</p>


@@ -526,11 +526,11 @@


<p>Here is an example of how to use the Present Selector:</p> <p>Here is an example of how to use the Present Selector:</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${ant.1.5}/src/main&quot; includes=&quot;**/*.java&quot;&gt; &lt;fileset dir=&quot;${ant.1.5}/src/main&quot; includes=&quot;**/*.java&quot;&gt;
&lt;present present=&quot;srconly&quot; targetdir=&quot;${ant.1.4.1}/src/main&quot;/&gt; &lt;present present=&quot;srconly&quot; targetdir=&quot;${ant.1.4.1}/src/main&quot;/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>


<p>Selects all the Java source files which are new in the <p>Selects all the Java source files which are new in the
1.5 release. 1.5 release.
@@ -585,11 +585,11 @@


<p>Here is an example of how to use the regular expression Selector:</p> <p>Here is an example of how to use the regular expression Selector:</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${doc.path}&quot; includes=&quot;*.txt&quot;&gt; &lt;fileset dir=&quot;${doc.path}&quot; includes=&quot;*.txt&quot;&gt;
&lt;containsregexp expression=&quot;[4-6]\.[0-9]&quot;/&gt; &lt;containsregexp expression=&quot;[4-6]\.[0-9]&quot;/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>


<p>Selects all the text files that match the regular expression <p>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). (have a 4,5 or 6 followed by a period and a number from 0 to 9).
@@ -643,14 +643,14 @@


<p>Here is an example of how to use the Size Selector:</p> <p>Here is an example of how to use the Size Selector:</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${jar.path}&quot;&gt; &lt;fileset dir=&quot;${jar.path}&quot;&gt;
&lt;patternset&gt; &lt;patternset&gt;
&lt;include name=&quot;**/*.jar&quot;/&gt; &lt;include name=&quot;**/*.jar&quot;/&gt;
&lt;/patternset&gt; &lt;/patternset&gt;
&lt;size value=&quot;4&quot; units=&quot;Ki&quot; when=&quot;more&quot;/&gt; &lt;size value=&quot;4&quot; units=&quot;Ki&quot; when=&quot;more&quot;/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>


<p>Selects all JAR files that are larger than 4096 bytes.</p> <p>Selects all JAR files that are larger than 4096 bytes.</p>


@@ -681,24 +681,24 @@
<p>Here is an example of how to use the Type Selector to select only <p>Here is an example of how to use the Type Selector to select only
directories in <code>${src}</code></p> directories in <code>${src}</code></p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${src}&quot;&gt; &lt;fileset dir=&quot;${src}&quot;&gt;
&lt;type type="dir"/&gt; &lt;type type="dir"/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>


<p>The Type Selector is often used in conjunction with other selectors. <p>The Type Selector is often used in conjunction with other selectors.
For example, to select files that also exist in a <code>template</code> For example, to select files that also exist in a <code>template</code>
directory, but avoid selecting empty directories, use: directory, but avoid selecting empty directories, use:


<blockquote><pre>
<pre>
&lt;fileset dir="${src}"&gt; &lt;fileset dir="${src}"&gt;
&lt;and&gt; &lt;and&gt;
&lt;present targetdir="template"/&gt; &lt;present targetdir="template"/&gt;
&lt;type type="file"/&gt; &lt;type type="file"/&gt;
&lt;/and&gt; &lt;/and&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>


<h4 id="modified">Modified Selector</h4> <h4 id="modified">Modified Selector</h4>
<p>The <code>&lt;modified&gt;</code> selector computes a value for a file, compares that <p>The <code>&lt;modified&gt;</code> selector computes a value for a file, compares that
@@ -892,18 +892,18 @@
<h5>Examples</h5> <h5>Examples</h5>
<p>Here are some examples of how to use the Modified Selector:</p> <p>Here are some examples of how to use the Modified Selector:</p>


<blockquote><pre>
<pre>
&lt;copy todir="dest"&gt; &lt;copy todir="dest"&gt;
&lt;fileset dir="src"&gt; &lt;fileset dir="src"&gt;
&lt;modified/&gt; &lt;modified/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
&lt;/copy&gt; &lt;/copy&gt;
</pre></blockquote>
</pre>
<p>This will copy all files from <i>src</i> to <i>dest</i> which content has changed. <p>This will copy all files from <i>src</i> to <i>dest</i> which content has changed.
Using an updating PropertyfileCache with cache.properties and Using an updating PropertyfileCache with cache.properties and
MD5-DigestAlgorithm.</p> MD5-DigestAlgorithm.</p>


<blockquote><pre>
<pre>
&lt;copy todir="dest"&gt; &lt;copy todir="dest"&gt;
&lt;fileset dir="src"&gt; &lt;fileset dir="src"&gt;
&lt;modified update="true" &lt;modified update="true"
@@ -916,11 +916,11 @@
&lt;/modified&gt; &lt;/modified&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
&lt;/copy&gt; &lt;/copy&gt;
</pre></blockquote>
</pre>
<p>This is the same example rewritten as CoreSelector with setting the all the values <p>This is the same example rewritten as CoreSelector with setting the all the values
(same as defaults are).</p> (same as defaults are).</p>


<blockquote><pre>
<pre>
&lt;copy todir="dest"&gt; &lt;copy todir="dest"&gt;
&lt;fileset dir="src"&gt; &lt;fileset dir="src"&gt;
&lt;custom class="org.apache.tools.ant.types.selectors.modifiedselector.ModifiedSelector"&gt; &lt;custom class="org.apache.tools.ant.types.selectors.modifiedselector.ModifiedSelector"&gt;
@@ -934,10 +934,10 @@
&lt;/custom&gt; &lt;/custom&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
&lt;/copy&gt; &lt;/copy&gt;
</pre></blockquote>
</pre>
<p>And this is the same rewritten as CustomSelector.</p> <p>And this is the same rewritten as CustomSelector.</p>


<blockquote><pre>
<pre>
&lt;target name="generate-and-upload-site"&gt; &lt;target name="generate-and-upload-site"&gt;
&lt;echo&gt; generate the site using forrest &lt;/echo&gt; &lt;echo&gt; generate the site using forrest &lt;/echo&gt;
&lt;antcall target="site"/&gt; &lt;antcall target="site"/&gt;
@@ -949,19 +949,19 @@
&lt;/fileset&gt; &lt;/fileset&gt;
&lt;/ftp&gt; &lt;/ftp&gt;
&lt;/target&gt; &lt;/target&gt;
</pre></blockquote>
</pre>
<p>A useful scenario for this selector inside a build environment <p>A useful scenario for this selector inside a build environment
for homepage generation (e.g. with <a href="http://xml.apache.org/forrest/"> for homepage generation (e.g. with <a href="http://xml.apache.org/forrest/">
Apache Forrest</a>). Here all <b>changed</b> files are uploaded to the server. The Apache Forrest</a>). Here all <b>changed</b> files are uploaded to the server. The
CacheSelector saves therefore much upload time.</p> CacheSelector saves therefore much upload time.</p>


<blockquote><pre>
<pre>
&lt;modified cacheclassname="com.mycompany.MyCache"&gt; &lt;modified cacheclassname="com.mycompany.MyCache"&gt;
&lt;classpath&gt; &lt;classpath&gt;
&lt;pathelement location="lib/mycompany-antutil.jar"/&gt; &lt;pathelement location="lib/mycompany-antutil.jar"/&gt;
&lt;/classpath&gt; &lt;/classpath&gt;
&lt;/modified&gt; &lt;/modified&gt;
</pre></blockquote>
</pre>
<p>Uses <tt>com.mycompany.MyCache</tt> from a jar outside of Ants own classpath <p>Uses <tt>com.mycompany.MyCache</tt> from a jar outside of Ants own classpath
as cache implementation</p> as cache implementation</p>


@@ -1277,14 +1277,14 @@ Select files whose filename length is even.


<p>Here is an example of how to use the And Selector:</p> <p>Here is an example of how to use the And Selector:</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${dist}&quot; includes=&quot;**/*.jar&quot;&gt; &lt;fileset dir=&quot;${dist}&quot; includes=&quot;**/*.jar&quot;&gt;
&lt;and&gt; &lt;and&gt;
&lt;size value=&quot;4&quot; units=&quot;Ki&quot; when=&quot;more&quot;/&gt; &lt;size value=&quot;4&quot; units=&quot;Ki&quot; when=&quot;more&quot;/&gt;
&lt;date datetime=&quot;01/01/2001 12:00 AM&quot; when=&quot;before&quot;/&gt; &lt;date datetime=&quot;01/01/2001 12:00 AM&quot; when=&quot;before&quot;/&gt;
&lt;/and&gt; &lt;/and&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>


<p>Selects all the JAR file larger than 4096 bytes which haven't been update <p>Selects all the JAR file larger than 4096 bytes which haven't been update
since the last millennium. since the last millennium.
@@ -1315,7 +1315,7 @@ Select files whose filename length is even.


<p>Here is an example of how to use the Majority Selector:</p> <p>Here is an example of how to use the Majority Selector:</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${docs}&quot; includes=&quot;**/*.html&quot;&gt; &lt;fileset dir=&quot;${docs}&quot; includes=&quot;**/*.html&quot;&gt;
&lt;majority&gt; &lt;majority&gt;
&lt;contains text=&quot;project&quot; casesensitive="false"/&gt; &lt;contains text=&quot;project&quot; casesensitive="false"/&gt;
@@ -1323,7 +1323,7 @@ Select files whose filename length is even.
&lt;contains text=&quot;IntrospectionHelper&quot; casesensitive="true"/&gt; &lt;contains text=&quot;IntrospectionHelper&quot; casesensitive="true"/&gt;
&lt;/majority&gt; &lt;/majority&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>


<p>Selects all the HTML files which contain at least two of the three <p>Selects all the HTML files which contain at least two of the three
phrases "project", "taskdef", and "IntrospectionHelper" (this last phrase must phrases "project", "taskdef", and "IntrospectionHelper" (this last phrase must
@@ -1340,7 +1340,7 @@ Select files whose filename length is even.


<p>Here is an example of how to use the None Selector:</p> <p>Here is an example of how to use the None Selector:</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${src}&quot; includes=&quot;**/*.java&quot;&gt; &lt;fileset dir=&quot;${src}&quot; includes=&quot;**/*.java&quot;&gt;
&lt;none&gt; &lt;none&gt;
&lt;present targetdir=&quot;${dest}&quot;/&gt; &lt;present targetdir=&quot;${dest}&quot;/&gt;
@@ -1349,7 +1349,7 @@ Select files whose filename length is even.
&lt;/present&gt; &lt;/present&gt;
&lt;/none&gt; &lt;/none&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>


<p>Selects only Java files which do not have equivalent java or <p>Selects only Java files which do not have equivalent java or
class files in the dest directory. class files in the dest directory.
@@ -1363,13 +1363,13 @@ Select files whose filename length is even.


<p>Here is an example of how to use the Not Selector:</p> <p>Here is an example of how to use the Not Selector:</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${src}&quot; includes=&quot;**/*.java&quot;&gt; &lt;fileset dir=&quot;${src}&quot; includes=&quot;**/*.java&quot;&gt;
&lt;not&gt; &lt;not&gt;
&lt;contains text=&quot;test&quot;/&gt; &lt;contains text=&quot;test&quot;/&gt;
&lt;/not&gt; &lt;/not&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>


<p>Selects all the files in the src directory that do not contain the <p>Selects all the files in the src directory that do not contain the
string "test". string "test".
@@ -1385,7 +1385,7 @@ Select files whose filename length is even.


<p>Here is an example of how to use the Or Selector:</p> <p>Here is an example of how to use the Or Selector:</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${basedir}&quot;&gt; &lt;fileset dir=&quot;${basedir}&quot;&gt;
&lt;or&gt; &lt;or&gt;
&lt;depth max=&quot;0&quot;/&gt; &lt;depth max=&quot;0&quot;/&gt;
@@ -1394,7 +1394,7 @@ Select files whose filename length is even.
&lt;filename name="*.jpg"/&gt; &lt;filename name="*.jpg"/&gt;
&lt;/or&gt; &lt;/or&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>


<p>Selects all the files in the top directory along with all the <p>Selects all the files in the top directory along with all the
image files below it. image files below it.
@@ -1442,7 +1442,7 @@ Select files whose filename length is even.


<p>Here is an example of how to use the Selector Reference:</p> <p>Here is an example of how to use the Selector Reference:</p>


<blockquote><pre>
<pre>
&lt;project default=&quot;all&quot; basedir=&quot;./ant&quot;&gt; &lt;project default=&quot;all&quot; basedir=&quot;./ant&quot;&gt;


&lt;selector id=&quot;completed&quot;&gt; &lt;selector id=&quot;completed&quot;&gt;
@@ -1465,7 +1465,7 @@ Select files whose filename length is even.
&lt;/target&gt; &lt;/target&gt;


&lt;/project&gt; &lt;/project&gt;
</pre></blockquote>
</pre>


<p>Zips up all the Java files which have an up-to-date equivalent <p>Zips up all the Java files which have an up-to-date equivalent
class file and javadoc file associated with them. class file and javadoc file associated with them.
@@ -1474,7 +1474,7 @@ Select files whose filename length is even.
<p>And an example of selecting files conditionally, based on whether <p>And an example of selecting files conditionally, based on whether
properties are set:</p> properties are set:</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${working.copy}&quot;&gt; &lt;fileset dir=&quot;${working.copy}&quot;&gt;
&lt;or&gt; &lt;or&gt;
&lt;selector if=&quot;include.tests&quot;&gt; &lt;selector if=&quot;include.tests&quot;&gt;
@@ -1492,7 +1492,7 @@ Select files whose filename length is even.
&lt;/selector&gt; &lt;/selector&gt;
&lt;/or&gt; &lt;/or&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>


<p>A fileset that conditionally contains Java source files and Test <p>A fileset that conditionally contains Java source files and Test
source and class files.</p> source and class files.</p>
@@ -1550,13 +1550,13 @@ Select files whose filename length is even.
use your class as a selector: use your class as a selector:
</p> </p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${mydir}&quot; includes=&quot;**/*&quot;&gt; &lt;fileset dir=&quot;${mydir}&quot; includes=&quot;**/*&quot;&gt;
&lt;custom classname=&quot;com.mydomain.MySelector&quot;&gt; &lt;custom classname=&quot;com.mydomain.MySelector&quot;&gt;
&lt;param name=&quot;myattribute&quot; value=&quot;myvalue&quot;/&gt; &lt;param name=&quot;myattribute&quot; value=&quot;myvalue&quot;/&gt;
&lt;/custom&gt; &lt;/custom&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>


<p>A number of core selectors can also be used as custom selectors <p>A number of core selectors can also be used as custom selectors
by specifying their attributes using <code>&lt;param&gt;</code> elements. These by specifying their attributes using <code>&lt;param&gt;</code> elements. These
@@ -1578,13 +1578,13 @@ Select files whose filename length is even.
<p>Here is the example from the Depth Selector section rewritten <p>Here is the example from the Depth Selector section rewritten
to use the selector through <code>&lt;custom&gt;</code>.</p> to use the selector through <code>&lt;custom&gt;</code>.</p>


<blockquote><pre>
<pre>
&lt;fileset dir=&quot;${doc.path}&quot; includes=&quot;**/*&quot;&gt; &lt;fileset dir=&quot;${doc.path}&quot; includes=&quot;**/*&quot;&gt;
&lt;custom classname=&quot;org.apache.tools.ant.types.selectors.DepthSelector&quot;&gt; &lt;custom classname=&quot;org.apache.tools.ant.types.selectors.DepthSelector&quot;&gt;
&lt;param name=&quot;max&quot; value=&quot;1&quot;/&gt; &lt;param name=&quot;max&quot; value=&quot;1&quot;/&gt;
&lt;/custom&gt; &lt;/custom&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
</pre></blockquote>
</pre>


<p>Selects all files in the base directory and one directory below <p>Selects all files in the base directory and one directory below
that.</p> that.</p>


+ 2
- 2
manual/Types/tarfileset.html View File

@@ -159,7 +159,7 @@ resource collection</h4>
<p>The specified resource will be used as src.</p> <p>The specified resource will be used as src.</p>


<h4>Examples</h4> <h4>Examples</h4>
<blockquote>
<pre> <pre>
&lt;copy todir="some-dir"&gt; &lt;copy todir="some-dir"&gt;
&lt;tarfileset includes="lib/**"&gt; &lt;tarfileset includes="lib/**"&gt;
@@ -168,7 +168,7 @@ resource collection</h4>
&lt;/bzip2resource&gt; &lt;/bzip2resource&gt;
&lt;/tarfileset&gt; &lt;/tarfileset&gt;
&lt;/copy&gt; &lt;/copy&gt;
</pre></blockquote>
</pre>


<p>downloads the archive some-archive.tar.bz2, uncompresses and <p>downloads the archive some-archive.tar.bz2, uncompresses and
extracts it on the fly, copies the contents of the lib directory into extracts it on the fly, copies the contents of the lib directory into


+ 8
- 8
manual/Types/xmlcatalog.html View File

@@ -241,17 +241,17 @@ resolver library from xml-commons is not available in the classpath, all
<p>Set up an XMLCatalog with a single dtd referenced locally in a user's <p>Set up an XMLCatalog with a single dtd referenced locally in a user's
home home
directory:</p> directory:</p>
<blockquote><pre>
<pre>
&lt;xmlcatalog&gt; &lt;xmlcatalog&gt;
&lt;dtd &lt;dtd
publicId=&quot;-//OASIS//DTD DocBook XML V4.1.2//EN&quot; publicId=&quot;-//OASIS//DTD DocBook XML V4.1.2//EN&quot;
location=&quot;/home/dion/downloads/docbook/docbookx.dtd&quot;/&gt; location=&quot;/home/dion/downloads/docbook/docbookx.dtd&quot;/&gt;
&lt;/xmlcatalog&gt; &lt;/xmlcatalog&gt;
</pre></blockquote>
</pre>
<p>Set up an XMLCatalog with a multiple dtds to be found either in the <p>Set up an XMLCatalog with a multiple dtds to be found either in the
filesystem (relative to the Ant project basedir) or in the classpath: filesystem (relative to the Ant project basedir) or in the classpath:
</p> </p>
<blockquote><pre>
<pre>
&lt;xmlcatalog id=&quot;commonDTDs&quot;&gt; &lt;xmlcatalog id=&quot;commonDTDs&quot;&gt;
&lt;dtd &lt;dtd
publicId=&quot;-//OASIS//DTD DocBook XML V4.1.2//EN&quot; publicId=&quot;-//OASIS//DTD DocBook XML V4.1.2//EN&quot;
@@ -260,13 +260,13 @@ filesystem (relative to the Ant project basedir) or in the classpath:
publicId=&quot;-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN&quot; publicId=&quot;-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN&quot;
location=&quot;web-app_2_2.dtd&quot;/&gt; location=&quot;web-app_2_2.dtd&quot;/&gt;
&lt;/xmlcatalog&gt; &lt;/xmlcatalog&gt;
</pre></blockquote>
</pre>


<p>Set up an XMLCatalog with a combination of DTDs and entities as <p>Set up an XMLCatalog with a combination of DTDs and entities as
well as a nested XMLCatalog and external catalog files in both well as a nested XMLCatalog and external catalog files in both
formats:</p> formats:</p>


<blockquote><pre>
<pre>
&lt;xmlcatalog id=&quot;allcatalogs&quot;&gt; &lt;xmlcatalog id=&quot;allcatalogs&quot;&gt;
&lt;dtd &lt;dtd
publicId=&quot;-//ArielPartners//DTD XML Article V1.0//EN&quot; publicId=&quot;-//ArielPartners//DTD XML Article V1.0//EN&quot;
@@ -286,9 +286,9 @@ formats:</p>
&lt;/catalogpath&gt; &lt;/catalogpath&gt;
&lt;/xmlcatalog&gt; &lt;/xmlcatalog&gt;
&lt;/xmlcatalog&gt; &lt;/xmlcatalog&gt;
</pre></blockquote>
</pre>
<p>To reference the above XMLCatalog in an <code>xslt</code> task:<p> <p>To reference the above XMLCatalog in an <code>xslt</code> task:<p>
<blockquote><pre>
<pre>
&lt;xslt basedir="${source.doc}" &lt;xslt basedir="${source.doc}"
destdir="${dest.xdocs}" destdir="${dest.xdocs}"
extension=".xml" extension=".xml"
@@ -297,7 +297,7 @@ formats:</p>
force="true"&gt; force="true"&gt;
&lt;xmlcatalog refid=&quot;allcatalogs&quot;/&gt; &lt;xmlcatalog refid=&quot;allcatalogs&quot;/&gt;
&lt;/xslt&gt; &lt;/xslt&gt;
</pre></blockquote>
</pre>


</body> </body>
</html> </html>

+ 5
- 7
manual/Types/zipfileset.html View File

@@ -130,21 +130,19 @@ single element resource collection</h4>
<p>The specified resource will be used as src.</p> <p>The specified resource will be used as src.</p>


<h4>Examples</h4> <h4>Examples</h4>
<blockquote>
<pre> &lt;zip destfile="${dist}/manual.zip"&gt;
<pre> &lt;zip destfile="${dist}/manual.zip"&gt;
&lt;zipfileset dir="htdocs/manual" prefix="docs/user-guide"/&gt; &lt;zipfileset dir="htdocs/manual" prefix="docs/user-guide"/&gt;
&lt;zipfileset dir="." includes="ChangeLog27.txt" fullpath="docs/ChangeLog.txt"/&gt; &lt;zipfileset dir="." includes="ChangeLog27.txt" fullpath="docs/ChangeLog.txt"/&gt;
&lt;zipfileset src="examples.zip" includes="**/*.html" prefix="docs/examples"/&gt; &lt;zipfileset src="examples.zip" includes="**/*.html" prefix="docs/examples"/&gt;
&lt;/zip&gt;</pre> &lt;/zip&gt;</pre>
<p>zips all files in the <code>htdocs/manual</code> directory into
<p>zips all files in the <code>htdocs/manual</code> directory into
the <code>docs/user-guide</code> directory in the archive, adds the the <code>docs/user-guide</code> directory in the archive, adds the
file <code>ChangeLog27.txt</code> in the current directory as <code>docs/ChangeLog.txt</code>, file <code>ChangeLog27.txt</code> in the current directory as <code>docs/ChangeLog.txt</code>,
and includes all the html files in <code>examples.zip</code> under <code>docs/examples</code>. and includes all the html files in <code>examples.zip</code> under <code>docs/examples</code>.
The archive might end up containing the files:</p> The archive might end up containing the files:</p>
<code>docs/user-guide/html/index.html<br>
docs/ChangeLog.txt<br>
docs/examples/index.html<br>
</code></blockquote>
<pre>docs/user-guide/html/index.html
docs/ChangeLog.txt
docs/examples/index.html</pre>


</body> </body>
</html> </html>

+ 13
- 23
manual/develop.html View File

@@ -275,7 +275,6 @@ If your task needs to nest an arbitrary type that has been defined
org.apache.tools.ant.taskdefs.condition.Condition, one may org.apache.tools.ant.taskdefs.condition.Condition, one may
have a class: have a class:
</p> </p>
<blockquote>
<pre> <pre>
public class MyTask extends Task { public class MyTask extends Task {
private List conditions = new ArrayList(); private List conditions = new ArrayList();
@@ -287,25 +286,21 @@ public class MyTask extends Task {
} }
} }
</pre> </pre>
</blockquote>
<p> <p>
One may define and use this class like this: One may define and use this class like this:
</p> </p>
<blockquote>
<pre>
<pre>
&lt;taskdef name="mytask" classname="MyTask" classpath="classes"/&gt; &lt;taskdef name="mytask" classname="MyTask" classpath="classes"/&gt;
&lt;typedef name="condition.equals" &lt;typedef name="condition.equals"
classname="org.apache.tools.ant.taskdefs.conditions.Equals"/&gt; classname="org.apache.tools.ant.taskdefs.conditions.Equals"/&gt;
&lt;mytask&gt; &lt;mytask&gt;
&lt;condition.equals arg1="${debug}" arg2="true"/&gt; &lt;condition.equals arg1="${debug}" arg2="true"/&gt;
&lt;/mytask&gt; &lt;/mytask&gt;
</pre>
</blockquote>
</pre>
<p> <p>
A more complicated example follows: A more complicated example follows:
</p> </p>
<blockquote>
<pre>
<pre>
public class Sample { public class Sample {
public static class MyFileSelector implements FileSelector { public static class MyFileSelector implements FileSelector {
public void setAttrA(int a) {} public void setAttrA(int a) {}
@@ -334,14 +329,13 @@ public class Sample {
public void setCount(int c) {} public void setCount(int c) {}
} }
} }
</pre>
</blockquote>
</pre>
<p> <p>
This class defines a number of static classes that implement/extend This class defines a number of static classes that implement/extend
Path, MyFileSelector and MyInterface. These may be defined and used Path, MyFileSelector and MyInterface. These may be defined and used
as follows: as follows:
</p> </p>
<pre>
<pre>
&lt;typedef name="myfileselector" classname="Sample$MyFileSelector" &lt;typedef name="myfileselector" classname="Sample$MyFileSelector"
classpath="classes" loaderref="classes"/&gt; classpath="classes" loaderref="classes"/&gt;
&lt;typedef name="buildpath" classname="Sample$BuildPath" &lt;typedef name="buildpath" classname="Sample$BuildPath"
@@ -358,7 +352,7 @@ public class Sample {
&lt;/myfileselector&gt; &lt;/myfileselector&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
&lt;/copy&gt; &lt;/copy&gt;
</pre>
</pre>


<h3 id="taskcontainer">TaskContainer</h3> <h3 id="taskcontainer">TaskContainer</h3>


@@ -382,7 +376,7 @@ invoke <code>perform</code> on these instances instead of
<p>Let's write our own task, which prints a message on the <p>Let's write our own task, which prints a message on the
<code>System.out</code> stream. <code>System.out</code> stream.
The task has one attribute, called <code>message</code>.</p> The task has one attribute, called <code>message</code>.</p>
<blockquote>
<pre> <pre>
package com.mydomain; package com.mydomain;


@@ -403,7 +397,7 @@ public class MyVeryOwnTask extends Task {
} }
} }
</pre> </pre>
</blockquote>
<p>It's really this simple ;-)</p> <p>It's really this simple ;-)</p>
<p>Adding your task to the system is rather simple too:</p> <p>Adding your task to the system is rather simple too:</p>
<ol> <ol>
@@ -415,7 +409,7 @@ public class MyVeryOwnTask extends Task {
</ol> </ol>


<h3>Example</h3> <h3>Example</h3>
<blockquote>
<pre> <pre>
&lt;?xml version=&quot;1.0&quot;?&gt; &lt;?xml version=&quot;1.0&quot;?&gt;


@@ -427,7 +421,6 @@ public class MyVeryOwnTask extends Task {
&lt;/target&gt; &lt;/target&gt;
&lt;/project&gt; &lt;/project&gt;
</pre> </pre>
</blockquote>


<h3>Example 2</h3> <h3>Example 2</h3>
To use a task directly from the buildfile which created it, place the To use a task directly from the buildfile which created it, place the
@@ -435,7 +428,7 @@ To use a task directly from the buildfile which created it, place the
<i>after the compilation</i>. Use the <code>classpath</code> attribute of <i>after the compilation</i>. Use the <code>classpath</code> attribute of
<code>&lt;taskdef&gt;</code> to point to where the code has just been <code>&lt;taskdef&gt;</code> to point to where the code has just been
compiled. compiled.
<blockquote>
<pre> <pre>
&lt;?xml version=&quot;1.0&quot;?&gt; &lt;?xml version=&quot;1.0&quot;?&gt;


@@ -457,7 +450,6 @@ compiled.
&lt;/target&gt; &lt;/target&gt;
&lt;/project&gt; &lt;/project&gt;
</pre> </pre>
</blockquote>


<p>Another way to add a task (more permanently), is to add the task name and <p>Another way to add a task (more permanently), is to add the task name and
implementing class name to the <code>default.properties</code> file in the implementing class name to the <code>default.properties</code> file in the
@@ -502,9 +494,9 @@ listener, of course).</p>


<p>If you wish to attach a listener from the command line you may use the <p>If you wish to attach a listener from the command line you may use the
<code>-listener</code> option. For example:</p> <code>-listener</code> option. For example:</p>
<blockquote>
<pre>ant -listener org.apache.tools.ant.XmlLogger</pre>
</blockquote>
<pre>ant -listener org.apache.tools.ant.XmlLogger</pre>
<p>will run Ant with a listener that generates an XML representation of the build progress. This <p>will run Ant with a listener that generates an XML representation of the build progress. This
listener is included with Ant, as is the default listener, which generates the logging to standard output.</p> listener is included with Ant, as is the default listener, which generates the logging to standard output.</p>


@@ -528,7 +520,6 @@ When starting your build provide your adapter class and the log library to the
build classpath and activate your logger via <code>-listener</code> option as build classpath and activate your logger via <code>-listener</code> option as
described above. described above.


<blockquote>
<pre> <pre>
public class MyLogAdapter implements BuildListener { public class MyLogAdapter implements BuildListener {


@@ -555,7 +546,6 @@ public class MyLogAdapter implements BuildListener {
// implement all methods in that way // implement all methods in that way
} }
</pre> </pre>
</blockquote>


<hr> <hr>
<h2 id="integration">Source code integration</h2> <h2 id="integration">Source code integration</h2>


+ 1
- 5
manual/ifunless.html View File

@@ -28,11 +28,10 @@
<p><em>Since Ant 1.9.1</em>, it is possible to add if and unless attributes on all tasks and nested elements using special namespaces.</p> <p><em>Since Ant 1.9.1</em>, it is possible to add if and unless attributes on all tasks and nested elements using special namespaces.</p>


<p>In order to use this feature you need to add the following namespace declarations</p> <p>In order to use this feature you need to add the following namespace declarations</p>
<blockquote><pre>
<pre>
xmlns:if=&quot;ant:if&quot; xmlns:if=&quot;ant:if&quot;
xmlns:unless=&quot;ant:unless&quot; xmlns:unless=&quot;ant:unless&quot;
</pre> </pre>
</blockquote>


<p>The if and unless namespaces support the following 3 conditions:</p> <p>The if and unless namespaces support the following 3 conditions:</p>
<ul> <ul>
@@ -40,8 +39,6 @@
<li>blank</li>true if the value of the attribute is null or empty <li>blank</li>true if the value of the attribute is null or empty
<li>set</li>true if the specified property is set <li>set</li>true if the specified property is set
</ul> </ul>

<blockquote>
<pre> <pre>
&lt;project name=&quot;tryit&quot; &lt;project name=&quot;tryit&quot;
xmlns:if=&quot;ant:if&quot; xmlns:if=&quot;ant:if&quot;
@@ -58,7 +55,6 @@
&lt;echo unless:set=&quot;onmac&quot;&gt;not running on MacOS&lt;/echo&gt; &lt;echo unless:set=&quot;onmac&quot;&gt;not running on MacOS&lt;/echo&gt;
&lt;/project&gt; &lt;/project&gt;
</pre> </pre>
</blockquote>


</body> </body>
</html> </html>

+ 7
- 15
manual/install.html View File

@@ -418,9 +418,7 @@ the optional Ant tasks need.
To do so, change to the <code>ANT_HOME</code> directory and execute the command: To do so, change to the <code>ANT_HOME</code> directory and execute the command:
</p> </p>


<blockquote>
<pre>ant -f fetch.xml -Ddest=<i>[option]</i></pre>
</blockquote>
<pre>ant -f fetch.xml -Ddest=<i>[option]</i></pre>


<p> <p>
where option is one of the following, as described above: where option is one of the following, as described above:
@@ -528,21 +526,15 @@ laptop, you have to change these settings as you roam. To set <code>ANT_OPTS</co
<p> <p>
For csh/tcsh: For csh/tcsh:
</p> </p>
<pre>
setenv ANT_OPTS "-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"
</pre>
<pre>setenv ANT_OPTS "-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"</pre>
<p> <p>
For bash: For bash:
</p> </p>
<pre>
export ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"
</pre>
<pre>export ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"</pre>
<p> <p>
For Windows, set the environment variable in the appropriate dialog box and open a new console or, by hand For Windows, set the environment variable in the appropriate dialog box and open a new console or, by hand
</p> </p>
<pre>
set ANT_OPTS = -Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080
</pre>
<pre>set ANT_OPTS = -Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080</pre>
</blockquote> </blockquote>
</li> </li>


@@ -757,9 +749,9 @@ reasons why the <a href="Tasks/chmod.html">chmod</a> task might fail (like when
different user than the one who installed Ant initially). In this case you can set the Ant different user than the one who installed Ant initially). In this case you can set the Ant
property <code>chmod.fail</code> to false when starting the build like in property <code>chmod.fail</code> to false when starting the build like in
</p> </p>
<blockquote>
<p><code>sh build.sh install -Dchmod.fail=false</code></p>
</blockquote>
<pre>sh build.sh install -Dchmod.fail=false</pre>
<p> <p>
and any error to change permission will not result in a build failure. and any error to change permission will not result in a build failure.
</p> </p>


+ 5
- 27
manual/listeners.html View File

@@ -134,15 +134,13 @@ listeners and loggers.</p>


<h3 id="DefaultLogger">DefaultLogger</h3> <h3 id="DefaultLogger">DefaultLogger</h3>
<p>Simply run Ant normally, or:</p> <p>Simply run Ant normally, or:</p>
<blockquote>
<p><code>ant -logger org.apache.tools.ant.DefaultLogger</code></p>
</blockquote>

<pre>ant -logger org.apache.tools.ant.DefaultLogger</pre>


<h3 id="NoBannerLogger">NoBannerLogger</h3> <h3 id="NoBannerLogger">NoBannerLogger</h3>
<p>Removes output of empty target output.</p> <p>Removes output of empty target output.</p>
<blockquote>
<p><code>ant -logger org.apache.tools.ant.NoBannerLogger</code></p>
</blockquote>

<pre>ant -logger org.apache.tools.ant.NoBannerLogger</pre>


<h3 id="MailLogger">MailLogger</h3> <h3 id="MailLogger">MailLogger</h3>
<p>The MailLogger captures all output logged through DefaultLogger (standard Ant <p>The MailLogger captures all output logged through DefaultLogger (standard Ant
@@ -280,9 +278,7 @@ control for turning off success or failure messages individually.</p>
</tr> </tr>
</table> </table>


<blockquote>
<p><code>ant -logger org.apache.tools.ant.listener.MailLogger</code></p>
</blockquote>
<pre>ant -logger org.apache.tools.ant.listener.MailLogger</pre>


<h3 id="AnsiColorLogger">AnsiColorLogger</h3> <h3 id="AnsiColorLogger">AnsiColorLogger</h3>


@@ -353,9 +349,7 @@ Background is one of the following:
46 -&gt; Cyan 46 -&gt; Cyan
47 -&gt; White</pre> 47 -&gt; White</pre>


<blockquote>
<pre>ant -logger org.apache.tools.ant.listener.AnsiColorLogger</pre> <pre>ant -logger org.apache.tools.ant.listener.AnsiColorLogger</pre>
</blockquote>


<h3 id="Log4jListener">Log4jListener</h3> <h3 id="Log4jListener">Log4jListener</h3>
<p><b>Deprecated:</b> Apache Log4j (1) is not developed any more. Last <p><b>Deprecated:</b> Apache Log4j (1) is not developed any more. Last
@@ -374,24 +368,19 @@ INFO or ERROR depending on whether the build failed during that stage. Message
events are logged according to their Ant logging level, mapping directly to a events are logged according to their Ant logging level, mapping directly to a
corresponding Log4j level.</p> corresponding Log4j level.</p>


<blockquote>
<pre>ant -listener org.apache.tools.ant.listener.Log4jListener</pre> <pre>ant -listener org.apache.tools.ant.listener.Log4jListener</pre>
</blockquote>


<p>To use Log4j you will need the Log4j JAR file and a 'log4j.properties' <p>To use Log4j you will need the Log4j JAR file and a 'log4j.properties'
configuration file. Both should be placed somewhere in your Ant configuration file. Both should be placed somewhere in your Ant
classpath. If the log4j.properties is in your project root folder you can classpath. If the log4j.properties is in your project root folder you can
add this with <i>-lib</i> option:</p> add this with <i>-lib</i> option:</p>


<blockquote>
<pre>ant -listener org.apache.tools.ant.listener.Log4jListener -lib .</pre> <pre>ant -listener org.apache.tools.ant.listener.Log4jListener -lib .</pre>
</blockquote>


<p>If, for example, you wanted to capture the same information output to the <p>If, for example, you wanted to capture the same information output to the
console by the DefaultLogger and send it to a file named 'build.log', you console by the DefaultLogger and send it to a file named 'build.log', you
could use the following configuration:</p> could use the following configuration:</p>


<blockquote>
<pre>log4j.rootLogger=ERROR, LogFile <pre>log4j.rootLogger=ERROR, LogFile
log4j.logger.org.apache.tools.ant.Project=INFO log4j.logger.org.apache.tools.ant.Project=INFO
log4j.logger.org.apache.tools.ant.Target=INFO log4j.logger.org.apache.tools.ant.Target=INFO
@@ -403,7 +392,6 @@ log4j.appender.LogFile.layout=org.apache.log4j.PatternLayout
log4j.appender.LogFile.layout.ConversionPattern=[%6r] %8c{1} : %m%n log4j.appender.LogFile.layout.ConversionPattern=[%6r] %8c{1} : %m%n
log4j.appender.LogFile.file=build.log log4j.appender.LogFile.file=build.log
</pre> </pre>
</blockquote>


<p>For more information about configuring Log4J see <a href="http://logging.apache.org/log4j/docs/documentation.html">its <p>For more information about configuring Log4J see <a href="http://logging.apache.org/log4j/docs/documentation.html">its
documentation page</a>.</p> documentation page</a>.</p>
@@ -421,7 +409,6 @@ For using the bridge with Ant you have to add
to your classpath (e.g. via the <code>-lib</code> option). to your classpath (e.g. via the <code>-lib</code> option).
(For using the bridge Ant 1.9.10/1.10.2 or higher is required.) (For using the bridge Ant 1.9.10/1.10.2 or higher is required.)
Translating the 1.x properties file into the 2.x xml syntax would result in Translating the 1.x properties file into the 2.x xml syntax would result in
<blockquote>
<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; <pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;Configuration status=&quot;WARN&quot;&gt; &lt;Configuration status=&quot;WARN&quot;&gt;
&lt;Appenders&gt; &lt;Appenders&gt;
@@ -442,7 +429,6 @@ Translating the 1.x properties file into the 2.x xml syntax would result in
&lt;/Loggers&gt; &lt;/Loggers&gt;
&lt;/Configuration&gt; &lt;/Configuration&gt;
</pre> </pre>
</blockquote>


<h3 id="XmlLogger">XmlLogger</h3> <h3 id="XmlLogger">XmlLogger</h3>
<p>Writes all build information out to an XML file named log.xml, or the value <p>Writes all build information out to an XML file named log.xml, or the value
@@ -459,10 +445,8 @@ this can be a relative or absolute file path, or an http URL.
If you set the property to the empty string, "", no XSLT transform If you set the property to the empty string, "", no XSLT transform
is declared at all.</p> is declared at all.</p>


<blockquote>
<pre>ant -listener org.apache.tools.ant.XmlLogger <pre>ant -listener org.apache.tools.ant.XmlLogger
ant -logger org.apache.tools.ant.XmlLogger -verbose -logfile build_log.xml</pre> ant -logger org.apache.tools.ant.XmlLogger -verbose -logfile build_log.xml</pre>
</blockquote>


<h3 id="TimestampedLogger">TimestampedLogger</h3> <h3 id="TimestampedLogger">TimestampedLogger</h3>
<p> <p>
@@ -474,9 +458,7 @@ ant -logger org.apache.tools.ant.XmlLogger -verbose -logfile build_log.xml</pre>
</pre> </pre>
<p>To use this listener, use the command:</p> <p>To use this listener, use the command:</p>


<blockquote>
<pre>ant -logger org.apache.tools.ant.listener.TimestampedLogger</pre> <pre>ant -logger org.apache.tools.ant.listener.TimestampedLogger</pre>
</blockquote>


<h3 id="BigProjectLogger">BigProjectLogger</h3> <h3 id="BigProjectLogger">BigProjectLogger</h3>
<p> <p>
@@ -528,9 +510,7 @@ Exiting project "junit"
are in charge -or more importantly, which project is failing. are in charge -or more importantly, which project is failing.
</p> </p>
<p>To use this listener, use the command:</p> <p>To use this listener, use the command:</p>
<blockquote>
<pre>ant -logger org.apache.tools.ant.listener.BigProjectLogger</pre> <pre>ant -logger org.apache.tools.ant.listener.BigProjectLogger</pre>
</blockquote>


<h3 id="SimpleBigProjectLogger">SimpleBigProjectLogger</h3> <h3 id="SimpleBigProjectLogger">SimpleBigProjectLogger</h3>
<p>Like <code>BigProjectLogger</code>, project-qualified target names are printed, <p>Like <code>BigProjectLogger</code>, project-qualified target names are printed,
@@ -558,9 +538,7 @@ Total time: 1 second
</pre> </pre>
<p><em>since Ant 1.8.1</em></p> <p><em>since Ant 1.8.1</em></p>
<p>To use this listener, use the command:</p> <p>To use this listener, use the command:</p>
<blockquote>
<pre>ant -logger org.apache.tools.ant.listener.SimpleBigProjectLogger</pre> <pre>ant -logger org.apache.tools.ant.listener.SimpleBigProjectLogger</pre>
</blockquote>


<h3 id="ProfileLogger">ProfileLogger</h3> <h3 id="ProfileLogger">ProfileLogger</h3>
<p>This logger stores the time needed for executing a task, target and the whole build and prints <p>This logger stores the time needed for executing a task, target and the whole build and prints


+ 11
- 28
manual/running.html View File

@@ -191,41 +191,30 @@ JVM documentation for more details.
</p> </p>


<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<pre>ant</pre>
</blockquote>

<pre>ant</pre>
<p>runs Ant using the <code>build.xml</code> file in the current directory, on <p>runs Ant using the <code>build.xml</code> file in the current directory, on
the default target.</p> the default target.</p>


<blockquote>
<pre>ant -buildfile test.xml</pre>
</blockquote>
<pre>ant -buildfile test.xml</pre>
<p>runs Ant using the <code>test.xml</code> file in the current directory, on <p>runs Ant using the <code>test.xml</code> file in the current directory, on
the default target.</p> the default target.</p>


<blockquote>
<pre>ant -buildfile test.xml dist</pre>
</blockquote>
<pre>ant -buildfile test.xml dist</pre>
<p>runs Ant using the <code>test.xml</code> file in the current directory, on <p>runs Ant using the <code>test.xml</code> file in the current directory, on
the target called <code>dist</code>.</p> the target called <code>dist</code>.</p>


<blockquote>
<pre>ant -buildfile test.xml -Dbuild=build/classes dist</pre>
</blockquote>
<pre>ant -buildfile test.xml -Dbuild=build/classes dist</pre>
<p>runs Ant using the <code>test.xml</code> file in the current directory, on <p>runs Ant using the <code>test.xml</code> file in the current directory, on
the target called <code>dist</code>, setting the <code>build</code> property the target called <code>dist</code>, setting the <code>build</code> property
to the value <code>build/classes</code>.</p> to the value <code>build/classes</code>.</p>


<blockquote>
<pre>ant -lib /home/ant/extras</pre>
</blockquote>
<pre>ant -lib /home/ant/extras</pre>
<p>runs Ant picking up additional task and support jars from the <p>runs Ant picking up additional task and support jars from the
/home/ant/extras location</p> /home/ant/extras location</p>


<blockquote>
<pre>ant -lib one.jar;another.jar</pre>
<pre>ant -lib one.jar -lib another.jar</pre>
</blockquote>
<pre>ant -lib one.jar;another.jar</pre>
<pre>ant -lib one.jar -lib another.jar</pre>
<p>adds two jars to Ants classpath.</p> <p>adds two jars to Ants classpath.</p>


<h3 id="files">Files</h3> <h3 id="files">Files</h3>
@@ -262,9 +251,7 @@ set):</p>
<p>Some of Ant's core classes can be configured via system properties.</p> <p>Some of Ant's core classes can be configured via system properties.</p>
<p>Here is the result of a search through the codebase. Because system properties are <p>Here is the result of a search through the codebase. Because system properties are
available via Project instance, I searched for them with a</p> available via Project instance, I searched for them with a</p>
<pre>
grep -r -n "getPropert" * &gt; ..\grep.txt
</pre>
<pre>grep -r -n "getPropert" * &gt; ..\grep.txt</pre>
<p>command. After that I filtered out the often-used but not-so-important values (most of them <p>command. After that I filtered out the often-used but not-so-important values (most of them
read-only values): <i>path.separator, ant.home, basedir, user.dir, os.name, read-only values): <i>path.separator, ant.home, basedir, user.dir, os.name,
line.separator, java.home, java.version, java.version, user.home, java.class.path</i><br> line.separator, java.home, java.version, java.version, user.home, java.class.path</i><br>
@@ -565,13 +552,9 @@ have some documentation inside.</p>
<h2 id="viajava">Running Ant via Java</h2> <h2 id="viajava">Running Ant via Java</h2>
<p>If you have installed Ant in the do-it-yourself way, Ant can be started <p>If you have installed Ant in the do-it-yourself way, Ant can be started
from one of two entry points:</p> from one of two entry points:</p>
<blockquote>
<pre>java -Dant.home=c:\ant org.apache.tools.ant.Main [options] [target]</pre>
</blockquote>


<blockquote>
<pre>java -Dant.home=c:\ant org.apache.tools.ant.launch.Launcher [options] [target]</pre>
</blockquote>
<pre>java -Dant.home=c:\ant org.apache.tools.ant.Main [options] [target]</pre>
<pre>java -Dant.home=c:\ant org.apache.tools.ant.launch.Launcher [options] [target]</pre>


<p> <p>
The first method runs Ant's traditional entry point. The second method uses The first method runs Ant's traditional entry point. The second method uses


+ 3
- 1
manual/stylesheets/style.css View File

@@ -84,11 +84,13 @@ code {


pre { pre {
background-color: #efefef; background-color: #efefef;
margin-right: 4rem;
margin-left: 4rem;
} }


/* code snippets in examples and tutorials */ /* code snippets in examples and tutorials */
.code { .code {
background: #EFEFEF;
background: #efefef;
} }


/* highlight console output */ /* highlight console output */


+ 15
- 19
manual/targets.html View File

@@ -40,12 +40,10 @@
mind that it is possible that a target can get executed earlier mind that it is possible that a target can get executed earlier
when an earlier target depends on it:</p> when an earlier target depends on it:</p>


<blockquote>
<pre>&lt;target name=&quot;A&quot;/&gt;
<pre>&lt;target name=&quot;A&quot;/&gt;
&lt;target name=&quot;B&quot; depends=&quot;A&quot;/&gt; &lt;target name=&quot;B&quot; depends=&quot;A&quot;/&gt;
&lt;target name=&quot;C&quot; depends=&quot;B&quot;/&gt; &lt;target name=&quot;C&quot; depends=&quot;B&quot;/&gt;
&lt;target name=&quot;D&quot; depends=&quot;C,B,A&quot;/&gt;</pre> &lt;target name=&quot;D&quot; depends=&quot;C,B,A&quot;/&gt;</pre>
</blockquote>


<p>Suppose we want to execute target D. From its <p>Suppose we want to execute target D. From its
<code>depends</code> attribute, you might think that first target <code>depends</code> attribute, you might think that first target
@@ -53,7 +51,7 @@
depends on A, so first A is executed, then B, then C, and finally depends on A, so first A is executed, then B, then C, and finally
D.</p> D.</p>


<blockquote><pre><b>Call-Graph:</b> A --> B --> C --> D</pre></blockquote>
<pre><b>Call-Graph:</b> A --> B --> C --> D</pre>


<p>In a chain of dependencies stretching back from a given target <p>In a chain of dependencies stretching back from a given target
such as D above, each target gets executed only once, even when such as D above, each target gets executed only once, even when
@@ -81,10 +79,8 @@
<a href="properties.html#if+unless">the properties page</a> for <a href="properties.html#if+unless">the properties page</a> for
more details. For example:</p> more details. For example:</p>


<blockquote>
<pre>&lt;target name=&quot;build-module-A&quot; if=&quot;module-A-present&quot;/&gt;</pre> <pre>&lt;target name=&quot;build-module-A&quot; if=&quot;module-A-present&quot;/&gt;</pre>
<pre>&lt;target name=&quot;build-own-fake-module-A&quot; unless=&quot;module-A-present&quot;/&gt;</pre> <pre>&lt;target name=&quot;build-own-fake-module-A&quot; unless=&quot;module-A-present&quot;/&gt;</pre>
</blockquote>


<p>In the first example, if the <code>module-A-present</code> <p>In the first example, if the <code>module-A-present</code>
property is set (to any value, e.g. <i>false</i>), the target will property is set (to any value, e.g. <i>false</i>), the target will
@@ -96,7 +92,7 @@
clause. If you want to check multiple conditions, you can use a clause. If you want to check multiple conditions, you can use a
dependent target for computing the result for the check:</p> dependent target for computing the result for the check:</p>


<blockquote><pre>
<pre>
&lt;target name="myTarget" depends="myTarget.check" if="myTarget.run"&gt; &lt;target name="myTarget" depends="myTarget.check" if="myTarget.run"&gt;
&lt;echo&gt;Files foo.txt and bar.txt are present.&lt;/echo&gt; &lt;echo&gt;Files foo.txt and bar.txt are present.&lt;/echo&gt;
&lt/target&gt; &lt/target&gt;
@@ -109,9 +105,9 @@
&lt;/and&gt; &lt;/and&gt;
&lt;/condition&gt; &lt;/condition&gt;
&lt/target&gt; &lt/target&gt;
</pre></blockquote>
</pre>


<blockquote><pre><b>Call-Graph:</b> myTarget.check --> maybe(myTarget)</pre></blockquote>
<pre><b>Call-Graph:</b> myTarget.check --> maybe(myTarget)</pre>


<p>If no <code>if</code> and no <code>unless</code> attribute is <p>If no <code>if</code> and no <code>unless</code> attribute is
present, the target will always be executed.</p> present, the target will always be executed.</p>
@@ -136,7 +132,7 @@
depend. Make sure that target is always the first one in the depend. Make sure that target is always the first one in the
depends list of the other targets. In this manual, most depends list of the other targets. In this manual, most
initialization targets have the name <code>&quot;init&quot;</code>.</p> initialization targets have the name <code>&quot;init&quot;</code>.</p>
<blockquote><pre>
<pre>
&lt;project&gt; &lt;project&gt;
&lt;target name=&quot;init&quot;&gt; &lt;target name=&quot;init&quot;&gt;
&lt;tstamp/&gt; &lt;tstamp/&gt;
@@ -145,15 +141,15 @@
... ...
&lt;/target&gt; &lt;/target&gt;
&lt;/project&gt; &lt;/project&gt;
</pre></blockquote>
</pre>


<p>Especially if you only have a few tasks you also could place these <p>Especially if you only have a few tasks you also could place these
tasks directly under the project tag (since Ant 1.6.0):</p> tasks directly under the project tag (since Ant 1.6.0):</p>
<blockquote><pre>
<pre>
&lt;project&gt; &lt;project&gt;
&lt;tstamp/&gt; &lt;tstamp/&gt;
&lt;/project&gt; &lt;/project&gt;
</pre></blockquote>
</pre>


<p>If the depends attribute and the if/unless attribute are set, the <p>If the depends attribute and the if/unless attribute are set, the
depends attribute is executed first.</p> depends attribute is executed first.</p>
@@ -263,7 +259,7 @@


<p>For example your imported build file may need to compile code, it <p>For example your imported build file may need to compile code, it
might look like:</p> might look like:</p>
<blockquote><pre>
<pre>
&lt;target name="create-directory-layout"&gt; &lt;target name="create-directory-layout"&gt;
... ...
&lt;/target&gt; &lt;/target&gt;
@@ -272,20 +268,20 @@
&lt;target name="compile" depends="ready-to-compile"&gt; &lt;target name="compile" depends="ready-to-compile"&gt;
... ...
&lt;/target&gt; &lt;/target&gt;
</pre></blockquote>
</pre>


<blockquote><pre><b>Call-Graph:</b> create-directory-layout --> 'empty slot' --> compile</pre></blockquote>
<pre><b>Call-Graph:</b> create-directory-layout --> 'empty slot' --> compile</pre>


<p>And you need to generate some source before compilation, then in <p>And you need to generate some source before compilation, then in
your main build file you may use something like</p> your main build file you may use something like</p>
<blockquote><pre>
<pre>
&lt;target name="generate-sources" &lt;target name="generate-sources"
extensionOf="ready-to-compile"&gt; extensionOf="ready-to-compile"&gt;
... ...
&lt;/target&gt; &lt;/target&gt;
</pre></blockquote>
</pre>


<blockquote><pre><b>Call-Graph:</b> create-directory-layout --> generate-sources --> compile</pre></blockquote>
<pre><b>Call-Graph:</b> create-directory-layout --> generate-sources --> compile</pre>


<p>This will ensure that the <em>generate-sources</em> target is <p>This will ensure that the <em>generate-sources</em> target is
executed before the <em>compile</em> target.</p> executed before the <em>compile</em> target.</p>


+ 5
- 5
manual/tutorial-HelloWorldWithAnt.html View File

@@ -486,11 +486,11 @@ need the HTML report just for testing, e.g. if you are fixing an error or a inte
</p> </p>


<h2 id="resources">Resources</h2> <h2 id="resources">Resources</h2>
<pre>
[1] <a href="http://www.apache.org/dist/logging/log4j/1.2.13/logging-log4j-1.2.13.zip">http://www.apache.org/dist/logging/log4j/1.2.13/logging-log4j-1.2.13.zip</a>
[2] <a href="http://logging.apache.org/log4j/docs/manual.html">http://logging.apache.org/log4j/docs/manual.html</a>
[3] <a href="http://www.junit.org/index.htm">http://www.junit.org/index.htm</a>
</pre>
<ol class="refs">
<li><a href="http://www.apache.org/dist/logging/log4j/1.2.13/logging-log4j-1.2.13.zip">http://www.apache.org/dist/logging/log4j/1.2.13/logging-log4j-1.2.13.zip</a></li>
<li><a href="http://logging.apache.org/log4j/docs/manual.html">http://logging.apache.org/log4j/docs/manual.html</a></li>
<li><a href="http://www.junit.org/index.htm">http://www.junit.org/index.htm</a></li>
</ol>


</body> </body>
</html> </html>

+ 21
- 24
manual/using.html View File

@@ -99,9 +99,9 @@ executed if the dependent target(s) did not (need to) run.
of an attribute might contain references to a property. These references will be of an attribute might contain references to a property. These references will be
resolved before the task is executed.</p> resolved before the task is executed.</p>
<p>Tasks have a common structure:</p> <p>Tasks have a common structure:</p>
<blockquote>
<pre>&lt;<i>name</i> <i>attribute1</i>=&quot;<i>value1</i>&quot; <i>attribute2</i>=&quot;<i>value2</i>&quot; ... /&gt;</pre>
</blockquote>
<pre>&lt;<i>name</i> <i>attribute1</i>=&quot;<i>value1</i>&quot; <i>attribute2</i>=&quot;<i>value2</i>&quot; ... /&gt;</pre>
<p>where <i>name</i> is the name of the task, <p>where <i>name</i> is the name of the task,
<i>attributeN</i> is the attribute name, and <i>attributeN</i> is the attribute name, and
<i>valueN</i> is the value for this attribute.</p> <i>valueN</i> is the value for this attribute.</p>
@@ -111,21 +111,21 @@ easy to <a href="develop.html#writingowntask">write your own</a>.</p>
this attribute will be used in the logging messages generated by this attribute will be used in the logging messages generated by
Ant.</p> Ant.</p>
Tasks can be assigned an <code>id</code> attribute: Tasks can be assigned an <code>id</code> attribute:
<blockquote>
<pre>&lt;<i>taskname</i> id="<i>taskID</i>" ... /&gt;</pre> <pre>&lt;<i>taskname</i> id="<i>taskID</i>" ... /&gt;</pre>
</blockquote>
where <i>taskname</i> is the name of the task, and <i>taskID</i> is where <i>taskname</i> is the name of the task, and <i>taskID</i> is
a unique identifier for this task. a unique identifier for this task.
You can refer to the You can refer to the
corresponding task object in scripts or other tasks via this name. corresponding task object in scripts or other tasks via this name.
For example, in scripts you could do: For example, in scripts you could do:
<blockquote>
<pre> <pre>
&lt;script ... &gt; &lt;script ... &gt;
task1.setFoo("bar"); task1.setFoo("bar");
&lt;/script&gt; &lt;/script&gt;
</pre> </pre>
</blockquote>
to set the <code>foo</code> attribute of this particular task instance. to set the <code>foo</code> attribute of this particular task instance.
In another task (written in Java), you can access the instance via In another task (written in Java), you can access the instance via
<code>project.getReference("task1")</code>. <code>project.getReference("task1")</code>.
@@ -356,18 +356,15 @@ via nested <code>&lt;path&gt;</code> elements:</p>
&lt;/path&gt; &lt;/path&gt;
</pre> </pre>
can be written as: can be written as:
<pre>
&lt;path id=&quot;base.path&quot; path=&quot;${classpath}&quot;/&gt;
</pre>

<h4 id="pathshortcut">Path Shortcut</h4>
<p>
<pre>&lt;path id=&quot;base.path&quot; path=&quot;${classpath}&quot;/&gt;</pre>
<h4 id="pathshortcut">Path Shortcut</h4>
<p>
In Ant 1.6 a shortcut for converting paths to OS specific strings In Ant 1.6 a shortcut for converting paths to OS specific strings
in properties has been added. One can use the expression in properties has been added. One can use the expression
${toString:<em>pathreference</em>} to convert a path element ${toString:<em>pathreference</em>} to convert a path element
reference to a string that can be used for a path argument. reference to a string that can be used for a path argument.
For example: For example:
</p>
</p>
<pre> <pre>
&lt;path id="lib.path.ref"&gt; &lt;path id="lib.path.ref"&gt;
&lt;fileset dir="lib" includes="*.jar"/&gt; &lt;fileset dir="lib" includes="*.jar"/&gt;
@@ -438,18 +435,18 @@ similar to what a (Unix) shell would do, but may create something that
is very different from what you expect under some circumstances.</p> is very different from what you expect under some circumstances.</p>


<h4>Examples</h4> <h4>Examples</h4>
<blockquote><pre>
<pre>
&lt;arg value=&quot;-l -a&quot;/&gt; &lt;arg value=&quot;-l -a&quot;/&gt;
</pre></blockquote>
</pre>
<p>is a single command-line argument containing a space character, <p>is a single command-line argument containing a space character,
<i>not</i> separate commands "-l" and "-a".</p> <i>not</i> separate commands "-l" and "-a".</p>
<blockquote><pre>
<pre>
&lt;arg line=&quot;-l -a&quot;/&gt; &lt;arg line=&quot;-l -a&quot;/&gt;
</pre></blockquote>
</pre>
<p>This is a command line with two separate arguments, "-l" and "-a".</p> <p>This is a command line with two separate arguments, "-l" and "-a".</p>
<blockquote><pre>
<pre>
&lt;arg path=&quot;/dir;/dir2:\dir3&quot;/&gt; &lt;arg path=&quot;/dir;/dir2:\dir3&quot;/&gt;
</pre></blockquote>
</pre>
<p>is a single command-line argument with the value <p>is a single command-line argument with the value
<code>\dir;\dir2;\dir3</code> on DOS-based systems and <code>\dir;\dir2;\dir3</code> on DOS-based systems and
<code>/dir:/dir2:/dir3</code> on Unix-like systems.</p> <code>/dir:/dir2:/dir3</code> on Unix-like systems.</p>
@@ -463,7 +460,7 @@ element of the same type. This can be useful if you are going to
replicate the same snippet of XML over and over again--using a replicate the same snippet of XML over and over again--using a
<code>&lt;classpath&gt;</code> structure more than once, for example.</p> <code>&lt;classpath&gt;</code> structure more than once, for example.</p>
<p>The following example:</p> <p>The following example:</p>
<blockquote><pre>
<pre>
&lt;project ... &gt; &lt;project ... &gt;
&lt;target ... &gt; &lt;target ... &gt;
&lt;rmic ...&gt; &lt;rmic ...&gt;
@@ -485,9 +482,9 @@ replicate the same snippet of XML over and over again--using a
&lt;/javac&gt; &lt;/javac&gt;
&lt;/target&gt; &lt;/target&gt;
&lt;/project&gt; &lt;/project&gt;
</pre></blockquote>
</pre>
<p>could be rewritten as:</p> <p>could be rewritten as:</p>
<blockquote><pre>
<pre>
&lt;project ... &gt; &lt;project ... &gt;
&lt;path id=&quot;project.class.path&quot;&gt; &lt;path id=&quot;project.class.path&quot;&gt;
&lt;pathelement location=&quot;lib/&quot;/&gt; &lt;pathelement location=&quot;lib/&quot;/&gt;
@@ -507,7 +504,7 @@ replicate the same snippet of XML over and over again--using a
&lt;/javac&gt; &lt;/javac&gt;
&lt;/target&gt; &lt;/target&gt;
&lt;/project&gt; &lt;/project&gt;
</pre></blockquote>
</pre>
<p>All tasks that use nested elements for <p>All tasks that use nested elements for
<a href="Types/patternset.html">PatternSet</a>s, <a href="Types/patternset.html">PatternSet</a>s,
<a href="Types/fileset.html">FileSet</a>s, <a href="Types/fileset.html">FileSet</a>s,


Loading…
Cancel
Save