You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 117 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Ant</title>
  5. </head>
  6. <body>
  7. <h1>Ant User Manual</h1>
  8. <p>by</p>
  9. <!-- Names are in alphabetical order, on last name -->
  10. <ul>
  11. <li>Jacques Bergeron (<a href="mailto:jacques.bergeron@dogico.com">jacques.bergeron@dogico.com</a>)</li>
  12. <li>Stefan Bodewig (<a href="mailto:stefan.bodewig@megabit.net">stefan.bodewig@megabit.net</a>)</li>
  13. <li>James Duncan Davison (<a href="mailto:duncan@x180.com">duncan@x180.com</a>)</li>
  14. <li>Tom Dimock (<a href="mailto:tad1@cornell.edu">tad1@cornell.edu</a>)</li>
  15. <li>Arnout J. Kuiper (<a href="mailto:ajkuiper@wxs.nl">ajkuiper@wxs.nl</a>)</li>
  16. <li>Stefano Mazzocchi (<a href="mailto:stefano@apache.org">stefano@apache.org</a>)</li>
  17. <li>Sam Ruby (<a href="mailto:rubys@us.ibm.com">rubys@us.ibm.com</a>)</li>
  18. </ul>
  19. <p>Version 1.0.8.1 - 2000/06/13</p>
  20. <hr>
  21. <h2>Table of Contents</h2>
  22. <ul>
  23. <li><a href="#introduction">Introduction</a></li>
  24. <li><a href="#getting">Getting Ant</a></li>
  25. <li><a href="#buildingant">Building Ant</a></li>
  26. <li><a href="#installing">Installing Ant</a></li>
  27. <li><a href="#running">Running Ant</a></li>
  28. <li><a href="#buildfile">Writing a simple buildfile</a>
  29. <li><a href="#directorybasedtasks">Directory based tasks</a></li>
  30. <li><a href="#tasks">Built in Tasks</a>
  31. <li><a href="#optionaltasks">Optional Tasks</a>
  32. <li><a href="#writingowntask">Writing your own task</a></li>
  33. <li><a href="#license">License</a></li>
  34. <li><a href="#feedback">Feedback</a></li>
  35. </ul>
  36. <hr>
  37. <h2><a name="introduction">Introduction</a></h2>
  38. <p>Ant is a Java based build tool. In theory it is kind of like make without
  39. make's wrinkles.</p>
  40. <h3>Why?</h3>
  41. <p>Why another build tool when there is already make, gnumake, nmake, jam, and
  42. others? Because all of those tools have limitations that its original author
  43. couldn't live with when developing software across multiple platforms. Make like
  44. tools are inherently shell based. They evaluate a set of dependencies and then
  45. execute commands not unlike what you would issue on a shell. This means that you
  46. can easily extend these tools by using or writing any program for the OS that
  47. you are working on. However, this also means that you limit yourself to the OS,
  48. or at least the OS type such as Unix, that you are working on.</p>
  49. <p>Makefiles are inherently evil as well. Anybody who has worked on them for any
  50. time has run into the dreaded tab problem. &quot;Is my command not executing
  51. because I have a space in front of my tab!!!&quot; said the original author of
  52. Ant way too many times. Tools like Jam took care of this to a great degree, but
  53. still use yet another format to use and remember.</p>
  54. <p>Ant is different. Instead a model where it is extended with shell based
  55. commands, it is extended using Java classes. Instead of writing shell commands,
  56. the configuration files are XML based calling out a target tree where various
  57. tasks get executed. Each task is run by an object which implements a particular
  58. Task interface.</p>
  59. <p>Granted, this removes some of the expressive power that is inherent by being
  60. able to construct a shell command such as `find . -name foo -exec rm {}` but it
  61. gives you the ability to be cross platform. To work anywhere and everywhere. And
  62. hey, if you really need to execute a shell command, Ant has an exec rule that
  63. allows different commands to be executed based on the OS that it is executing
  64. on.</p>
  65. <hr>
  66. <h2><a name="getting">Getting Ant</a></h2>
  67. <h3>Binary edition</h3>
  68. <p>The latest stable version of Ant can be downloaded from <a
  69. href="http://jakarta.apache.org/builds/tomcat/release/v3.0/ant.zip">http://jakarta.apache.org/builds/tomcat/release/v3.0/ant.zip</a>.
  70. If you like living on the edge, you can download the latest version from <a
  71. href="http://jakarta.apache.org/builds/tomcat/nightly/ant.zip">http://jakarta.apache.org/builds/tomcat/nightly/ant.zip</a>.</p>
  72. <h3>Source edition</h3>
  73. <p>If you prefer the source edition, you can download Ant from <a
  74. href="http://jakarta.apache.org/builds/tomcat/release/v3.0/src/jakarta-tools.src.zip">http://jakarta.apache.org/builds/tomcat/release/v3.0/src/jakarta-tools.src.zip</a>
  75. (latest stable) or from <a
  76. href="http://jakarta.apache.org/from-cvs/jakarta-tools/">http://jakarta.apache.org/from-cvs/jakarta-ant/</a>
  77. (current). See the section <a href="#buildingant">Building Ant</a> on how to
  78. build Ant from the source code.</p>
  79. <hr>
  80. <h2><a name="buildingant">Building Ant</a></h2>
  81. <p>
  82. Download and install the Java API for XML Parsing kit from
  83. <a href="http://java.sun.com/xml">http://java.sun.com/xml</a>.
  84. Make sure the "jaxp.jar" and "parser.jar" files are in your class
  85. path.
  86. </p>
  87. <p>Go to the directory <code>jakarta-ant</code>.</p>
  88. <p>Make sure the JDK is in you path.</p>
  89. <p>Run <code>bootstrap.bat</code> (Windows) or <code>bootstrap.sh</code> (UNIX)
  90. to build a bootstrap version of Ant.</p>
  91. <p>When finished, use</p>
  92. <blockquote>
  93. <p><code>build.bat -Dant.dist.dir=&lt;directory to install Ant&gt; dist</code></p>
  94. </blockquote>
  95. <p>for Windows, and</p>
  96. <blockquote>
  97. <p><code>build.sh -Dant.dist.dir=&lt;directory to install Ant&gt; dist</code></p>
  98. </blockquote>
  99. <p>for UNIX, to create a binary distribution of Ant. This distribution can be
  100. found in the directory you specified.</p>
  101. <hr>
  102. <h2><a name="installing">Installing Ant</a></h2>
  103. <p>The binary distribution of Ant consists of three directories: <code>bin</code>,
  104. <code>docs</code> and <code>lib</code>. Only the <code>bin</code> and <code>lib</code>
  105. directory are crucial for running Ant. To run Ant, the following must be done:</p>
  106. <ul>
  107. <li>Add the <code>bin</code> directory to your path.</li>
  108. <li>Set the ANT_HOME environment variable. This should be set to the directory
  109. which contains the <code>bin</code> and <code>lib</code> directory.</li>
  110. <li>Set the JAVA_HOME environment variable. This should be set to the
  111. directory where the JDK is installed.</li>
  112. </ul>
  113. <h3>Windows</h3>
  114. <p>Assume Ant is installed in <code>c:\ant\</code>. The following sets up the
  115. environment:</p>
  116. <pre>set ANT_HOME=c:\ant
  117. set JAVA_HOME=c:\jdk1.2.2
  118. set PATH=%PATH%;%ANT_HOME%\bin</pre>
  119. <h3>Unix (bash)</h3>
  120. <p>Assume Ant is installed in <code>/usr/local/ant</code>. The following sets up
  121. the environment:</p>
  122. <pre>export ANT_HOME=/usr/local/ant
  123. export JAVA_HOME=/usr/local/jdk-1.2.2
  124. export PATH=${PATH}:${ANT_HOME}/bin</pre>
  125. <h3>Advanced</h3>
  126. <p>There are lots of variants that can be used to run Ant. What you need is at
  127. least the following:</p>
  128. <p>The classpath for Ant must contain <code>ant.jar</code> and <code>xml.jar</code>.</p>
  129. <p>When you need JDK functionality (like a <a href="#javac">javac</a> task, or a
  130. <a href="#rmic">rmic</a> task), then for JDK 1.1, the <code>classes.zip</code>
  131. file of the JDK must be added to the classpath; for JDK 1.2, <code>tools.jar</code>
  132. must be added.</p>
  133. <p>When you are executing platform specific applications (like the <a
  134. href="#exec">exec</a> task, or the <a href="#cvs">cvs</a> task), the property <code>ant.home</code>
  135. must be set to the directory containing a bin directory, which contains the <code>antRun</code> shell script necessary to run execs on Unix.</p>
  136. <hr>
  137. <h2><a name="running">Running Ant</a></h2>
  138. <p>Running Ant is simple, when you installed it as described in the previous
  139. section. Just type <code>ant</code>.</p>
  140. <p>When nothing is specified, Ant looks for a <code>build.xml</code> file in the
  141. current directory. When found, it uses that file as a buildfile. To make Ant use
  142. another buildfile, use the commandline option <i>-buildfile &lt;file&gt;</i>,
  143. where <i>&lt;file&gt;</i> is the buildfile you want to use.</p>
  144. <p>You can also set properties which override properties specified in the
  145. buildfile (see the <a href="#property">property task</a>).
  146. This can be done with the <i>-D&lt;property&gt;=&lt;value&gt;</i>
  147. option, where <i>&lt;property&gt;</i> is the name of the property and <i>&lt;value&gt;</i>
  148. the value.</p>
  149. <p>To more options are <i>-quiet</i> which instructs Ant to print less
  150. information on the console when running. The option <i>-verbose</i> on the other
  151. hand makes Ant print more information on the console.</p>
  152. <p>It is also possible to specify the target that should be executed. Default
  153. the target that is mentioned in the <i>default</i> attribute of the project is
  154. used. This can be overridden by adding the target name to the end of the
  155. commandline.</p>
  156. <p>Commandline option summary:</p>
  157. <pre>ant [options] [target]
  158. Options:
  159. -help print this message
  160. -quiet be extra quiet
  161. -verbose be extra verbose
  162. -logfile &lt;file&gt; use given file for log
  163. -buildfile &lt;file&gt; use given buildfile
  164. -D&lt;property&gt;=&lt;value&gt; use value for given property</pre>
  165. <h3>Examples</h3>
  166. <blockquote>
  167. <pre>ant</pre>
  168. </blockquote>
  169. <p>runs Ant using the <code>build.xml</code> file in the current directory, on
  170. the default target.</p>
  171. <blockquote>
  172. <pre>ant -buildfile test.xml</pre>
  173. </blockquote>
  174. <p>runs Ant using the <code>test.xml</code> file in the current directory, on
  175. the default target.</p>
  176. <blockquote>
  177. <pre>ant -buildfile test.xml dist</pre>
  178. </blockquote>
  179. <p>runs Ant using the <code>test.xml</code> file in the current directory, on a
  180. target called <code>dist</code>.</p>
  181. <blockquote>
  182. <pre>ant -buildfile test.xml -Dbuild=build/classes dist</pre>
  183. </blockquote>
  184. <p>runs Ant using the <code>test.xml</code> file in the current directory, on a
  185. target called <code>dist</code>. It also sets the <i>build</i> property to the
  186. value <i>build/classes</i>.</p>
  187. <h3>Running Ant by hand</h3>
  188. <p>When you have installed Ant in the do-it-yourself way, Ant can be started
  189. with:</p>
  190. <blockquote>
  191. <pre>set CLASSPATH=c:\ant\lib\ant.jar;c:\ant\lib\xml.jar;c:\jdk1.2.2\lib\tools.jar
  192. java -Dant.home=c:\ant org.apache.tools.ant.Main [options] [target]</pre>
  193. </blockquote>
  194. <p>These instructions actually do exactly the same as the <code>ant</code>
  195. command. The options and target are the same as when running Ant with the <code>ant</code>
  196. command.</p>
  197. <hr>
  198. <h2><a name="buildfile">Writing a simple buildfile</a></h2>
  199. <p>The buildfile is written in XML. Each buildfile contains one project.</p>
  200. <h3>Projects</h3>
  201. <p>A project has three attributes:</p>
  202. <table border="1" cellpadding="2" cellspacing="0">
  203. <tr>
  204. <td valign="top"><b>Attribute</b></td>
  205. <td valign="top"><b>Description</b></td>
  206. <td align="center" valign="top"><b>Required</b></td>
  207. </tr>
  208. <tr>
  209. <td valign="top">name</td>
  210. <td valign="top">the name of the project.</td>
  211. <td align="center" valign="top">Yes</td>
  212. </tr>
  213. <tr>
  214. <td valign="top">default</td>
  215. <td valign="top">the default target to use when no target is supplied.</td>
  216. <td align="center" valign="top">Yes</td>
  217. </tr>
  218. <tr>
  219. <td valign="top">basedir</td>
  220. <td valign="top">the base directory from which all path calculations are
  221. done. This attribute might be overridden by setting the &quot;basedir&quot;
  222. property on forehand. When this is done, it might be ommitted in the
  223. project tag.</td>
  224. <td align="center" valign="top">Yes</td>
  225. </tr>
  226. </table>
  227. <p>Each project defines one or more targets. A target is a set of tasks you want
  228. to be executed. When starting Ant, you can select which target you want to have
  229. executed. When no target is given, the project's default is used.</p>
  230. <h3>Targets</h3>
  231. <p>A target can depend on other targets. You might have a target for compiling,
  232. for instance, and a target for creating a distributable. You can only build a
  233. distributable when you have compiled first, so the distribute target depends on
  234. the compile target. Ant resolves all these dependencies.</p>
  235. <p>Ant tries to execute the targets in the <i>depends</i> attribute in the order
  236. they appear (from left to right). Keep in mind that it is possible that a target
  237. can get executed earlier when an earlier target depends on it:</p>
  238. <blockquote>
  239. <pre>&lt;target name=&quot;A&quot;/&gt;
  240. &lt;target name=&quot;B&quot; depends=&quot;A&quot;/&gt;
  241. &lt;target name=&quot;C&quot; depends=&quot;B&quot;/&gt;
  242. &lt;target name=&quot;D&quot; depends=&quot;C,B,A&quot;/&gt;</pre>
  243. </blockquote>
  244. <p>Suppose we want to execute target D. From its <i>depends</i> attribute, you
  245. might think that first target C, then B and then A is executed. Wrong! C depends
  246. on B, and B depends on A, so first A is executed, then B, then C, and finally D.</p>
  247. <p>A target gets executed only once. Even when more targets depend on it (see
  248. the previous example).</p>
  249. <p>A target has also the ability to perform its execution if a property has been
  250. set. This allows, for example, better control on the building process depending
  251. on the state of the system (java version, OS, command line properties, etc...).
  252. To make target <i>sense</i> this property you should add the <i>if</i> attribute
  253. with the name of the property that the target should react to, for example</p>
  254. <blockquote>
  255. <pre>&lt;target name=&quot;build-module-A&quot; if=&quot;module-A-present&quot;/&gt;</pre>
  256. </blockquote>
  257. <p>If no <i>if</i> attribute is present, the target will always be executed.</p>
  258. <p>It is a good practice to place your <a href="#property">property</a> and <a
  259. href="#tstamp">tstamp</a> tasks in a so called initialization target, on which
  260. all other targets depend. Make sure that that target is always the first one in
  261. the depends list of the other targets. In this manual, most initialization targets
  262. have the name "init".</p>
  263. <p>A target has the following attributes:</p>
  264. <table border="1" cellpadding="2" cellspacing="0">
  265. <tr>
  266. <td valign="top"><b>Attribute</b></td>
  267. <td valign="top"><b>Description</b></td>
  268. <td align="center" valign="top"><b>Required</b></td>
  269. </tr>
  270. <tr>
  271. <td valign="top">name</td>
  272. <td valign="top">the name of the project.</td>
  273. <td align="center" valign="top">Yes</td>
  274. </tr>
  275. <tr>
  276. <td valign="top">depends</td>
  277. <td valign="top">a comma separated list of names of targets on which this
  278. target depends.</td>
  279. <td align="center" valign="top">No</td>
  280. </tr>
  281. <tr>
  282. <td valign="top">if</td>
  283. <td valign="top">the name of the property that must be set in order for this
  284. target to execute.</td>
  285. <td align="center" valign="top">No</td>
  286. </tr>
  287. </table>
  288. <h3>Tasks</h3>
  289. <p>A task is a piece of code that can be executed.</p>
  290. <p>A task can have multiple attributes (or arguments if you prefer). The value
  291. of an attribute might contain references to a property. These references will be
  292. resolved before the task is executed.</p>
  293. <p>Tasks have a common structure:</p>
  294. <blockquote>
  295. <pre>&lt;name attribute1=&quot;value1&quot; attribute2=&quot;value2&quot; ... /&gt;</pre>
  296. </blockquote>
  297. <p>where name is the name of the task, attribute-x the attribute name, and
  298. value-x the value of this attribute.</p>
  299. <p>There is a set of <a href="#tasks">built in tasks</a>, but it is also very
  300. easy to <a href="#writingowntask">write your own</a>.</p>
  301. <h3>Properties</h3>
  302. <p>A project can have a set of properties. These might be set in the buildfile
  303. by the <a href="#property">property task</a>, or might be set outside Ant. A
  304. property has a name and a value. Properties might be used in in the value of
  305. task attributes. This is done by placing the property name between
  306. &quot;${&quot; and &quot;}&quot; in the attribute value.</p>
  307. <p>If there is a property called &quot;builddir&quot; with the value
  308. &quot;build&quot;, then this could be used in an attribute like this: &quot;${builddir}/classes&quot;.
  309. This is resolved as &quot;build/classes&quot;.</p>
  310. <h3>Token Filters</h3>
  311. <p>A project can have a set of tokens that might be automatically expanded if
  312. found when a file is copied, when the filtering-copy behavior is selected in the
  313. tasks that support this. These might be set in the buildfile
  314. by the <a href="#filter">filter task</a>.&nbsp;</p>
  315. <p>Since this can be a very harmful behavior, the tokens in the files <b>must</b>
  316. be of the form<i> @token@</i> where <i>token</i> is the token name that is set
  317. in the filter task. This token syntax matches the syntax of other build systems
  318. that perform such filtering and remains sufficiently orthogonal to most
  319. programming and scripting languages, as well with documentation systems.</p>
  320. <p>Note: in case a token with the format @token@ if found in a file but no
  321. filter is associated with that token, no changes take place. So, no escaping
  322. method is present, but as long as you choose appropriate names for your tokens,
  323. this should not cause problems.</p>
  324. <h3>Examples</h3>
  325. <blockquote>
  326. <pre>&lt;project name=&quot;foo&quot; default=&quot;dist&quot; basedir=&quot;.&quot;&gt;
  327. &lt;target name=&quot;init&quot;&gt;
  328. &lt;tstamp/&gt;
  329. &lt;property name=&quot;build&quot; value=&quot;build&quot; /&gt;
  330. &lt;property name=&quot;dist&quot; value=&quot;dist&quot; /&gt;
  331. &lt;filter token=&quot;version&quot; value=&quot;1.0.3&quot; /&gt;
  332. &lt;filter token=&quot;year&quot; value=&quot;2000&quot; /&gt;
  333. &lt;/target&gt;
  334. &lt;target name=&quot;prepare&quot; depends=&quot;init&quot;&gt;
  335. &lt;mkdir dir=&quot;${build}&quot; /&gt;
  336. &lt;/target&gt;
  337. &lt;target name=&quot;compile&quot; depends=&quot;prepare&quot;&gt;
  338. &lt;javac srcdir=&quot;${src}&quot; destdir=&quot;${build}&quot; filtering=&quot;on&quot;/&gt;
  339. &lt;/target&gt;
  340. &lt;target name=&quot;dist&quot; depends=&quot;compile&quot;&gt;
  341. &lt;mkdir dir=&quot;${dist}/lib&quot; /&gt;
  342. &lt;jar jarfile=&quot;${dist}/lib/foo${DSTAMP}.jar&quot;
  343. basedir=&quot;${build}&quot; items=&quot;com&quot;/&gt;
  344. &lt;/target&gt;
  345. &lt;target name=&quot;clean&quot; depends=&quot;init&quot;&gt;
  346. &lt;deltree dir=&quot;${build}&quot; /&gt;
  347. &lt;deltree dir=&quot;${dist}&quot; /&gt;
  348. &lt;/target&gt;
  349. &lt;/project&gt;
  350. </pre>
  351. </blockquote>
  352. <hr>
  353. <h2><a name="directorybasedtasks">Directory based tasks</a></h2>
  354. <p>Some tasks use directory trees for the task they perform. For instance, the <a
  355. href="#javac">Javac task</a> which works upon a directory tree with .java files.
  356. Sometimes it can be very useful to work on a subset of that directory tree. This
  357. section describes how you can select a subset of such a directory tree.</p>
  358. <p>Ant gives you two ways to create a subset, which both can be used at the same
  359. time:</p>
  360. <ul>
  361. <li>Only include files/directories that match at least one pattern of a set of
  362. patterns</li>
  363. <li>Exclude files/directories that match at least one pattern a set of
  364. patterns</li>
  365. </ul>
  366. <p>When both inclusion and exclusion are used, only files/directories that match
  367. the include patterns, and don't match the exclude patterns are used.</p>
  368. <h3>Patterns</h3>
  369. <p>As described earlier, patterns are used for the inclusion and exclusion.
  370. These patterns look very much like the patterns used in DOS and UNIX:</p>
  371. <p>'*' matches zero or more characters, '?' matches one character.</p>
  372. <p>Examples:</p>
  373. <p>'*.java' matches '.java', 'x.java' and 'FooBar.java', but not 'FooBar.xml'
  374. (does not end with '.java').</p>
  375. <p>'?.java' matches 'x.java', 'A.java', but not '.java' or 'xyz.java' (both
  376. don't have one character before '.java').</p>
  377. <p>Combinations of '*'s and '?'s are allowed.</p>
  378. <p>Matching is done per-directory. This means that first the first directory in
  379. the pattern is matched against the first directory in the path to match. Then
  380. the second directories are matched, and so on. E.g. when we have the pattern '/?abc/*/*.java'
  381. and the path '/xabc/foobar/test.java', then first '?abc' is matched with 'xabc',
  382. then '*' is matched with 'foobar' and finally '*.java' is matched with 'test.java'.
  383. They all match so the path matches the pattern.</p>
  384. <p>Too make things a bit more flexible, we add one extra feature, which makes it
  385. possible to match multiple directory levels. This can be used to match a
  386. complete directory tree, or a file anywhere in the directory tree. To do this, '**'
  387. must be used as the name of a directory. When '**' is used as the name of a
  388. directory in the pattern, it matches zero or more directories. For instance:
  389. '/test/**' matches all files/directories under '/test/', such as '/test/x.java',
  390. or '/test/foo/bar/xyz.html', but not '/xyz.xml'.</p>
  391. <p>There is one &quot;shorthand&quot;, if a pattern ends with '/' or '\', then '**'
  392. is appended. E.g. &quot;mypackage/test/&quot; is interpreted as were it &quot;mypackage/test/**&quot;.</p>
  393. <p>Examples:</p>
  394. <table border="1" cellpadding="2" cellspacing="0">
  395. <tr>
  396. <td valign="top">**/CVS/*</td>
  397. <td valign="top">Matches all files in CVS directories, that can be located
  398. anywhere in the directory tree.
  399. <p>Matches:</p>
  400. <p>CVS/Repository<br>
  401. org/apache/CVS/Entries<br>
  402. org/apache/jakarta/tools/ant/CVS/Entries</p>
  403. <p>But not:</p>
  404. <p>org/apache/CVS/foo/bar/Entries ('foo/bar/' part does not match)</td>
  405. </tr>
  406. <tr>
  407. <td valign="top">org/apache/jakarta/**</td>
  408. <td valign="top">Matches all files in the org/apache/jakarta directory tree.
  409. <p>Matches:</p>
  410. <p>org/apache/jakarta/tools/ant/docs/index.html<br>
  411. org/apache/jakarta/test.xml</p>
  412. <p>But not:</p>
  413. <p>org/apache/xyz.java ('jakarta'/' part is missing)</td>
  414. </tr>
  415. <tr>
  416. <td valign="top">org/apache/**/CVS/*</td>
  417. <td valign="top">Matches all files in CVS directories, that are located
  418. anywhere in the directory tree under org/apache.
  419. <p>Matches:</p>
  420. <p>org/apache/CVS/Entries<br>
  421. org/apache/jakarta/tools/ant/CVS/Entries</p>
  422. <p>But not:</p>
  423. <p>org/apache/CVS/foo/bar/Entries ('foo/bar/' part does not match)</td>
  424. </tr>
  425. <tr>
  426. <td valign="top">**/test/**</td>
  427. <td valign="top">Matches all files which have a directory 'test' in their
  428. path, including 'test' as a filename.</td>
  429. </tr>
  430. </table>
  431. <p>When these patterns are used in inclusion and exclusion, you have a powerful
  432. way to select just the files you want.</p>
  433. <h3>Examples</h3>
  434. <pre> &lt;copydir src=&quot;${src}&quot;
  435. dest=&quot;${dist}&quot;
  436. includes=&quot;**/images/*&quot;
  437. excludes=&quot;**/*.gif&quot; /&gt;</pre>
  438. <p>This copies all files in directories called &quot;images&quot;, that are
  439. located in the directory tree &quot;${src}&quot; to the destination &quot;${dist}&quot;,
  440. but excludes all &quot;*.gif&quot; files from the copy.</p>
  441. <h3>Default Excludes</h3>
  442. <p>There are a set of definitions which are excluded by default from all directory based tasks.
  443. They are:
  444. <pre> &quot;**/*~&quot;,
  445. &quot;**/#*#&quot;,
  446. &quot;**/%*%&quot;,
  447. &quot;**/CVS&quot;,
  448. &quot;**/CVS/*&quot;,
  449. &quot;**/.cvsignore&quot;
  450. </pre>
  451. If you do not want these default excludes applied, you may disable them with the
  452. <code>defaultexcludes=&quot;no&quot;</code> attribute.</p>
  453. <hr>
  454. <h2><a name="tasks">Built in tasks</a></h2>
  455. <ul>
  456. <li><a href="#ant">Ant</a></li>
  457. <li><a href="#available">Available</a></li>
  458. <li><a href="#chmod">Chmod</a></li>
  459. <li><a href="#copydir">Copydir</a></li>
  460. <li><a href="#copyfile">Copyfile</a></li>
  461. <li><a href="#cvs">Cvs</a></li>
  462. <li><a href="#delete">Delete</a></li>
  463. <li><a href="#deltree">Deltree</a></li>
  464. <li><a href="#echo">Echo</a></li>
  465. <li><a href="#exec">Exec</a></li>
  466. <li><a href="#expand">Expand</a></li>
  467. <li><a href="#filter">Filter</a></li>
  468. <li><a href="#get">Get</a></li>
  469. <li><a href="#gunzip">GUnzip</a></li>
  470. <li><a href="#gzip">GZip</a></li>
  471. <li><a href="#fixcrlf">FixCRLF</a></li>
  472. <li><a href="#jar">Jar</a></li>
  473. <li><a href="#java">Java</a></li>
  474. <li><a href="#javac">Javac</a></li>
  475. <li><a href="#javadoc">Javadoc/Javadoc2</a></li>
  476. <li><a href="#keysubst">KeySubst</a></li>
  477. <li><a href="#mkdir">Mkdir</a></li>
  478. <li><a href="#patch">Patch</a></li>
  479. <li><a href="#property">Property</a></li>
  480. <li><a href="#rename">Rename</a></li>
  481. <li><a href="#replace">Replace</a></li>
  482. <li><a href="#rmic">Rmic</a></li>
  483. <li><a href="#tar">Tar</a></li>
  484. <li><a href="#taskdef">Taskdef</a></li>
  485. <li><a href="#tstamp">Tstamp</a></li>
  486. <li><a href="#untar">Untar</a></li>
  487. <li><a href="#zip">Zip</a></li>
  488. </ul>
  489. <hr>
  490. <h2><a name="ant">Ant</a></h2>
  491. <h3><b>Description:</b></h3>
  492. <p>Runs Ant on a supplied buildfile. This can be used to build subprojects.</p>
  493. <p>When the <i>antfile</i> attribute is omitted, the file &quot;build.xml&quot;
  494. in the supplied directory (<i>dir</i> attribute) is used.</p>
  495. <p>If no target attribute is supplied, the default target of the new project is
  496. used.</p>
  497. <p>The properties of the current project will be available in the new project.
  498. These properties will override the properties that are set in the new project.
  499. (See also the <a href="#property">properties task</a>).</p>
  500. <h3>Parameters:</h3>
  501. <table border="1" cellpadding="2" cellspacing="0">
  502. <tr>
  503. <td valign="top"><b>Attribute</b></td>
  504. <td valign="top"><b>Description</b></td>
  505. <td align="center" valign="top"><b>Required</b></td>
  506. </tr>
  507. <tr>
  508. <td valign="top">antfile</td>
  509. <td valign="top">the buildfile to use.</td>
  510. <td valign="top" align="center">No</td>
  511. </tr>
  512. <tr>
  513. <td valign="top">dir</td>
  514. <td valign="top">the directory to use as a basedir for the new Ant project.</td>
  515. <td valign="top" align="center">Yes</td>
  516. </tr>
  517. <tr>
  518. <td valign="top">target</td>
  519. <td valign="top">the target of the new Ant project that should be executed.</td>
  520. <td valign="top" align="center">No</td>
  521. </tr>
  522. <tr>
  523. <td valign="top">output</td>
  524. <td valign="top">Filename to write the ant output to.
  525. </td>
  526. <td align="center" valign="top">No</td>
  527. </tr>
  528. </table>
  529. <h3>Examples</h3>
  530. <blockquote>
  531. <p><code>&lt;ant antfile=&quot;subproject/subbuild.xml&quot; dir=&quot;subproject&quot;
  532. target=&quot;compile&quot; /&gt;</code></p>
  533. <p><code>&lt;ant dir=&quot;subproject&quot; /&gt;</code></p>
  534. </blockquote>
  535. <hr>
  536. <h2><a name="available">Available</a></h2>
  537. <h3>Description</h3>
  538. <p>Sets a property if a resource is available at runtime. This resource can be a
  539. file resource, a class in classpath or a JVM system resource.</p>
  540. <p>The value part of the properties being set is <i>true</i> if the resource is
  541. present, otherwise, the property is not set.</p>
  542. <p>Normally, this task is used to set properties that are useful to avoid target
  543. execution depending on system parameters.</p>
  544. <h3>Parameters</h3>
  545. <table border="1" cellpadding="2" cellspacing="0">
  546. <tr>
  547. <td valign="top"><b>Attribute</b></td>
  548. <td valign="top"><b>Description</b></td>
  549. <td align="center" valign="top"><b>Required</b></td>
  550. </tr>
  551. <tr>
  552. <td valign="top">property</td>
  553. <td valign="top">the name of the property to set.</td>
  554. <td valign="top" align="center">Yes</td>
  555. </tr>
  556. <tr>
  557. <td valign="top">classname</td>
  558. <td valign="top">the class to look for in classpath.</td>
  559. <td valign="middle" align="center" rowspan="3">Yes</td>
  560. </tr>
  561. <tr>
  562. <td valign="top">resource</td>
  563. <td valign="top">the resource to look for in the JVM</td>
  564. </tr>
  565. <tr>
  566. <td valign="top">file</td>
  567. <td valign="top">the file to look for.</td>
  568. </tr>
  569. </table>
  570. <h3>Examples</h3>
  571. <pre> &lt;available classname=&quot;org.whatever.Myclass&quot; property=&quot;Myclass.present&quot; /&gt;</pre>
  572. <p>sets the property <code><i>Myclass.present</i></code> to the value &quot;true&quot;
  573. if the <i>org.whatever.Myclass</i> is found in Ant's classpath.</p>
  574. <hr>
  575. <h2><a name="chmod">Chmod</a></h2>
  576. <h3>Description</h3>
  577. <p>Changes the permissions of a file. Right now it has efect only under Unix.
  578. The permissions are also UNIX style, like the argument for the chmod command.</p>
  579. <h3>Parameters</h3>
  580. <table border="1" cellpadding="2" cellspacing="0">
  581. <tr>
  582. <td valign="top"><b>Attribute</b></td>
  583. <td valign="top"><b>Description</b></td>
  584. <td align="center" valign="top"><b>Required</b></td>
  585. </tr>
  586. <tr>
  587. <td valign="top">src</td>
  588. <td valign="top">the file of which the permissions must be changed.</td>
  589. <td valign="top" align="center">Yes</td>
  590. </tr>
  591. <tr>
  592. <td valign="top">perm</td>
  593. <td valign="top">the new permissions.</td>
  594. <td valign="top" align="center">Yes</td>
  595. </tr>
  596. </table>
  597. <h3>Examples</h3>
  598. <blockquote>
  599. <p><code>&lt;chmod src=&quot;${dist}/start.sh&quot; perm=&quot;ugo+rx&quot;
  600. /&gt;</code></p>
  601. </blockquote>
  602. <p>makes the &quot;start.sh&quot; file readable and executable for anyone on a
  603. UNIX system.</p>
  604. <hr>
  605. <h2><a name="copydir">Copydir</a></h2>
  606. <h3>Description</h3>
  607. <p>Copies a directory tree from the source to the destination.</p>
  608. <p>It is possible to refine the set of files that are being copied. This can be
  609. done with the <i>includes</i>, <i>excludes</i> and <i>defaultexcludes</i>
  610. attributes. With the <i>includes</i> attribute you specify the files you want to
  611. have included by using patterns. The <i>exclude</i> attribute is used to specify
  612. the files you want to have excluded. This is also done with patterns. And
  613. finally with the <i>defaultexcludes</i> attribute, you can specify whether you
  614. want to use default exclusions or not. See the section on <a
  615. href="#directorybasedtasks">directory based tasks</a>, on how the
  616. inclusion/exclusion of files works, and how to write patterns. The patterns are
  617. relative to the <i>src</i> directory.</p>
  618. <p>The <i>ignore</i> attribute contains the names of the files/directories that
  619. must be excluded from the copy. The names specified in the <i>ignore</i>
  620. attribute are just names, they do not contain any path information! Note that
  621. this attribute has been replaced by the <i>excludes</i> attribute.</p>
  622. <h3>Parameters</h3>
  623. <table border="1" cellpadding="2" cellspacing="0">
  624. <tr>
  625. <td valign="top"><b>Attribute</b></td>
  626. <td valign="top"><b>Description</b></td>
  627. <td align="center" valign="top"><b>Required</b></td>
  628. </tr>
  629. <tr>
  630. <td valign="top">src</td>
  631. <td valign="top">the directory to copy.</td>
  632. <td valign="top" align="center">Yes</td>
  633. </tr>
  634. <tr>
  635. <td valign="top">dest</td>
  636. <td valign="top">the directory to copy to.</td>
  637. <td valign="top" align="center">Yes</td>
  638. </tr>
  639. <tr>
  640. <td valign="top">ignore</td>
  641. <td valign="top">comma separated list of filenames/directorynames to ignore.
  642. No files (except default excludes) are excluded when omitted. (<b>deprecated</b>,
  643. use <i>excludes</i> instead).</td>
  644. <td valign="top" align="center">No</td>
  645. </tr>
  646. <tr>
  647. <td valign="top">includes</td>
  648. <td valign="top">comma separated list of patterns of files that must be
  649. included. All files are included when omitted.</td>
  650. <td valign="top" align="center">No</td>
  651. </tr>
  652. <tr>
  653. <td valign="top">excludes</td>
  654. <td valign="top">comma separated list of patterns of files that must be
  655. excluded. No files (except default excludes) are excluded when omitted.</td>
  656. <td valign="top" align="center">No</td>
  657. </tr>
  658. <tr>
  659. <td valign="top">defaultexcludes</td>
  660. <td valign="top">indicates whether default excludes should be used or not
  661. (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when omitted.</td>
  662. <td valign="top" align="center">No</td>
  663. </tr>
  664. <tr>
  665. <td valign="top">filtering</td>
  666. <td valign="top">indicates whether token filtering should take place during
  667. the copy</td>
  668. <td valign="top" align="center">No</td>
  669. </tr>
  670. </table>
  671. <h3>Examples</h3>
  672. <pre> &lt;copydir src=&quot;${src}/resources&quot;
  673. dest=&quot;${dist}&quot;
  674. /&gt;</pre>
  675. <p>copies the directory <code>${src}/resources</code> to <code>${dist}</code>.</p>
  676. <pre> &lt;copydir src=&quot;${src}/resources&quot;
  677. dest=&quot;${dist}&quot;
  678. includes=&quot;**/*.java&quot;
  679. excludes=&quot;**/Test.java&quot;
  680. /&gt;</pre>
  681. <p>copies the directory <code>${src}/resources</code> to <code>${dist}</code>
  682. recursively. All java files are copied, except for files with the name <code>Test.java</code>.</p>
  683. <pre> &lt;copydir src=&quot;${src}/resources&quot;
  684. dest=&quot;${dist}&quot;
  685. includes=&quot;**/*.java&quot;
  686. excludes=&quot;mypackage/test/**&quot; /&gt;</pre>
  687. <p>copies the directory <code>${src}/resources</code> to <code>${dist}</code>
  688. recursively. All java files are copied, except for the files under the <code>mypackage/test</code>
  689. directory.</p>
  690. <hr>
  691. <h2><a name="copyfile">Copyfile</a></h2>
  692. <h3>Description</h3>
  693. <p>Copies a file from the source to the destination. The file is only copied if
  694. the source file is newer than the destination file, or when the destination file
  695. does not exist.</p>
  696. <h3>Parameters</h3>
  697. <table border="1" cellpadding="2" cellspacing="0">
  698. <tr>
  699. <td valign="top"><b>Attribute</b></td>
  700. <td valign="top"><b>Description</b></td>
  701. <td align="center" valign="top"><b>Required</b></td>
  702. </tr>
  703. <tr>
  704. <td valign="top">src</td>
  705. <td valign="top">the filename of the file to copy.</td>
  706. <td valign="top" align="center">Yes</td>
  707. </tr>
  708. <tr>
  709. <td valign="top">dest</td>
  710. <td valign="top">the filename of the file where to copy to.</td>
  711. <td valign="top" align="center">Yes</td>
  712. </tr>
  713. <tr>
  714. <td valign="top">filtering</td>
  715. <td valign="top">indicates whether token filtering should take place during
  716. the copy</td>
  717. <td valign="top" align="center">No</td>
  718. </tr>
  719. </table>
  720. <h3>Examples</h3>
  721. <blockquote>
  722. <p><code>&lt;copyfile src=&quot;test.java&quot; dest=&quot;subdir/test.java&quot;
  723. /&gt;</code></p>
  724. <p><code>&lt;copyfile src=&quot;${src}/index.html&quot; dest=&quot;${dist}/help/index.html&quot;
  725. /&gt;</code></p>
  726. </blockquote>
  727. <hr>
  728. <h2><a name="cvs">Cvs</a></h2>
  729. <h3>Description</h3>
  730. <p>Handles packages/modules retrieved from a
  731. <a href="http://www.cyclic.com/">CVS</a> repository.</p>
  732. <p>When doing automated builds, the <a href="#get">get task</a> should be
  733. preferred over the <i>checkout</i> command, because of speed.</p>
  734. <h3>Parameters</h3>
  735. <table border="1" cellpadding="2" cellspacing="0">
  736. <tr>
  737. <td valign="top"><b>Attribute</b></td>
  738. <td valign="top"><b>Description</b></td>
  739. <td align="center" valign="top"><b>Required</b></td>
  740. </tr>
  741. <tr>
  742. <td valign="top">command</td>
  743. <td valign="top">the CVS command to execute.</td>
  744. <td align="center" valign="top">No, default &quot;checkout&quot;</td>
  745. </tr>
  746. <tr>
  747. <td valign="top">cvsRoot</td>
  748. <td valign="top">the CVSROOT variable.</td>
  749. <td align="center" valign="top">No</td>
  750. </tr>
  751. <tr>
  752. <td valign="top">dest</td>
  753. <td valign="top">the directory where the checked out files should be placed.</td>
  754. <td align="center" valign="top">Yes</td>
  755. </tr>
  756. <tr>
  757. <td valign="top">package</td>
  758. <td valign="top">the package/module to check out.</td>
  759. <td align="center" valign="top">No</td>
  760. </tr>
  761. <tr>
  762. <td valign="top">tag</td>
  763. <td valign="top">the tag of the package/module to check out.</td>
  764. <td align="center" valign="top">No</td>
  765. </tr>
  766. <tr>
  767. <td valign="top">quiet</td>
  768. <td valign="top">supress informational messages.</td>
  769. <td align="center" valign="top">No, default &quot;false&quot;</td>
  770. </tr>
  771. <tr>
  772. <td valign="top">noexec</td>
  773. <td valign="top">report only, don't change any files.</td>
  774. <td align="center" valign="top">No, default &quot;false&quot;</td>
  775. </tr>
  776. </table>
  777. <h3>Examples</h3>
  778. <pre> &lt;cvs cvsRoot=&quot;:pserver:anoncvs@jakarta.apache.org:/home/cvspublic&quot;
  779. package=&quot;jakarta-tools&quot;
  780. dest=&quot;${ws.dir}&quot;
  781. /&gt;</pre>
  782. <p>checks out the package/module &quot;jakarta-tools&quot; from the CVS
  783. repository pointed to by the cvsRoot attribute, and stores the files in &quot;${ws.dir}&quot;.</p>
  784. <pre> &lt;cvs dest=&quot;${ws.dir}&quot; command=&quot;update&quot; /&gt;</pre>
  785. <p>updates the package/module that has previously been checked out into
  786. &quot;${ws.dir}&quot;.</p>
  787. <hr>
  788. <h2><a name="delete">Delete</a></h2>
  789. <h3>Description</h3>
  790. <p>Deletes either a single file or
  791. all files in a specified directory and its sub-directories.</p>
  792. <p>It is possible to refine the set of files that are being deleted. This can be
  793. done with the <i>includes</i>, <i>excludes</i> and <i>defaultexcludes</i>
  794. attributes. With the <i>includes</i> attribute you specify the files you want to
  795. have included in the deletion process by using patterns. The <i>exclude</i> attribute is used to specify
  796. the files you want to have excluded from the deletion process. This is also done with patterns. And
  797. finally with the <i>defaultexcludes</i> attribute, you can specify whether you
  798. want to use default exclusions or not. See the section on <a
  799. href="#directorybasedtasks">directory based tasks</a>, on how the
  800. inclusion/exclusion of files works, and how to write patterns. The patterns are
  801. relative to the <i>dir</i> directory.</p>
  802. <h3>Parameters</h3>
  803. <table border="1" cellpadding="2" cellspacing="0">
  804. <tr>
  805. <td valign="top"><b>Attribute</b></td>
  806. <td valign="top"><b>Description</b></td>
  807. <td align="center" valign="top"><b>Required</b></td>
  808. </tr>
  809. <tr>
  810. <td valign="top">file</td>
  811. <td valign="top">The file to delete.</td>
  812. <td align="center" valign="middle" rowspan="2">at least one of the two</td>
  813. </tr>
  814. <tr>
  815. <td valign="top">dir</td>
  816. <td valign="top">The directory to delete files from.</td>
  817. </tr>
  818. <tr>
  819. <td valign="top">includes</td>
  820. <td valign="top">Comma separated list of patterns of files that must be
  821. deleted. All files are in the current directory
  822. and any sub-directories are deleted when omitted.</td>
  823. <td valign="top" align="center">No</td>
  824. </tr>
  825. <tr>
  826. <td valign="top">excludes</td>
  827. <td valign="top">Comma separated list of patterns of files that must be
  828. excluded from the deletion list. No files (except default excludes) are excluded when omitted.</td>
  829. <td valign="top" align="center">No</td>
  830. </tr>
  831. <tr>
  832. <td valign="top">defaultexcludes</td>
  833. <td valign="top">Indicates whether default excludes should be used or not
  834. (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when omitted.</td>
  835. <td valign="top" align="center">No</td>
  836. </tr>
  837. <tr>
  838. <td valign="top">verbose</td>
  839. <td valign="top">Show name of each deleted file (&quot;true&quot;/&quot;false&quot;). Default is "false" when omitted.</td>
  840. <td align="center" valign="top">No</td>
  841. </tr>
  842. </table>
  843. <h3>Examples</h3>
  844. <pre> &lt;delete file=&quot;/lib/ant.jar&quot; /&gt;</pre>
  845. <p>deletes the file <code>/lib/ant.jar</code>.</p>
  846. <pre> &lt;delete dir=&quot;lib&quot; /&gt;</pre>
  847. <p>deletes all files in the <code>/lib</code> directory.</p>
  848. <pre> &lt;delete dir=&quot;.&quot;
  849. include=&quot;**/*.bak&quot;
  850. /&gt;
  851. </pre>
  852. <p>deletes all files with the extension &quot;<code>.bak</code>&quot from the current directory
  853. and any sub-directories.</p>
  854. <h2><a name="deltree">Deltree</a></h2>
  855. <h3>Description</h3>
  856. <p>Deletes a directory with all its files and subdirectories.</p>
  857. <h3>Parameters</h3>
  858. <table border="1" cellpadding="2" cellspacing="0">
  859. <tr>
  860. <td valign="top"><b>Attribute</b></td>
  861. <td valign="top"><b>Description</b></td>
  862. <td align="center" valign="top"><b>Required</b></td>
  863. </tr>
  864. <tr>
  865. <td valign="top">dir</td>
  866. <td valign="top">the directory to delete.</td>
  867. <td valign="top" align="center">Yes</td>
  868. </tr>
  869. </table>
  870. <h3>Examples</h3>
  871. <pre> &lt;deltree dir=&quot;dist&quot; /&gt;</pre>
  872. <p>deletes the directory <code>dist</code>, including its files and
  873. subdirectories.</p>
  874. <pre> &lt;deltree dir=&quot;${dist}&quot; /&gt;</pre>
  875. <p>deletes the directory <code>${dist}</code>, including its files and
  876. subdirectories.</p>
  877. <hr>
  878. <h2><a name="echo">Echo</a></h2>
  879. <h3>Description</h3>
  880. <p>Echoes a message to System.out.</p>
  881. <h3>Parameters</h3>
  882. <table border="1" cellpadding="2" cellspacing="0">
  883. <tr>
  884. <td valign="top"><b>Attribute</b></td>
  885. <td valign="top"><b>Description</b></td>
  886. <td align="center" valign="top"><b>Required</b></td>
  887. </tr>
  888. <tr>
  889. <td valign="top">message</td>
  890. <td valign="top">the message to echo.</td>
  891. <td valign="top" align="center">Yes</td>
  892. </tr>
  893. </table>
  894. <h3>Examples</h3>
  895. <pre> &lt;echo message=&quot;Hello world&quot; /&gt;</pre>
  896. <hr>
  897. <h2><a name="exec">Exec</a></h2>
  898. <h3>Description</h3>
  899. <p>Executes a system command. When the <i>os</i> attribute is specified, then
  900. the command is only executed when Ant is run on one of the specified operating
  901. systems.</p>
  902. <h3>Parameters</h3>
  903. <table border="1" cellpadding="2" cellspacing="0">
  904. <tr>
  905. <td valign="top"><b>Attribute</b></td>
  906. <td valign="top"><b>Description</b></td>
  907. <td align="center" valign="top"><b>Required</b></td>
  908. </tr>
  909. <tr>
  910. <td valign="top">command</td>
  911. <td valign="top">the command to execute.</td>
  912. <td align="center" valign="top">Yes</td>
  913. </tr>
  914. <tr>
  915. <td valign="top">dir</td>
  916. <td valign="top">the directory in which the command should be executed.</td>
  917. <td align="center" valign="top">Yes</td>
  918. </tr>
  919. <tr>
  920. <td valign="top">os</td>
  921. <td valign="top">list of Operating Systems on which the command may be
  922. executed.</td>
  923. <td align="center" valign="top">No</td>
  924. </tr>
  925. <tr>
  926. <td valign="top">output</td>
  927. <td valign="top">the file to which the output of the command should be
  928. redirected.</td>
  929. <td align="center" valign="top">Yes</td>
  930. </tr>
  931. </table>
  932. <h3>Examples</h3>
  933. <blockquote>
  934. <p><code>&lt;exec dir=&quot;${src}&quot; command=&quot;dir&quot; os=&quot;windows&quot;
  935. output=&quot;dir.txt&quot; /&gt;</code></p>
  936. </blockquote>
  937. <hr>
  938. <h2><a name="expand">Expand</a></h2>
  939. <h3>Description</h3>
  940. <p>Unzips a zipfile.</p>
  941. <h3>Parameters</h3>
  942. <table border="1" cellpadding="2" cellspacing="0">
  943. <tr>
  944. <td valign="top"><b>Attribute</b></td>
  945. <td valign="top"><b>Description</b></td>
  946. <td align="center" valign="top"><b>Required</b></td>
  947. </tr>
  948. <tr>
  949. <td valign="top">src</td>
  950. <td valign="top">zipfile to expand.</td>
  951. <td align="center" valign="top">Yes</td>
  952. </tr>
  953. <tr>
  954. <td valign="top">dest</td>
  955. <td valign="top">directory where to store the expanded files.</td>
  956. <td align="center" valign="top">Yes</td>
  957. </tr>
  958. </table>
  959. <h3>Examples</h3>
  960. <blockquote>
  961. <p><code>&lt;expand src=&quot;${tomcat_src}/tools-src.zip&quot; dest=&quot;${tools.home}&quot;
  962. /&gt;</code></p>
  963. </blockquote>
  964. <hr>
  965. <h2><a name="filter">Filter</a></h2>
  966. <h3>Description</h3>
  967. <p>Sets a token filter for this project. Token filters are used by all tasks
  968. that perform file copying operations through the Project commodity methods.</p>
  969. <p>Note: the token string must not contain the separators chars (@).</p>
  970. <h3>Parameters</h3>
  971. <table border="1" cellpadding="2" cellspacing="0">
  972. <tr>
  973. <td valign="top"><b>Attribute</b></td>
  974. <td valign="top"><b>Description</b></td>
  975. <td align="center" valign="top"><b>Required</b></td>
  976. </tr>
  977. <tr>
  978. <td valign="top">token</td>
  979. <td valign="top">the token string without @</td>
  980. <td align="center" valign="top">Yes</td>
  981. </tr>
  982. <tr>
  983. <td valign="top">value</td>
  984. <td valign="top">the string that should be put to replace the token when the
  985. file is copied</td>
  986. <td align="center" valign="top">Yes</td>
  987. </tr>
  988. </table>
  989. <h3>Examples</h3>
  990. <pre> &lt;filter token=&quot;year&quot; value=&quot;2000&quot; /&gt;
  991. &lt;copydir src=&quot;${src.dir}&quot; dest=&quot;${dest.dir}&quot;/&gt;</pre>
  992. <p>will copy recursively all the files from the <i>src.dir</i> directory into
  993. the <i>dest.dir</i> directory replacing all the occurencies of the string <i>@year@</i>
  994. with <i>2000.</i></p>
  995. <hr>
  996. <h2><a name="fixcrlf">FixCRLF</a></h2>
  997. <h3>Description</h3>
  998. <p>Adjusts a text file to local.</p>
  999. <p>The <i>basedir</i> attribute is the reference directory from where to jar.</p>
  1000. <h3>Parameters</h3>
  1001. <table border="1" cellpadding="2" cellspacing="0">
  1002. <tr>
  1003. <td valign="top"><b>Attribute</b></td>
  1004. <td valign="top"><b>Description</b></td>
  1005. <td align="center" valign="top"><b>Required</b></td>
  1006. </tr>
  1007. <tr>
  1008. <td valign="top">srcDir</td>
  1009. <td valign="top">Where to find the files to be fixed up.</td>
  1010. <td valign="top" align="center">Yes</td>
  1011. </tr>
  1012. <tr>
  1013. <td valign="top">destDir</td>
  1014. <td valign="top">Where to place the corrected files. Defaults to
  1015. srcDir (replacing the original file)</td>
  1016. <td valign="top" align="center">No</td>
  1017. </tr>
  1018. <tr>
  1019. <td valign="top">includes</td>
  1020. <td valign="top">comma separated list of patterns of files that must be
  1021. included. All files are included when omitted.</td>
  1022. <td valign="top" align="center">No</td>
  1023. </tr>
  1024. <tr>
  1025. <td valign="top">excludes</td>
  1026. <td valign="top">comma separated list of patterns of files that must be
  1027. excluded. No files (except default excludes) are excluded when omitted.</td>
  1028. <td valign="top" align="center">No</td>
  1029. </tr>
  1030. <tr>
  1031. <td valign="top">defaultexcludes</td>
  1032. <td valign="top">indicates whether default excludes should be used or not
  1033. (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when omitted.</td>
  1034. <td valign="top" align="center">No</td>
  1035. </tr>
  1036. <tr>
  1037. <td valign="top">cr</td>
  1038. <td valign="top">Specifies how carriage return (CR) characters are to
  1039. be handled. Valid values for this property are:
  1040. <ul>
  1041. <li>add: ensure that there is a CR before every LF
  1042. <li>asis: leave CR characters alone
  1043. <li>remove: remove all CR characters
  1044. </ul>
  1045. Default is based on the platform on which you are running this task.
  1046. For Unix platforms, the default is remove. For DOS based systems
  1047. (including Windows), the default is add.
  1048. <p>
  1049. Note: Unless this property is specified as "asis", extra CR characters
  1050. which do not preceed a LF will be removed.
  1051. </td>
  1052. <td valign="top" align="center">No</td>
  1053. </tr>
  1054. <tr>
  1055. <td valign="top">tab</td>
  1056. <td valign="top">Specifies how tab characters are to be handled. Valid
  1057. values for this property are:
  1058. <ul>
  1059. <li>add: convert sequences of spaces which span a tab stop to tabs
  1060. <li>asis: leave tab and space characters alone
  1061. <li>remove: convert tabs to spaces
  1062. </ul>
  1063. Default for this parameter is "asis".
  1064. <p>
  1065. Note: Unless this property is specified as "asis", extra spaces and
  1066. tabs after the last non-whitespace character on the line will be removed.
  1067. </td>
  1068. <td valign="top" align="center">No</td>
  1069. </tr>
  1070. <tr>
  1071. <td valign="top">eof</td>
  1072. <td valign="top">Specifies how DOS end of file (control-Z) characters are
  1073. to be handled. Valid values for this property are:
  1074. <ul>
  1075. <li>add: ensure that there is an EOF character at the end of the file
  1076. <li>asis: leave EOF characters alone
  1077. <li>remove: remove any EOF character found at the end
  1078. </ul>
  1079. Default is based on the platform on which you are running this task.
  1080. For Unix platforms, the default is remove. For DOS based systems
  1081. (including Windows), the default is asis.
  1082. </td>
  1083. <td valign="top" align="center">No</td>
  1084. </tr>
  1085. </table>
  1086. <h3>Examples</h3>
  1087. <pre> &lt;fixcrlf srcdir=&quot;${src}&quot;
  1088. cr=&quot;remove&quot; eof=&quot;remove&quot;
  1089. includes=&quot;**/*.sh&quot;
  1090. /&gt;</pre>
  1091. <p>Removes carriage return and eof characters from the shell scripts. Tabs and
  1092. spaces are left as is.
  1093. <pre> &lt;fixcrlf srcdir=&quot;${src}&quot;
  1094. cr=&quot;add&quot;
  1095. includes=&quot;**/*.bat&quot;
  1096. /&gt;</pre>
  1097. <p>Ensures that there are carriage return characters prior to evey line feed.
  1098. Tabs and spaces are left as is.
  1099. EOF characters are left alone if run on
  1100. DOS systems, and are removed if run on Unix systems.</p>
  1101. <pre> &lt;fixcrlf srcdir=&quot;${src}&quot;
  1102. tabs=&quot;add&quot;
  1103. includes=&quot;**/Makefile&quot;
  1104. /&gt;</pre>
  1105. <p>Adds or removes CR characters to match local OS conventions, and
  1106. converts spaces to tabs when appropriate. EOF characters are left alone if
  1107. run on DOS systems, and are removed if run on Unix systems.
  1108. Many versions of make require tabs prior to commands.</p>
  1109. <pre> &lt;fixcrlf srcdir=&quot;${src}&quot;
  1110. tabs=&quot;remove&quot;
  1111. includes=&quot;**/README*&quot;
  1112. /&gt;</pre>
  1113. <p>Adds or removes CR characters to match local OS conventions, and
  1114. converts all tabs to spaces. EOF characters are left alone if run on
  1115. DOS systems, and are removed if run on Unix systems.
  1116. You never know what editor a user will use to browse README's.</p>
  1117. <hr>
  1118. <h2><a name="get">Get</a></h2>
  1119. <h3>Description</h3>
  1120. <p>Gets a file from an URL. When the verbose option is &quot;on&quot;, this task
  1121. displays a '.' for every 100 Kb retrieved.</p>
  1122. <p>This task should be preferred above the <a href="#cvs">CVS task</a> when
  1123. doing automated builds. CVS is significant slower than loading a compressed
  1124. archive with http/ftp.</p>
  1125. <h3>Parameters</h3>
  1126. <table border="1" cellpadding="2" cellspacing="0">
  1127. <tr>
  1128. <td valign="top"><b>Attribute</b></td>
  1129. <td valign="top"><b>Description</b></td>
  1130. <td align="center" valign="top"><b>Required</b></td>
  1131. </tr>
  1132. <tr>
  1133. <td valign="top">src</td>
  1134. <td valign="top">the URL from which to retrieve a file.</td>
  1135. <td align="center" valign="top">Yes</td>
  1136. </tr>
  1137. <tr>
  1138. <td valign="top">dest</td>
  1139. <td valign="top">the file where to store the retrieved file.</td>
  1140. <td align="center" valign="top">Yes</td>
  1141. </tr>
  1142. <tr>
  1143. <td valign="top">verbose</td>
  1144. <td valign="top">show verbose information (&quot;on&quot;/&quot;off&quot;).</td>
  1145. <td align="center" valign="top">No</td>
  1146. </tr>
  1147. <tr>
  1148. <td valign="top">ignoreerrors</td>
  1149. <td valign="top">Log errors but don't treat as fatal.</td>
  1150. <td align="center" valign="top">No</td>
  1151. </tr>
  1152. </table>
  1153. <h3>Examples</h3>
  1154. <pre> &lt;get src=&quot;http://jakarta.apache.org/&quot; dest=&quot;help/index.html&quot; /&gt;</pre>
  1155. <p>gets the index page of http://jakarta.apache.org/, and stores it in the file <code>help/index.html</code>.</p>
  1156. <hr>
  1157. <h2><a name="gunzip">GUnzip</a></h2>
  1158. <h3>Description</h3>
  1159. <p>Expands a GZip file.</p>
  1160. <p>If <i>dest</i> is a directory the name of the destination file is
  1161. the same as <i>src</i> (with the &quot;.gz&quot; extension removed if
  1162. present). If <i>dest</i> is ommited, the parent dir of <i>src</i> is
  1163. taken. The file is only expanded if the source file is newer than the
  1164. destination file, or when the destination file does not exist.</p>
  1165. <h3>Parameters</h3>
  1166. <table border="1" cellpadding="2" cellspacing="0">
  1167. <tr>
  1168. <td valign="top"><b>Attribute</b></td>
  1169. <td valign="top"><b>Description</b></td>
  1170. <td align="center" valign="top"><b>Required</b></td>
  1171. </tr>
  1172. <tr>
  1173. <td valign="top">src</td>
  1174. <td valign="top">the file to expand.</td>
  1175. <td align="center" valign="top">Yes</td>
  1176. </tr>
  1177. <tr>
  1178. <td valign="top">dest</td>
  1179. <td valign="top">the destination file or directory.</td>
  1180. <td align="center" valign="top">No</td>
  1181. </tr>
  1182. </table>
  1183. <h3>Examples</h3>
  1184. <blockquote>
  1185. <p><code>&lt;gunzip src=&quot;test.tar.gz&quot;/&gt;</code></p>
  1186. </blockquote>
  1187. <p>expands <i>test.tar.gz</i> to <i>test.tar</i></p>
  1188. <blockquote>
  1189. <p><code>&lt;gunzip src=&quot;test.tar.gz&quot; dest=&quot;test2.tar&quot;/&gt;</code></p>
  1190. </blockquote>
  1191. <p>expands <i>test.tar.gz</i> to <i>test2.tar</i></p>
  1192. <blockquote>
  1193. <p><code>&lt;gunzip src=&quot;test.tar.gz&quot; dest=&quot;subdir&quot;/&gt;</code></p>
  1194. </blockquote>
  1195. <p>expands <i>test.tar.gz</i> to <i>subdir/test.tar</i> (assuming
  1196. subdir is a directory).</p>
  1197. <hr>
  1198. <h2><a name="gzip">GZip</a></h2>
  1199. <h3>Description</h3>
  1200. <p>GZips a file.</p>
  1201. <h3>Parameters</h3>
  1202. <table border="1" cellpadding="2" cellspacing="0">
  1203. <tr>
  1204. <td valign="top"><b>Attribute</b></td>
  1205. <td valign="top"><b>Description</b></td>
  1206. <td align="center" valign="top"><b>Required</b></td>
  1207. </tr>
  1208. <tr>
  1209. <td valign="top">src</td>
  1210. <td valign="top">the file to gzip.</td>
  1211. <td align="center" valign="top">Yes</td>
  1212. </tr>
  1213. <tr>
  1214. <td valign="top">zipfile</td>
  1215. <td valign="top">the destination file.</td>
  1216. <td align="center" valign="top">Yes</td>
  1217. </tr>
  1218. </table>
  1219. <h3>Examples</h3>
  1220. <blockquote>
  1221. <p><code>&lt;gzip src=&quot;test.tar&quot; zipfile=&quot;test.tar.gz&quot;
  1222. /&gt;</code></p>
  1223. </blockquote>
  1224. <hr>
  1225. <h2><a name="jar">Jar</a></h2>
  1226. <h3>Description</h3>
  1227. <p>Jars a set of files.</p>
  1228. <p>The <i>basedir</i> attribute is the reference directory from where to jar.</p>
  1229. <p>It is possible to refine the set of files that are being jarred. This can be
  1230. done with the <i>includes</i>, <i>excludes</i> and <i>defaultexcludes</i>
  1231. attributes. With the <i>includes</i> attribute you specify the files you want to
  1232. have included by using patterns. The <i>exclude</i> attribute is used to specify
  1233. the files you want to have excluded. This is also done with patterns. And
  1234. finally with the <i>defaultexcludes</i> attribute, you can specify whether you
  1235. want to use default exclusions or not. See the section on <a
  1236. href="#directorybasedtasks">directory based tasks</a>, on how the
  1237. inclusion/exclusion of files works, and how to write patterns. The patterns are
  1238. relative to the <i>basedir</i> directory.</p>
  1239. <p>The <i>includes</i>, <i>excludes</i> and <i>defaultexcludes</i> attributes
  1240. replace the <i>items</i> and <i>ignore</i> attributes. The following explains
  1241. how the deprecated <i>items</i> and <i>ignore</i> attribute behave.</p>
  1242. <p>When &quot;*&quot; is used for <i>items</i>, all files in the basedir, and
  1243. its subdirectories, will be jarred. Otherwise all the files and directories
  1244. mentioned in the items list will jarred. When a directory is specified, then all
  1245. files within it are also jarred.</p>
  1246. <p>With the <i>ignore</i> attribute, you can specify files or directories to
  1247. ignore. These files will not be jarred. The items in the <i>ignore</i> attribute
  1248. override the items in the <i>items</i> attribute. The names specified in the <i>ignore</i>
  1249. attribute are just names, they do not contain any path information!</p>
  1250. <h3>Parameters</h3>
  1251. <table border="1" cellpadding="2" cellspacing="0">
  1252. <tr>
  1253. <td valign="top"><b>Attribute</b></td>
  1254. <td valign="top"><b>Description</b></td>
  1255. <td align="center" valign="top"><b>Required</b></td>
  1256. </tr>
  1257. <tr>
  1258. <td valign="top">jarfile</td>
  1259. <td valign="top">the jar-file to create.</td>
  1260. <td valign="top" align="center">Yes</td>
  1261. </tr>
  1262. <tr>
  1263. <td valign="top">basedir</td>
  1264. <td valign="top">the directory from which to jar the files.</td>
  1265. <td valign="top" align="center">Yes</td>
  1266. </tr>
  1267. <tr>
  1268. <td valign="top">compress</td>
  1269. <td valign="top">Not only store data but also compress them, defaults to true</td>
  1270. <td align="center" valign="top">No</td>
  1271. </tr>
  1272. <tr>
  1273. <td valign="top">items</td>
  1274. <td valign="top">a comma separated list of the files/directories to jar. All
  1275. files are included when omitted. (<b>deprecated</b>, use <i>includes</i>
  1276. instead).</td>
  1277. <td valign="top" align="center">No</td>
  1278. </tr>
  1279. <tr>
  1280. <td valign="top">ignore</td>
  1281. <td valign="top">comma separated list of filenames/directorynames to exclude
  1282. from the jar. No files (except default excludes) are excluded when
  1283. omitted. (<b>deprecated</b>, use <i>excludes</i> instead).</td>
  1284. <td valign="top" align="center">No</td>
  1285. </tr>
  1286. <tr>
  1287. <td valign="top">includes</td>
  1288. <td valign="top">comma separated list of patterns of files that must be
  1289. included. All files are included when omitted.</td>
  1290. <td valign="top" align="center">No</td>
  1291. </tr>
  1292. <tr>
  1293. <td valign="top">excludes</td>
  1294. <td valign="top">comma separated list of patterns of files that must be
  1295. excluded. No files (except default excludes) are excluded when omitted.</td>
  1296. <td valign="top" align="center">No</td>
  1297. </tr>
  1298. <tr>
  1299. <td valign="top">defaultexcludes</td>
  1300. <td valign="top">indicates whether default excludes should be used or not
  1301. (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when omitted.</td>
  1302. <td valign="top" align="center">No</td>
  1303. </tr>
  1304. <tr>
  1305. <td valign="top">manifest</td>
  1306. <td valign="top">the manifest file to use.</td>
  1307. <td valign="top" align="center">No</td>
  1308. </tr>
  1309. </table>
  1310. <h3>Examples</h3>
  1311. <pre> &lt;jar jarfile=&quot;${dist}/lib/app.jar&quot; basedir=&quot;${build}/classes&quot; /&gt;</pre>
  1312. <p>jars all files in the <code>${build}/classes</code> directory in a file
  1313. called <code>app.jar</code> in the <code>${dist}/lib</code> directory.</p>
  1314. <pre> &lt;jar jarfile=&quot;${dist}/lib/app.jar&quot;
  1315. basedir=&quot;${build}/classes&quot;
  1316. excludes=&quot;**/Test.class&quot;
  1317. /&gt;</pre>
  1318. <p>jars all files in the <code>${build}/classes</code> directory in a file
  1319. called <code>app.jar</code> in the <code>${dist}/lib</code> directory. Files
  1320. with the name <code>Test.class</code> are excluded.</p>
  1321. <pre> &lt;jar jarfile=&quot;${dist}/lib/app.jar&quot;
  1322. basedir=&quot;${build}/classes&quot;
  1323. includes=&quot;mypackage/test/**&quot;
  1324. excludes=&quot;**/Test.class&quot;
  1325. /&gt;</pre>
  1326. <p>jars all files in the <code>${build}/classes</code> directory in a file
  1327. called <code>app.jar</code> in the <code>${dist}/lib</code> directory. Only
  1328. files under the directory <code>mypackage/test</code> are used, and files with
  1329. the name <code>Test.class</code> are excluded.</p>
  1330. <h3>Deprecated examples</h3>
  1331. <pre> &lt;jar jarfile=&quot;${dist}/lib/app.jar&quot; basedir=&quot;${build}/classes&quot; items=&quot;*&quot; /&gt;</pre>
  1332. <p>jars all files in the <code>${build}/classes</code> directory in a file
  1333. called <code>app.jar</code> in the <code>${dist}/lib</code> directory.</p>
  1334. <pre> &lt;jar jarfile=&quot;${dist}/lib/app.jar&quot; basedir=&quot;${build}/classes&quot; items=&quot;*&quot; ignore=&quot;Test.class&quot; /&gt;</pre>
  1335. <p>jars all files in the <code>${build}/classes</code> directory in a file
  1336. called <code>app.jar</code> in the <code>${dist}/lib</code> directory.
  1337. Files/directories with the name <code>Test.class</code> are excluded.</p>
  1338. <hr>
  1339. <h2><a name="java">Java</a></h2>
  1340. <h3>Description</h3>
  1341. <p>Executes a Java class within the running (Ant) VM or forks another VM if
  1342. specified.</p>
  1343. <p>Be careful that the executed class doesn't call System.exit(), because it
  1344. will terminate the VM and thus Ant. In case this happens, it's highly suggested
  1345. that you set the fork attribute so that System.exit() stops the other VM and not
  1346. the one that is currently running Ant.</p>
  1347. <h3>Parameters</h3>
  1348. <table border="1" cellpadding="2" cellspacing="0">
  1349. <tr>
  1350. <td valign="top"><b>Attribute</b></td>
  1351. <td valign="top"><b>Description</b></td>
  1352. <td align="center" valign="top"><b>Required</b></td>
  1353. </tr>
  1354. <tr>
  1355. <td valign="top">classname</td>
  1356. <td valign="top">the Java class to execute.</td>
  1357. <td align="center" valign="top">Yes</td>
  1358. </tr>
  1359. <tr>
  1360. <td valign="top">args</td>
  1361. <td valign="top">the arguments for the class that is executed.</td>
  1362. <td align="center" valign="top">No</td>
  1363. </tr>
  1364. <tr>
  1365. <td valign="top">classpath</td>
  1366. <td valign="top">the classpath to use.</td>
  1367. <td align="center" valign="top">No</td>
  1368. </tr>
  1369. <tr>
  1370. <td valign="top">fork</td>
  1371. <td valign="top">if enabled triggers the class execution in another VM
  1372. (disabled by default)</td>
  1373. <td align="center" valign="top">No</td>
  1374. </tr>
  1375. <tr>
  1376. <td valign="top">jvm</td>
  1377. <td valign="top">the command used to invoke the Java Virtual Machine,
  1378. default is 'java'. The command is resolved by java.lang.Runtime.exec().
  1379. Ignored if fork is disabled.
  1380. </td>
  1381. <td align="center" valign="top">No</td>
  1382. </tr>
  1383. <tr>
  1384. <td valign="top">jvmargs</td>
  1385. <td valign="top">the arguments to pass to the forked VM (ignored if fork is
  1386. disabled)</td>
  1387. <td align="center" valign="top">No</td>
  1388. </tr>
  1389. </table>
  1390. <h3>Examples</h3>
  1391. <pre> &lt;java classname=&quot;test.Main&quot; /&gt;</pre>
  1392. <pre> &lt;java classname=&quot;test.Main&quot; args=&quot;-h&quot; /&gt;</pre>
  1393. <pre> &lt;java classname=&quot;test.Main&quot;
  1394. args=&quot;-h&quot;
  1395. fork=&quot;yes&quot;
  1396. jvmargs=&quot;-Xrunhprof:cpu=samples,file=log.txt,depth=3&quot;
  1397. /&gt;</pre>
  1398. <hr>
  1399. <h2><a name="javac">Javac</a></h2>
  1400. <h3>Description</h3>
  1401. <p>Compiles a source tree within the running (Ant) VM.</p>
  1402. <p>The source and destination directory will be recursively scanned for Java
  1403. source files to compile. Only Java files that have no corresponding class file
  1404. or where the class file is older than the java file will be compiled.</p>
  1405. <p>Files in the source tree, that are no java files, are copied to the
  1406. destination directory, allowing support files to be located properly in the
  1407. classpath.</p>
  1408. <p>The directory structure of the source tree should follow the package
  1409. hierarchy.</p>
  1410. <p>It is possible to refine the set of files that are being compiled/copied.
  1411. This can be done with the <i>includes</i>, <i>excludes</i> and <i>defaultexcludes</i>
  1412. attributes. With the <i>includes</i> attribute you specify the files you want to
  1413. have included by using patterns. The <i>exclude</i> attribute is used to specify
  1414. the files you want to have excluded. This is also done with patterns. And
  1415. finally with the <i>defaultexcludes</i> attribute, you can specify whether you
  1416. want to use default exclusions or not. See the section on <a
  1417. href="#directorybasedtasks">directory based tasks</a>, on how the
  1418. inclusion/exclusion of files works, and how to write patterns. The patterns are
  1419. relative to the <i>srcdir</i> directory.</p>
  1420. <p>It is possible to use different compilers. This can be selected with the
  1421. &quot;build.compiler&quot; property. There are three choices:</p>
  1422. <ul>
  1423. <li>classic (the standard compiler of JDK 1.1/1.2)</li>
  1424. <li>modern (the new compiler of JDK 1.3)</li>
  1425. <li>jikes (the <a
  1426. href="http://oss.software.ibm.com/developerworks/opensource/jikes/project">Jikes</a>
  1427. compiler)</li>
  1428. </ul>
  1429. <p>For JDK 1.1/1.2 is classic the default. For JDK 1.3 is modern the default.</p>
  1430. <h3>Parameters</h3>
  1431. <table border="1" cellpadding="2" cellspacing="0">
  1432. <tr>
  1433. <td valign="top"><b>Attribute</b></td>
  1434. <td valign="top"><b>Description</b></td>
  1435. <td align="center" valign="top"><b>Required</b></td>
  1436. </tr>
  1437. <tr>
  1438. <td valign="top">srcdir</td>
  1439. <td valign="top">location of the java files.</td>
  1440. <td align="center" valign="top">Yes</td>
  1441. </tr>
  1442. <tr>
  1443. <td valign="top">destdir</td>
  1444. <td valign="top">location where to store the class files.</td>
  1445. <td align="center" valign="top">Yes</td>
  1446. </tr>
  1447. <tr>
  1448. <td valign="top">includes</td>
  1449. <td valign="top">comma separated list of patterns of files that must be
  1450. included. All files are included when omitted.</td>
  1451. <td valign="top" align="center">No</td>
  1452. </tr>
  1453. <tr>
  1454. <td valign="top">excludes</td>
  1455. <td valign="top">comma separated list of patterns of files that must be
  1456. excluded. No files (except default excludes) are excluded when omitted.</td>
  1457. <td valign="top" align="center">No</td>
  1458. </tr>
  1459. <tr>
  1460. <td valign="top">defaultexcludes</td>
  1461. <td valign="top">indicates whether default excludes should be used or not
  1462. (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when omitted.</td>
  1463. <td valign="top" align="center">No</td>
  1464. </tr>
  1465. <tr>
  1466. <td valign="top">classpath</td>
  1467. <td valign="top">the classpath to use.</td>
  1468. <td align="center" valign="top">No</td>
  1469. </tr>
  1470. <tr>
  1471. <td valign="top">bootclasspath</td>
  1472. <td valign="top">location of bootstrap class files.</td>
  1473. <td align="center" valign="top">No</td>
  1474. </tr>
  1475. <tr>
  1476. <td valign="top">extdirs</td>
  1477. <td valign="top">location of installed extensions.</td>
  1478. <td align="center" valign="top">No</td>
  1479. </tr>
  1480. <tr>
  1481. <td valign="top">debug</td>
  1482. <td valign="top">indicates whether there should be compiled with debug
  1483. information (&quot;on&quot;).</td>
  1484. <td align="center" valign="top">No</td>
  1485. </tr>
  1486. <tr>
  1487. <td valign="top">optimize</td>
  1488. <td valign="top">indicates whether there should be compiled with
  1489. optimization (&quot;on&quot;).</td>
  1490. <td align="center" valign="top">No</td>
  1491. </tr>
  1492. <tr>
  1493. <td valign="top">deprecation</td>
  1494. <td valign="top">indicates whether there should be compiled with deprecation
  1495. information (&quot;on&quot;).</td>
  1496. <td align="center" valign="top">No</td>
  1497. </tr>
  1498. <tr>
  1499. <td valign="top">filtering</td>
  1500. <td valign="top">indicates whether token filtering should take place</td>
  1501. <td valign="top" align="center">No</td>
  1502. </tr>
  1503. <tr>
  1504. <td valign="top">target</td>
  1505. <td valign="top">Generate class files for specific VM version, e.g. "1.1" or "1.2".</td>
  1506. <td align="center" valign="top">No</td>
  1507. </tr>
  1508. </table>
  1509. <h3>Examples</h3>
  1510. <pre> &lt;javac srcdir=&quot;${src}&quot;
  1511. destdir=&quot;${build}&quot;
  1512. classpath=&quot;xyz.jar&quot;
  1513. debug=&quot;on&quot;
  1514. /&gt;</pre>
  1515. <p>compiles all .java files under the directory <code>${src}</code>, and stores
  1516. the .class files in the directory <code>${build}</code>. It also copies the non-java
  1517. files from the tree under <code>${src}</code> to the tree under <code>${build}</code>.
  1518. The classpath used contains <code>xyz.jar</code>, and debug information is on.</p>
  1519. <pre> &lt;javac srcdir=&quot;${src}&quot;
  1520. destdir=&quot;${build}&quot;
  1521. includes=&quot;mypackage/p1/**,mypackage/p2/**&quot;
  1522. excludes=&quot;mypackage/p1/testpackage/**&quot;
  1523. classpath=&quot;xyz.jar&quot;
  1524. debug=&quot;on&quot;
  1525. /&gt;</pre>
  1526. <p>compiles .java files under the directory <code>${src}</code>, and stores the
  1527. .class files in the directory <code>${build}</code>. It also copies the non-java
  1528. files from the tree under <code>${src}</code> to the tree under <code>${build}</code>.
  1529. The classpath used contains <code>xyz.jar</code>, and debug information is on.
  1530. Only files under <code>mypackage/p1</code> and <code>mypackage/p2</code> are
  1531. used. Files in the <code>mypackage/p1/testpackage</code> directory are excluded
  1532. form compilation and copy.</p>
  1533. <hr>
  1534. <h2><a name="javadoc">Javadoc/Javadoc2</a></h2>
  1535. <h3>Description</h3>
  1536. <p>Generates code documentation using the javadoc tool.</p>
  1537. <p>The source directory will be recursively scanned for Java source files to but
  1538. only those matching the inclusion rules will be passed to the javadoc tool. This
  1539. allows wildcards to be used to choose between package names, reducing verbosity
  1540. and management costs over time. This task, however, has no notion of
  1541. &quot;changed&quot; files, unlike the <a href="#javac">javac</a> task, but it's
  1542. not used so frequently.</p>
  1543. <p>This task works seamlessly between different javadoc versions (1.1 and 1.2),
  1544. with the obvious restriction that the 1.2 attributes will be ignored if run in a
  1545. 1.1 VM.</p>
  1546. <p>NOTE: since javadoc calls System.exit(), we cannot run javadoc inside the
  1547. same VM without breaking functionality. For this reason, this task always forks
  1548. the VM. But this is not a performance penalty since javadoc is normally a heavy
  1549. application and must be called just once.</p>
  1550. <p>DEPRECATION: the javadoc2 task simply points to the javadoc task and it's
  1551. there for back compatibility reasons. Since this task will be removed in future
  1552. versions, you are strongly encouraged to use <a href="#javadoc">javadoc</a>
  1553. instead.</p>
  1554. <h3>Parameters</h3>
  1555. <table border="1" cellpadding="2" cellspacing="0">
  1556. <tr>
  1557. <td valign="top"><b>Attribute</b></td>
  1558. <td valign="top"><b>Description</b></td>
  1559. <td align="center" valign="top"><b>Availability</b></td>
  1560. <td align="center" valign="top"><b>Required</b></td>
  1561. </tr>
  1562. <tr>
  1563. <td valign="top">sourcepath</td>
  1564. <td valign="top">Specify where to find source files</td>
  1565. <td align="center" valign="top">all</td>
  1566. <td align="center" valign="top">Yes</td>
  1567. </tr>
  1568. <tr>
  1569. <td valign="top">destdir</td>
  1570. <td valign="top">Destination directory for output files</td>
  1571. <td align="center" valign="top">all</td>
  1572. <td align="center" valign="top">Yes</td>
  1573. </tr>
  1574. <tr>
  1575. <td valign="top">sourcefiles</td>
  1576. <td valign="top">Space separated list of source files</td>
  1577. <td align="center" valign="top">all</td>
  1578. <td align="center" valign="middle" rowspan="2">at least one of the two</td>
  1579. </tr>
  1580. <tr>
  1581. <td valign="top">packagenames</td>
  1582. <td valign="top">Space separated list of package files (with terminating
  1583. wildcard)</td>
  1584. <td align="center" valign="top">all</td>
  1585. </tr>
  1586. <tr>
  1587. <td valign="top">Classpath</td>
  1588. <td valign="top">Specify where to find user class files</td>
  1589. <td align="center" valign="top">all</td>
  1590. <td align="center" valign="top">No</td>
  1591. </tr>
  1592. <tr>
  1593. <td valign="top">Bootclasspath</td>
  1594. <td valign="top">Override location of class files loaded by the bootstrap
  1595. class loader</td>
  1596. <td align="center" valign="top">1.2</td>
  1597. <td align="center" valign="top">No</td>
  1598. </tr>
  1599. <tr>
  1600. <td valign="top">Extdirs</td>
  1601. <td valign="top">Override location of installed extensions</td>
  1602. <td align="center" valign="top">1.2</td>
  1603. <td align="center" valign="top">No</td>
  1604. </tr>
  1605. <tr>
  1606. <td valign="top">Overview</td>
  1607. <td valign="top">Read overview documentation from HTML file</td>
  1608. <td align="center" valign="top">1.2</td>
  1609. <td align="center" valign="top">No</td>
  1610. </tr>
  1611. <tr>
  1612. <td valign="top">Public</td>
  1613. <td valign="top">Show only public classes and members</td>
  1614. <td align="center" valign="top">all</td>
  1615. <td align="center" valign="top">No</td>
  1616. </tr>
  1617. <tr>
  1618. <td valign="top">Protected</td>
  1619. <td valign="top">Show protected/public classes and members (default)</td>
  1620. <td align="center" valign="top">all</td>
  1621. <td align="center" valign="top">No</td>
  1622. </tr>
  1623. <tr>
  1624. <td valign="top">Package</td>
  1625. <td valign="top">Show package/protected/public classes and members</td>
  1626. <td align="center" valign="top">all</td>
  1627. <td align="center" valign="top">No</td>
  1628. </tr>
  1629. <tr>
  1630. <td valign="top">Private</td>
  1631. <td valign="top">Show all classes and members</td>
  1632. <td align="center" valign="top">all</td>
  1633. <td align="center" valign="top">No</td>
  1634. </tr>
  1635. <tr>
  1636. <td valign="top">Old</td>
  1637. <td valign="top">Generate output using JDK 1.1 emulating doclet</td>
  1638. <td align="center" valign="top">1.2</td>
  1639. <td align="center" valign="top">No</td>
  1640. </tr>
  1641. <tr>
  1642. <td valign="top">Verbose</td>
  1643. <td valign="top">Output messages about what Javadoc is doing</td>
  1644. <td align="center" valign="top">1.2</td>
  1645. <td align="center" valign="top">No</td>
  1646. </tr>
  1647. <tr>
  1648. <td valign="top">Locale</td>
  1649. <td valign="top">Locale to be used, e.g. en_US or en_US_WIN</td>
  1650. <td align="center" valign="top">1.2</td>
  1651. <td align="center" valign="top">No</td>
  1652. </tr>
  1653. <tr>
  1654. <td valign="top">Encoding</td>
  1655. <td valign="top">Source file encoding name</td>
  1656. <td align="center" valign="top">all</td>
  1657. <td align="center" valign="top">No</td>
  1658. </tr>
  1659. <tr>
  1660. <td valign="top">Version</td>
  1661. <td valign="top">Include @version paragraphs</td>
  1662. <td align="center" valign="top">all</td>
  1663. <td align="center" valign="top">No</td>
  1664. </tr>
  1665. <tr>
  1666. <td valign="top">Use</td>
  1667. <td valign="top">Create class and package usage pages</td>
  1668. <td align="center" valign="top">1.2</td>
  1669. <td align="center" valign="top">No</td>
  1670. </tr>
  1671. <tr>
  1672. <td valign="top">Author</td>
  1673. <td valign="top">Include @author paragraphs</td>
  1674. <td align="center" valign="top">all</td>
  1675. <td align="center" valign="top">No</td>
  1676. </tr>
  1677. <tr>
  1678. <td valign="top">Splitindex</td>
  1679. <td valign="top">Split index into one file per letter</td>
  1680. <td align="center" valign="top">1.2</td>
  1681. <td align="center" valign="top">No</td>
  1682. </tr>
  1683. <tr>
  1684. <td valign="top">Windowtitle</td>
  1685. <td valign="top">Browser window title for the documenation (text)</td>
  1686. <td align="center" valign="top">1.2</td>
  1687. <td align="center" valign="top">No</td>
  1688. </tr>
  1689. <tr>
  1690. <td valign="top">Doctitle</td>
  1691. <td valign="top">Include title for the package index(first) page (html-code)</td>
  1692. <td align="center" valign="top">1.2</td>
  1693. <td align="center" valign="top">No</td>
  1694. </tr>
  1695. <tr>
  1696. <td valign="top">Header</td>
  1697. <td valign="top">Include header text for each page (html-code)</td>
  1698. <td align="center" valign="top">1.2</td>
  1699. <td align="center" valign="top">No</td>
  1700. </tr>
  1701. <tr>
  1702. <td valign="top">Footer</td>
  1703. <td valign="top">Include footer text for each page (html-code)</td>
  1704. <td align="center" valign="top">1.2</td>
  1705. <td align="center" valign="top">No</td>
  1706. </tr>
  1707. <tr>
  1708. <td valign="top">bottom</td>
  1709. <td valign="top">Include bottom text for each page (html-code)</td>
  1710. <td align="center" valign="top">1.2</td>
  1711. <td align="center" valign="top">No</td>
  1712. </tr>
  1713. <tr>
  1714. <td valign="top">link</td>
  1715. <td valign="top">Create links to javadoc output at the given URL</td>
  1716. <td align="center" valign="top">1.2</td>
  1717. <td align="center" valign="top">No</td>
  1718. </tr>
  1719. <tr>
  1720. <td valign="top">linkoffline</td>
  1721. <td valign="top">Link to docs at &lt;url&gt; using package list at
  1722. &lt;url2&gt;</td>
  1723. <td align="center" valign="top">1.2</td>
  1724. <td align="center" valign="top">No</td>
  1725. </tr>
  1726. <tr>
  1727. <td valign="top">group</td>
  1728. <td valign="top">Group specified packages together in overview page</td>
  1729. <td align="center" valign="top">1.2</td>
  1730. <td align="center" valign="top">No</td>
  1731. </tr>
  1732. <tr>
  1733. <td valign="top">nodeprecated</td>
  1734. <td valign="top">Do not include @deprecated information</td>
  1735. <td align="center" valign="top">all</td>
  1736. <td align="center" valign="top">No</td>
  1737. </tr>
  1738. <tr>
  1739. <td valign="top">nodeprecatedlist</td>
  1740. <td valign="top">Do not generate deprecated list</td>
  1741. <td align="center" valign="top">1.2</td>
  1742. <td align="center" valign="top">No</td>
  1743. </tr>
  1744. <tr>
  1745. <td valign="top">notree</td>
  1746. <td valign="top">Do not generate class hierarchy</td>
  1747. <td align="center" valign="top">all</td>
  1748. <td align="center" valign="top">No</td>
  1749. </tr>
  1750. <tr>
  1751. <td valign="top">noindex</td>
  1752. <td valign="top">Do not generate index</td>
  1753. <td align="center" valign="top">all</td>
  1754. <td align="center" valign="top">No</td>
  1755. </tr>
  1756. <tr>
  1757. <td valign="top">nohelp</td>
  1758. <td valign="top">Do not generate help link</td>
  1759. <td align="center" valign="top">1.2</td>
  1760. <td align="center" valign="top">No</td>
  1761. </tr>
  1762. <tr>
  1763. <td valign="top">nonavbar</td>
  1764. <td valign="top">Do not generate navigation bar</td>
  1765. <td align="center" valign="top">1.2</td>
  1766. <td align="center" valign="top">No</td>
  1767. </tr>
  1768. <tr>
  1769. <td valign="top">serialwarn</td>
  1770. <td valign="top">FUTURE: Generate warning about @serial tag</td>
  1771. <td align="center" valign="top">1.2</td>
  1772. <td align="center" valign="top">No</td>
  1773. </tr>
  1774. <tr>
  1775. <td valign="top">helpfile</td>
  1776. <td valign="top">FUTURE: Specifies the HTML help file to use</td>
  1777. <td align="center" valign="top">1.2</td>
  1778. <td align="center" valign="top">No</td>
  1779. </tr>
  1780. <tr>
  1781. <td valign="top">stylesheetfile</td>
  1782. <td valign="top">Specifies the CSS stylesheet to use</td>
  1783. <td align="center" valign="top">1.2</td>
  1784. <td align="center" valign="top">No</td>
  1785. </tr>
  1786. <tr>
  1787. <td valign="top">charset</td>
  1788. <td valign="top">FUTURE: Charset for cross-platform viewing of generated
  1789. documentation</td>
  1790. <td align="center" valign="top">1.2</td>
  1791. <td align="center" valign="top">No</td>
  1792. </tr>
  1793. <tr>
  1794. <td valign="top">docencoding</td>
  1795. <td valign="top">Output file encoding name</td>
  1796. <td align="center" valign="top">1.1</td>
  1797. <td align="center" valign="top">No</td>
  1798. </tr>
  1799. <tr>
  1800. <td valign="top">doclet</td>
  1801. <td valign="top">Specifies the class file that starts the doclet used in generating the documentation.</td>
  1802. <td align="center" valign="top">No</td>
  1803. </tr>
  1804. <tr>
  1805. <td valign="top">docletpath</td>
  1806. <td valign="top">Specifies the path to the doclet class file that is specified with the -doclet option.</td>
  1807. <td align="center" valign="top">No</td>
  1808. </tr>
  1809. </table>
  1810. <h3>Example</h3>
  1811. <pre> &lt;javadoc packagenames=&quot;com.dummy.test.*&quot;
  1812. sourcepath=&quot;src&quot;
  1813. destdir=&quot;docs/api&quot;
  1814. author=&quot;true&quot;
  1815. version=&quot;true&quot;
  1816. use=&quot;true&quot;
  1817. windowtitle=&quot;Test API&quot;
  1818. doctitle=&quot;&lt;h1&gt;Test&lt;/h1&gt;&quot;
  1819. bottom=&quot;&lt;i&gt;Copyright &amp;#169; 2000 Dummy Corp. All Rights Reserved.&lt;/i&gt;&quot;
  1820. /&gt;</pre>
  1821. <hr>
  1822. <h2><a name="keysubst">KeySubst</a></h2>
  1823. <h3>Description</h3>
  1824. <p>Performs keyword substitution in the source file, and writes the result to
  1825. the destination file.</p>
  1826. <p>Keys in the source file are of the form ${keyname}. The <i>keys</i> attribute
  1827. contains key/value pairs. When a key is found in the <i>keys</i> attribute, then
  1828. &quot;${keyname}&quot; is replaced by the corresponding value.</p>
  1829. <p>The <i>keys</i> attribute is of the form
  1830. &quot;name1=value1*name2=value2*name3=value3&quot;. The '*' is called the
  1831. separator, which might we changed with the <i>sep</i> attribute.</p>
  1832. <p>Note: the source file and destination file may not be the same.</p>
  1833. <h3>Parameters</h3>
  1834. <table border="1" cellpadding="2" cellspacing="0">
  1835. <tr>
  1836. <td valign="top"><b>Attribute</b></td>
  1837. <td valign="top"><b>Description</b></td>
  1838. <td align="center" valign="top"><b>Required</b></td>
  1839. </tr>
  1840. <tr>
  1841. <td valign="top">src</td>
  1842. <td valign="top">the source file.</td>
  1843. <td align="center" valign="top">Yes</td>
  1844. </tr>
  1845. <tr>
  1846. <td valign="top">dest</td>
  1847. <td valign="top">the destination file.</td>
  1848. <td align="center" valign="top">Yes</td>
  1849. </tr>
  1850. <tr>
  1851. <td valign="top">sep</td>
  1852. <td valign="top">the separator for the name/value pairs.</td>
  1853. <td align="center" valign="top">No</td>
  1854. </tr>
  1855. <tr>
  1856. <td valign="top">keys</td>
  1857. <td valign="top">name/value pairs for replacement.</td>
  1858. <td align="center" valign="top">Yes</td>
  1859. </tr>
  1860. </table>
  1861. <h3>Examples</h3>
  1862. <pre> &lt;keysubst src=&quot;abc.txt&quot; dest=&quot;def.txt&quot; keys=&quot;VERSION=1.0.3*DATE=2000-01-10&quot; /&gt;</pre>
  1863. <hr>
  1864. <h2><a name="mkdir">Mkdir</a></h2>
  1865. <h3>Description</h3>
  1866. <p>Creates a directory. Also non-existent parent directories are created, when
  1867. necessary.</p>
  1868. <h3>Parameters</h3>
  1869. <table border="1" cellpadding="2" cellspacing="0">
  1870. <tr>
  1871. <td valign="top"><b>Attribute</b></td>
  1872. <td valign="top"><b>Description</b></td>
  1873. <td align="center" valign="top"><b>Required</b></td>
  1874. </tr>
  1875. <tr>
  1876. <td valign="top">dir</td>
  1877. <td valign="top">the directory to create.</td>
  1878. <td align="center" valign="top">Yes</td>
  1879. </tr>
  1880. </table>
  1881. <h3>Examples</h3>
  1882. <pre>&lt;mkdir dir=&quot;${dist}&quot; /&gt;</pre>
  1883. <p>creates a directory <code>${dist}</code>.</p>
  1884. <pre>&lt;mkdir dir=&quot;${dist}/lib&quot; /&gt;</pre>
  1885. <p>creates a directory <code>${dist}/lib</code>.</p>
  1886. <hr>
  1887. <h2><a name="patch">Patch</a></h2>
  1888. <h3>Description</h3>
  1889. <p>Applies a diff file to originals.
  1890. <h3>Parameters</h3>
  1891. <table border="1" cellpadding="2" cellspacing="0">
  1892. <tr>
  1893. <td valign="top"><b>Attribute</b></td>
  1894. <td valign="top"><b>Description</b></td>
  1895. <td align="center" valign="top"><b>Required</b></td>
  1896. </tr>
  1897. <tr>
  1898. <td valign="top">dir</td>
  1899. <td valign="top">the directory in which the command should be executed.</td>
  1900. <td align="center" valign="top">Yes</td>
  1901. </tr>
  1902. <tr>
  1903. <td valign="top">os</td>
  1904. <td valign="top">list of Operating Systems on which the command may be
  1905. executed.</td>
  1906. <td align="center" valign="top">No</td>
  1907. </tr>
  1908. <tr>
  1909. <td valign="top">output</td>
  1910. <td valign="top">the file to which the output of the patch command
  1911. should be redirected.</td>
  1912. <td align="center" valign="top">No</td>
  1913. </tr>
  1914. <tr>
  1915. <td valign="top">patchfile</td>
  1916. <td valign="top">the file that includes the diff output</td>
  1917. <td align="center" valign="top">Yes</td>
  1918. </tr>
  1919. <tr>
  1920. <td valign="top">originalfile</td>
  1921. <td valign="top">the file to patch</td>
  1922. <td align="center" valign="top">No, tries to guess it from the diff
  1923. file</td>
  1924. </tr>
  1925. <tr>
  1926. <td valign="top">backups</td>
  1927. <td valign="top">Keep backups of the unpatched files</td>
  1928. <td align="center" valign="top">No</td>
  1929. </tr>
  1930. <tr>
  1931. <td valign="top">quiet</td>
  1932. <td valign="top">Work silently unless an error occurs</td>
  1933. <td align="center" valign="top">No</td>
  1934. </tr>
  1935. <tr>
  1936. <td valign="top">reverse</td>
  1937. <td valign="top">Assume patch was created with old and new files
  1938. swapped.</td>
  1939. <td align="center" valign="top">No</td>
  1940. </tr>
  1941. <tr>
  1942. <td valign="top">ignorewhitespace</td>
  1943. <td valign="top">Ignore whitespace differences.</td>
  1944. <td align="center" valign="top">No</td>
  1945. </tr>
  1946. <tr>
  1947. <td valign="top">strip</td>
  1948. <td valign="top">Strip the smallest prefix containing <i>num</i> leading
  1949. slashes from filenames.</td>
  1950. <td align="center" valign="top">No</td>
  1951. </tr>
  1952. </table>
  1953. <h3>Examples</h3>
  1954. <pre> &lt;patch patchfile=&quot;module.1.0-1.1.patch&quot; /&gt;</pre>
  1955. <p>applies the diff included in <i>module.1.0-1.1.patch</i> to the
  1956. files in base directory guessing the filename(s) from the diff output.
  1957. <pre> &lt;patch patchfile=&quot;module.1.0-1.1.patch&quot; strip="1" /&gt;</pre>
  1958. <p>like above but one leading directory part will be removed. i.e. if
  1959. the diff output looked like
  1960. <pre>
  1961. --- a/mod1.0/A Mon Jun 5 17:28:41 2000
  1962. +++ a/mod1.1/A Mon Jun 5 17:28:49 2000
  1963. </pre>
  1964. the leading <i>a/</i> will be stripped.
  1965. <h2><a name="property">Property</a></h2>
  1966. <h3>Description</h3>
  1967. <p>Sets a property (by name and value), or set of properties (from file or
  1968. resource) in the project.</p>
  1969. <p>When a property was set by the user, or was a property in a parent project
  1970. (that started this project with the <a href="#ant">ant task</a>), then this
  1971. property cannot be set, and will be ignored. This means that properties set
  1972. outside the current project always override the properties of the current
  1973. project.</p>
  1974. <p>There are three ways to set properties:</p>
  1975. <ul>
  1976. <li>By supplying both the <i>name</i> and <i>value</i> attribute.</li>
  1977. <li>By setting the <i>file</i> attribute with the filename of the property
  1978. file to load. This property file has the format as defined by the file used
  1979. in the class java.util.Properties.</li>
  1980. <li>By setting the <i>resource</i> attribute with the resource name of the
  1981. property file to load. This property file has the format as defined by the
  1982. file used in the class java.util.Properties.</li>
  1983. </ul>
  1984. <p>Although combinations of the three ways are possible, only one should be used
  1985. at a time. Problems might occur with the order in which properties are set, for
  1986. instance.</p>
  1987. <p>The value part of the properties being set, might contain references to other
  1988. properties. These references are resolved at the time these properties are set.
  1989. This also holds for properties loaded from a property file.</p>
  1990. <h3>Parameters</h3>
  1991. <table border="1" cellpadding="2" cellspacing="0">
  1992. <tr>
  1993. <td valign="top"><b>Attribute</b></td>
  1994. <td valign="top"><b>Description</b></td>
  1995. <td align="center" valign="top"><b>Required</b></td>
  1996. </tr>
  1997. <tr>
  1998. <td valign="top">name</td>
  1999. <td valign="top">the name of the property to set.</td>
  2000. <td valign="top" align="center">Yes</td>
  2001. </tr>
  2002. <tr>
  2003. <td valign="top">value</td>
  2004. <td valign="top">the value of the property.</td>
  2005. <td valign="middle" align="center" rowspan="3">Yes</td>
  2006. </tr>
  2007. <tr>
  2008. <td valign="top">resource</td>
  2009. <td valign="top">the resource name of the property file.</td>
  2010. </tr>
  2011. <tr>
  2012. <td valign="top">file</td>
  2013. <td valign="top">the filename of the property file .</td>
  2014. </tr>
  2015. </table>
  2016. <h3>Examples</h3>
  2017. <pre> &lt;property name=&quot;foo.dist&quot; value=&quot;dist&quot; /&gt;</pre>
  2018. <p>sets the property <code>foo.dist</code> to the value &quot;dist&quot;.</p>
  2019. <pre> &lt;property file=&quot;foo.properties&quot; /&gt;</pre>
  2020. <p>reads a set of properties from a file called &quot;foo.properties&quot;.</p>
  2021. <pre> &lt;property resource=&quot;foo.properties&quot; /&gt;</pre>
  2022. <p>reads a set of properties from a resource called &quot;foo.properties&quot;.</p>
  2023. <p>Note that you can reference a global properties file for all of your Ant
  2024. builds using the following:
  2025. <pre> &lt;property file=&quot;${user.home}/.ant-global.properties&quot; /&gt;</pre>
  2026. <p>since the &quot;user.home&quot; property is defined by the Java virtual machine
  2027. to be your home directory. This technique is more appropriate for Unix than
  2028. Windows since the notion of a home directory doesn't exist on Windows. On the
  2029. JVM that I tested, the home directory on Windows is &quot;C:\&quot;. Different JVM
  2030. implementations may use other values for the home directory on Windows.
  2031. <hr>
  2032. <h2><a name="rename">Rename</a></h2>
  2033. <h3>Description</h3>
  2034. <p>Renames a given file.</p>
  2035. <h3>Parameters</h3>
  2036. <table border="1" cellpadding="2" cellspacing="0">
  2037. <tr>
  2038. <td valign="top"><b>Attribute</b></td>
  2039. <td valign="top"><b>Description</b></td>
  2040. <td align="center" valign="top"><b>Required</b></td>
  2041. </tr>
  2042. <tr>
  2043. <td valign="top">src</td>
  2044. <td valign="top">file to rename.</td>
  2045. <td valign="top" align="center">Yes</td>
  2046. </tr>
  2047. <tr>
  2048. <td valign="top">dest</td>
  2049. <td valign="top">new name of the file.</td>
  2050. <td valign="top" align="center">Yes</td>
  2051. </tr>
  2052. <tr>
  2053. <td valign="top">replace</td>
  2054. <td valign="top">Enable replacing of existing file (default: on).</td>
  2055. <td valign="top" align="center">No</td>
  2056. </tr>
  2057. </table>
  2058. <h3>Examples</h3>
  2059. <pre> &lt;rename src=&quot;foo.jar&quot; dest=&quot;${name}-${version}.jar&quot; /&gt;</pre>
  2060. <p>Renames the file <code>foo.jar</code> to <code>${name}-${version}.jar</code> (assuming <code>name</code>
  2061. and <code>version</code> being predefined properties). If a file named <code>${name}-${version}.jar</code>
  2062. already exists, it will be removed prior to renameing <code>foo.jar</code>.</p>
  2063. <hr>
  2064. <h2><a name="replace">Replace</a></h2>
  2065. <h3>Description</h3>
  2066. <p>Replaces the occurrence of a given string with another string in a file.</p>
  2067. <h3>Parameters</h3>
  2068. <table border="1" cellpadding="2" cellspacing="0">
  2069. <tr>
  2070. <td valign="top"><b>Attribute</b></td>
  2071. <td valign="top"><b>Description</b></td>
  2072. <td align="center" valign="top"><b>Required</b></td>
  2073. </tr>
  2074. <tr>
  2075. <td valign="top">file</td>
  2076. <td valign="top">file for which the token should be replaced.</td>
  2077. <td valign="top" align="center">Yes</td>
  2078. </tr>
  2079. <tr>
  2080. <td valign="top">token</td>
  2081. <td valign="top">the token which must be replaced.</td>
  2082. <td valign="top" align="center">Yes</td>
  2083. </tr>
  2084. <tr>
  2085. <td valign="top">value</td>
  2086. <td valign="top">the new value for the token. When omitted, an empty string
  2087. (&quot;&quot;) is used.</td>
  2088. <td valign="top" align="center">No</td>
  2089. </tr>
  2090. </table>
  2091. <h3>Examples</h3>
  2092. <pre> &lt;replace file=&quot;${src}/index.html&quot; token=&quot;@@@&quot; value=&quot;wombat&quot; /&gt;</pre>
  2093. <p>replaces occurrences of the string &quot;@@@&quot; with the string
  2094. &quot;wombat&quot;, in the file <code>${src}/index.html</code>.</p>
  2095. <hr>
  2096. <h2><a name="rmic">Rmic</a></h2>
  2097. <h3>Description</h3>
  2098. <p>Runs the rmic compiler for a certain class.</p>
  2099. <h3>Parameters</h3>
  2100. <table border="1" cellpadding="2" cellspacing="0">
  2101. <tr>
  2102. <td valign="top"><b>Attribute</b></td>
  2103. <td valign="top"><b>Description</b></td>
  2104. <td align="center" valign="top"><b>Required</b></td>
  2105. </tr>
  2106. <tr>
  2107. <td valign="top">base</td>
  2108. <td valign="top">the location to store the compiled files.</td>
  2109. <td valign="top" align="center">Yes</td>
  2110. </tr>
  2111. <tr>
  2112. <td valign="top">classname</td>
  2113. <td valign="top">the class for which to run <code>rmic</code>.</td>
  2114. <td valign="top" align="center">Yes</td>
  2115. </tr>
  2116. <tr>
  2117. <td valign="top">filtering</td>
  2118. <td valign="top">indicates whether token filtering should take place</td>
  2119. <td valign="top" align="center">No</td>
  2120. </tr>
  2121. <tr>
  2122. <td valign="top">sourcebase</td>
  2123. <td valign="top">Pass the "-keepgenerated" flag to rmic and
  2124. move the generated source file to the base directory.</td>
  2125. <td align="center" valign="top">No</td>
  2126. </tr>
  2127. <tr>
  2128. <td valign="top">stubversion</td>
  2129. <td valign="top">Specify the JDK version for the generated stub code.
  2130. Specify "1.1" to pass the "-v1.1" option to rmic.</td>
  2131. <td align="center" valign="top">No</td>
  2132. </tr>
  2133. <tr>
  2134. <td valign="top">classpath</td>
  2135. <td valign="top">The classpath to use during compilation</td>
  2136. <td align="center" valign="top">No</td>
  2137. </tr>
  2138. </table>
  2139. <h3>Examples</h3>
  2140. <pre> &lt;rmic classname=&quot;com.xyz.FooBar&quot; base=&quot;${build}/classes&quot; /&gt;</pre>
  2141. <p>runs the rmic compiler for the class <code>com.xyz.FooBar</code>. The
  2142. compiled files will be stored in the directory <code>${build}/classes</code>.</p>
  2143. <hr>
  2144. <h2><a name="tar">Tar</a></h2>
  2145. <h3>Description</h3>
  2146. <p>Creates a tar archive.</p>
  2147. <p>The <i>basedir</i> attribute is the reference directory from where to tar.</p>
  2148. <p>It is possible to refine the set of files that are being tarred. This can be
  2149. done with the <i>includes</i>, <i>excludes</i> and <i>defaultexcludes</i>
  2150. attributes. With the <i>includes</i> attribute you specify the files you want to
  2151. have included by using patterns. The <i>exclude</i> attribute is used to specify
  2152. the files you want to have excluded. This is also done with patterns. And
  2153. finally with the <i>defaultexcludes</i> attribute, you can specify whether you
  2154. want to use default exclusions or not. See the section on <a
  2155. href="#directorybasedtasks">directory based tasks</a>, on how the
  2156. inclusion/exclusion of files works, and how to write patterns. The patterns are
  2157. relative to the <i>basedir</i> directory.</p>
  2158. <p>The <i>includes</i>, <i>excludes</i> and <i>defaultexcludes</i> attributes
  2159. replace the <i>items</i> and <i>ignore</i> attributes. The following explains
  2160. how the deprecated <i>items</i> and <i>ignore</i> attribute behave.</p>
  2161. <p>When &quot;*&quot; is used for <i>items</i>, all files in the basedir, and
  2162. its subdirectories, will be tarred. Otherwise all the files and directories
  2163. mentioned in the items list will tarred. When a directory is specified, then all
  2164. files within it are also tarred.</p>
  2165. <p>With the <i>ignore</i> attribute, you can specify files or directories to
  2166. ignore. These files will not be tarred. The items in the <i>ignore</i> attribute
  2167. override the items in the <i>items</i> attribute. The names specified in the <i>ignore</i>
  2168. attribute are just names, they do not contain any path information!</p>
  2169. <p>Note that this task does not perform compression. You might want to use the <a href="#gzip">GZip</a>
  2170. task to come up with a .tar.gz package.</p>
  2171. <h3>Parameters</h3>
  2172. <table border="1" cellpadding="2" cellspacing="0">
  2173. <tr>
  2174. <td valign="top"><b>Attribute</b></td>
  2175. <td valign="top"><b>Description</b></td>
  2176. <td valign="top" align="center"><b>Required</b></td>
  2177. </tr>
  2178. <tr>
  2179. <td valign="top">tarfile</td>
  2180. <td valign="top">the tar-file to create.</td>
  2181. <td align="center" valign="top">Yes</td>
  2182. </tr>
  2183. <tr>
  2184. <td valign="top">basedir</td>
  2185. <td valign="top">the directory from which to zip the files.</td>
  2186. <td align="center" valign="top">Yes</td>
  2187. </tr>
  2188. <tr>
  2189. <td valign="top">includes</td>
  2190. <td valign="top">comma separated list of patterns of files that must be
  2191. included. All files are included when omitted.</td>
  2192. <td valign="top" align="center">No</td>
  2193. </tr>
  2194. <tr>
  2195. <td valign="top">excludes</td>
  2196. <td valign="top">comma separated list of patterns of files that must be
  2197. excluded. No files (except default excludes) are excluded when omitted.</td>
  2198. <td valign="top" align="center">No</td>
  2199. </tr>
  2200. <tr>
  2201. <td valign="top">defaultexcludes</td>
  2202. <td valign="top">indicates whether default excludes should be used or not
  2203. (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when omitted.</td>
  2204. <td valign="top" align="center">No</td>
  2205. </tr>
  2206. </table>
  2207. <h3>Examples</h3>
  2208. <pre> &lt;tar tarfile=&quot;${dist}/manual.tar&quot; basedir=&quot;htdocs/manual&quot; /&gt;
  2209. &lt;gzip zipfile=&quot;${dist}/manual.tar.gz&quot; src=&quot;${dist}/manual.tar&quot; /&gt;</pre>
  2210. <p>tars all files in the <code>htdocs/manual</code> directory in a file called <code>manual.tar</code>
  2211. in the <code>${dist}</code> directory, then applies the gzip task to compress
  2212. it.</p>
  2213. <pre> &lt;tar tarfile=&quot;${dist}/manual.tar&quot;
  2214. basedir=&quot;htdocs/manual&quot;
  2215. excludes=&quot;mydocs/**, **/todo.html&quot;
  2216. /&gt;</pre>
  2217. <p>tars all files in the <code>htdocs/manual</code> directory in a file called <code>manual.tar</code>
  2218. in the <code>${dist}</code> directory. Files in the directory <code>mydocs</code>,
  2219. or files with the name <code>todo.html</code> are excluded.</p>
  2220. <hr>
  2221. <h2><a name="taskdef">Taskdef</a></h2>
  2222. <h3>Description</h3>
  2223. <p>Adds a task definition to the current project, such that this new task can be
  2224. used in the current project. Two attributes are needed, the name that identifies
  2225. this task uniquely, and the full name of the class (including the packages) that
  2226. implements this task.</p>
  2227. <p>Taskdef should be used to add your own tasks to the system. See also &quot;<a
  2228. href="#writingowntask">Writing your own task</a>&quot;.</p>
  2229. <h3>Parameters</h3>
  2230. <table border="1" cellpadding="2" cellspacing="0">
  2231. <tr>
  2232. <td valign="top"><b>Attribute</b></td>
  2233. <td valign="top"><b>Description</b></td>
  2234. <td align="center" valign="top"><b>Required</b></td>
  2235. </tr>
  2236. <tr>
  2237. <td valign="top">name</td>
  2238. <td valign="top">the name of the task</td>
  2239. <td valign="top" align="center">Yes</td>
  2240. </tr>
  2241. <tr>
  2242. <td valign="top">classname</td>
  2243. <td valign="top">the full class name implementing the task</td>
  2244. <td valign="top" align="center">Yes</td>
  2245. </tr>
  2246. </table>
  2247. <h3>Examples</h3>
  2248. <pre> &lt;taskdef name=&quot;myjavadoc&quot; classname=&quot;com.mydomain.JavadocTask&quot; /&gt;</pre>
  2249. <p>makes a task called <code>myjavadoc</code> available to Ant. The class <code>com.mydomain.JavadocTask</code>
  2250. implements the task.</p>
  2251. <hr>
  2252. <h2><a name="tstamp">Tstamp</a></h2>
  2253. <h3>Description</h3>
  2254. <p>Sets the DSTAMP, TSTAMP and TODAY properties in the current project. The
  2255. DSTAMP is in the &quot;yyyymmdd&quot; format, the TSTAMP is in the &quot;hhmm&quot;
  2256. format and TODAY is &quot;month day year&quot;.</p>
  2257. <p>These properties can be used in the buildfile, for instance, to create
  2258. timestamped filenames or used to replace placeholder tags inside documents to
  2259. indicate, for example, the release date. The best place for this task is in your
  2260. initialization target.</p>
  2261. <h3>Parameters</h3>
  2262. <table border="1" cellpadding="2" cellspacing="0">
  2263. <tr>
  2264. <td valign="top"><b>Attribute</b></td>
  2265. <td valign="top"><b>Description</b></td>
  2266. <td align="center" valign="top"><b>Required</b></td>
  2267. </tr>
  2268. </table>
  2269. <h3>Examples</h3>
  2270. <pre> &lt;tstamp/&gt;</pre>
  2271. <hr>
  2272. <h2><a name="untar">Untar</a></h2>
  2273. <h3>Description</h3>
  2274. <p>Untars a tarfile.</p>
  2275. <p>For JDK 1.1 "last modified time" field is set to current time instead of being
  2276. carried from tarfile.</p>
  2277. <h3>Parameters</h3>
  2278. <table border="1" cellpadding="2" cellspacing="0">
  2279. <tr>
  2280. <td valign="top"><b>Attribute</b></td>
  2281. <td valign="top"><b>Description</b></td>
  2282. <td align="center" valign="top"><b>Required</b></td>
  2283. </tr>
  2284. <tr>
  2285. <td valign="top">src</td>
  2286. <td valign="top">tarfile to expand.</td>
  2287. <td align="center" valign="top">Yes</td>
  2288. </tr>
  2289. <tr>
  2290. <td valign="top">dest</td>
  2291. <td valign="top">directory where to store the expanded files.</td>
  2292. <td align="center" valign="top">Yes</td>
  2293. </tr>
  2294. </table>
  2295. <h3>Examples</h3>
  2296. <blockquote>
  2297. <p><code>
  2298. &lt;gunzip src=&quot;tools.tar.gz&quot;/&gt;<br>
  2299. &lt;untar src=&quot;tools.tar&quot; dest=&quot;${tools.home}&quot;/&gt;
  2300. </code></p>
  2301. </blockquote>
  2302. <hr>
  2303. <h2><a name="zip">Zip</a></h2>
  2304. <h3>Description</h3>
  2305. <p>Creates a zipfile.</p>
  2306. <p>The <i>basedir</i> attribute is the reference directory from where to zip.</p>
  2307. <p>It is possible to refine the set of files that are being zipped. This can be
  2308. done with the <i>includes</i>, <i>excludes</i> and <i>defaultexcludes</i>
  2309. attributes. With the <i>includes</i> attribute you specify the files you want to
  2310. have included by using patterns. The <i>exclude</i> attribute is used to specify
  2311. the files you want to have excluded. This is also done with patterns. And
  2312. finally with the <i>defaultexcludes</i> attribute, you can specify whether you
  2313. want to use default exclusions or not. See the section on <a
  2314. href="#directorybasedtasks">directory based tasks</a>, on how the
  2315. inclusion/exclusion of files works, and how to write patterns. The patterns are
  2316. relative to the <i>basedir</i> directory.</p>
  2317. <p>The <i>includes</i>, <i>excludes</i> and <i>defaultexcludes</i> attributes
  2318. replace the <i>items</i> and <i>ignore</i> attributes. The following explains
  2319. how the deprecated <i>items</i> and <i>ignore</i> attribute behave.</p>
  2320. <p>When &quot;*&quot; is used for <i>items</i>, all files in the basedir, and
  2321. its subdirectories, will be zipped. Otherwise all the files and directories
  2322. mentioned in the items list will zipped. When a directory is specified, then all
  2323. files within it are also zipped.</p>
  2324. <p>With the <i>ignore</i> attribute, you can specify files or directories to
  2325. ignore. These files will not be zipped. The items in the <i>ignore</i> attribute
  2326. override the items in the <i>items</i> attribute. The names specified in the <i>ignore</i>
  2327. attribute are just names, they do not contain any path information!</p>
  2328. <h3>Parameters</h3>
  2329. <table border="1" cellpadding="2" cellspacing="0">
  2330. <tr>
  2331. <td valign="top"><b>Attribute</b></td>
  2332. <td valign="top"><b>Description</b></td>
  2333. <td valign="top" align="center"><b>Required</b></td>
  2334. </tr>
  2335. <tr>
  2336. <td valign="top">zipfile</td>
  2337. <td valign="top">the zip-file to create.</td>
  2338. <td align="center" valign="top">Yes</td>
  2339. </tr>
  2340. <tr>
  2341. <td valign="top">basedir</td>
  2342. <td valign="top">the directory from which to zip the files.</td>
  2343. <td align="center" valign="top">Yes</td>
  2344. </tr>
  2345. <tr>
  2346. <td valign="top">compress</td>
  2347. <td valign="top">Not only store data but also compress them, defaults to true</td>
  2348. <td align="center" valign="top">No</td>
  2349. </tr>
  2350. <tr>
  2351. <td valign="top">items</td>
  2352. <td valign="top">a comma separated list of the files/directories to zip. All
  2353. files are included when omitted. (<b>deprecated</b>, use <i>includes</i>
  2354. instead).</td>
  2355. <td valign="top" align="center">No</td>
  2356. </tr>
  2357. <tr>
  2358. <td valign="top">ignore</td>
  2359. <td valign="top">comma separated list of filenames/directorynames to exclude
  2360. from the zip. No files (except default excludes) are excluded when
  2361. omitted. (<b>deprecated</b>, use <i>excludes</i> instead).</td>
  2362. <td valign="top" align="center">No</td>
  2363. </tr>
  2364. <tr>
  2365. <td valign="top">includes</td>
  2366. <td valign="top">comma separated list of patterns of files that must be
  2367. included. All files are included when omitted.</td>
  2368. <td valign="top" align="center">No</td>
  2369. </tr>
  2370. <tr>
  2371. <td valign="top">excludes</td>
  2372. <td valign="top">comma separated list of patterns of files that must be
  2373. excluded. No files (except default excludes) are excluded when omitted.</td>
  2374. <td valign="top" align="center">No</td>
  2375. </tr>
  2376. <tr>
  2377. <td valign="top">defaultexcludes</td>
  2378. <td valign="top">indicates whether default excludes should be used or not
  2379. (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when omitted.</td>
  2380. <td valign="top" align="center">No</td>
  2381. </tr>
  2382. </table>
  2383. <h3>Examples</h3>
  2384. <pre> &lt;zip zipfile=&quot;${dist}/manual.zip&quot;
  2385. basedir=&quot;htdocs/manual&quot;
  2386. /&gt;</pre>
  2387. <p>zips all files in the <code>htdocs/manual</code> directory in a file called <code>manual.zip</code>
  2388. in the <code>${dist}</code> directory.</p>
  2389. <pre> &lt;zip zipfile=&quot;${dist}/manual.zip&quot;
  2390. basedir=&quot;htdocs/manual&quot;
  2391. excludes=&quot;mydocs/**, **/todo.html&quot;
  2392. /&gt;</pre>
  2393. <p>zips all files in the <code>htdocs/manual</code> directory in a file called <code>manual.zip</code>
  2394. in the <code>${dist}</code> directory. Files in the directory <code>mydocs</code>,
  2395. or files with the name <code>todo.html</code> are excluded.</p>
  2396. <pre> &lt;zip zipfile=&quot;${dist}/manual.zip&quot;
  2397. basedir=&quot;htdocs/manual&quot;
  2398. includes=&quot;api/**/*.html&quot;
  2399. excludes=&quot;**/todo.html&quot;
  2400. /&gt;</pre>
  2401. <p>zips all files in the <code>htdocs/manual</code> directory in a file called <code>manual.zip</code>
  2402. in the <code>${dist}</code> directory. Only html files under the directory <code>api</code>
  2403. are zipped, and files with the name <code>todo.html</code> are excluded.</p>
  2404. <h3>Deprecated examples</h3>
  2405. <pre> &lt;zip zipfile=&quot;${dist}/manual.zip&quot;
  2406. basedir=&quot;htdocs/manual&quot;
  2407. items=&quot;*&quot;
  2408. /&gt;</pre>
  2409. <p>zips all files in the <code>htdocs/manual</code> directory in a file called <code>manual.zip</code>
  2410. in the <code>${dist}</code> directory.</p>
  2411. <pre> &lt;zip zipfile=&quot;${dist}/manual.zip&quot;
  2412. basedir=&quot;htdocs/manual&quot;
  2413. items=&quot;*&quot;
  2414. ignore=&quot;mydocs, todo.html&quot;
  2415. /&gt;</pre>
  2416. <p>zips all files in the <code>htdocs/manual</code> directory in a file called <code>manual.zip</code>
  2417. in the <code>${dist}</code> directory. Files/directories with the names <code>mydocs</code>
  2418. and <code>todo.html</code> are excluded.</p>
  2419. <hr>
  2420. <h2><a name="writingowntask">Writing your own task</a></h2>
  2421. <p>It is very easy to write your own task:</p>
  2422. <ol>
  2423. <li>Create a Java class that extends <code>org.apache.tools.ant.Task</code>.</li>
  2424. <li>For each attribute, write a setter method. The setter method must be a <code>public
  2425. void</code> method that takes one <code>String</code> as an argument. The
  2426. name of the method must begin with &quot;set&quot;, followed by the
  2427. attribute name, with the first character in uppercase, and the rest in
  2428. lowercase.</li>
  2429. <li>Write a <code>public void execute</code> method, with no arguments, that
  2430. throws a <code>BuildException</code>. This method implements the task
  2431. itself.</li>
  2432. </ol>
  2433. <p>It is important to know that Ant first calls the setters for the attributes
  2434. it encounters for a specific task in the buildfile, before it executes is.</p>
  2435. <p>Let's write our own task, that prints a message on the System.out stream. The
  2436. task has one attribute called &quot;message&quot;.</p>
  2437. <blockquote>
  2438. <pre>package com.mydomain;
  2439. import org.apache.tools.ant.BuildException;
  2440. import org.apache.tools.ant.Task;
  2441. public class MyVeryOwnTask extends Task {
  2442. private String msg;
  2443. // The method executing the task
  2444. public void execute() throws BuildException {
  2445. System.out.println(msg);
  2446. }
  2447. // The setter for the &quot;message&quot; attribute
  2448. public void setMessage(String msg) {
  2449. this.msg = msg;
  2450. }
  2451. }</pre>
  2452. </blockquote>
  2453. <p>It's really this simple;-)</p>
  2454. <p>Adding your task to the system is rather simple too:</p>
  2455. <ol>
  2456. <li>Make sure the class that implements your task is in the classpath when
  2457. starting Ant.</li>
  2458. <li>In your initialization target, add a <i>taskdef</i> task. This actually adds
  2459. your task to the system.</li>
  2460. <li>Use your task in the rest of the buildfile.</li>
  2461. </ol>
  2462. <h3>Example</h3>
  2463. <blockquote>
  2464. <pre>&lt;?xml version=&quot;1.0&quot;?&gt;
  2465. &lt;project name=&quot;OwnTaskExample&quot; default=&quot;main&quot; basedir=&quot;.&quot;&gt;
  2466. &lt;target name=&quot;init&quot;&gt;
  2467. &lt;taskdef name=&quot;mytask&quot; classname=&quot;com.mydomain.MyVeryOwnTask&quot;/&gt;
  2468. &lt;/target&gt;
  2469. &lt;target name=&quot;main&quot; depends=&quot;init&quot;&gt;
  2470. &lt;mytask message=&quot;Hello World! MyVeryOwnTask works!&quot; /&gt;
  2471. &lt;/target&gt;
  2472. &lt;/project&gt;
  2473. </pre>
  2474. </blockquote>
  2475. <p>Another way to add a task (more permanently), is to add the task name and
  2476. implementing class name to the <code>default.properties</code> file in the <code>org.apache.tools.ant.taskdefs</code>
  2477. package. Then you can use it as if it were a built in task.</p>
  2478. <hr>
  2479. <h2><a name="feedback">Feedback</a></h2>
  2480. <p>To provide feedback on this software, please subscribe to the Ant Development
  2481. Mail List <a href="mailto:(ant-dev-subscribe@jakarta.apache.org">(ant-dev-subscribe@jakarta.apache.org</a>)</p>
  2482. <hr>
  2483. <p align="center">Copyright 2000 Apache Software Foundation. All rights
  2484. Reserved.</p>
  2485. <h2><a name="optionaltasks">Optional tasks</a></h2>
  2486. <ul>
  2487. <li><a href="#netrexxc">NetRexxC</a></li>
  2488. <li><a href="#renameexts">RenameExtensions</a></li>
  2489. <li><a href="#script">Script</a></li>
  2490. </ul>
  2491. <hr>
  2492. <h2><a name="netrexxc">NetRexxC</a></h2>
  2493. <h3><b>Description:</b></h3>
  2494. <p>Compiles a <a href="http://www2.hursley.ibm.com/netrexx">NetRexx</a>
  2495. source tree within the running (Ant) VM.</p>
  2496. <p>The source and destination directory will be recursively scanned for
  2497. NetRexx source files to compile. Only NetRexx files that have no corresponding
  2498. class file or where the class file is older than the java file will be compiled.</p>
  2499. <p>Files in the source tree are copied to the destination directory,
  2500. allowing support files to be located properly in the classpath. The source
  2501. files are copied because the NetRexx compiler cannot produce class files in a
  2502. specific directory via parameters</p>
  2503. <p>The directory structure of the source tree should follow the package
  2504. hierarchy.</p>
  2505. <p>It is possible to refine the set of files that are being compiled/copied.
  2506. This can be done with the <i>includes</i>, <i>excludes</i> and
  2507. <i>defaultexcludes</i> attributes. With the <i>includes</i> attribute you
  2508. specify the files you want to have included by using patterns. The
  2509. <i>exclude</i> attribute is used to specify the files you want to have
  2510. excluded. This is also done with patterns. And finally with the
  2511. <i>defaultexcludes</i> attribute, you can specify whether you
  2512. want to use default exclusions or not. See the section on <a
  2513. href="#directorybasedtasks">directory based tasks</a>, on how the
  2514. inclusion/exclusion of files works, and how to write patterns. The
  2515. patterns are relative to the <i>srcDir</i> directory.</p>
  2516. <h3>Parameters:</h3>
  2517. <table border="1" cellpadding="2" cellspacing="0">
  2518. <tr>
  2519. <td valign="top"><b>Attribute</b></td>
  2520. <td valign="top"><b>Description</b></td>
  2521. <td align="center" valign="top"><b>Required</b></td>
  2522. </tr>
  2523. <tr>
  2524. <td valign="top">binary</td>
  2525. <td valign="top">Whether literals are treated as the java binary
  2526. type rather than the NetRexx types</td>
  2527. <td valign="top" align="center">No</td>
  2528. </tr>
  2529. <tr>
  2530. <td valign="top">classpath</td>
  2531. <td valign="top">The classpath to use during compilation</td>
  2532. <td valign="top" align="center">No</td>
  2533. </tr>
  2534. <tr>
  2535. <td valign="top">comments</td>
  2536. <td valign="top">Whether comments are passed through to the
  2537. generated java source</td>
  2538. <td valign="top" align="center">No</td>
  2539. </tr>
  2540. <tr>
  2541. <td valign="top">compact</td>
  2542. <td valign="top">Whether error messages come out in compact or
  2543. verbose format</td>
  2544. <td valign="top" align="center">No</td>
  2545. </tr>
  2546. <tr>
  2547. <td valign="top">compile</td>
  2548. <td valign="top">Whether the NetRexx compiler should compile the
  2549. generated java code</td>
  2550. <td valign="top" align="center">No</td>
  2551. </tr>
  2552. <tr>
  2553. <td valign="top">console</td>
  2554. <td valign="top">Whether or not messages should be displayed on the
  2555. 'console'</td>
  2556. <td valign="top" align="center">No</td>
  2557. </tr>
  2558. <tr>
  2559. <td valign="top">crossref</td>
  2560. <td valign="top">Whether variable cross references are generated</td>
  2561. <td valign="top" align="center">No</td>
  2562. </tr>
  2563. <tr>
  2564. <td valign="top">decimal</td>
  2565. <td valign="top">Whether decimal arithmetic should be used for the
  2566. NetRexx code</td>
  2567. <td valign="top" align="center">No</td>
  2568. </tr>
  2569. <tr>
  2570. <td valign="top">defaultexcludes</td>
  2571. <td valign="top">indicates whether default excludes should be used or not
  2572. (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when
  2573. omitted.</td>
  2574. <td valign="top" align="center">No</td>
  2575. </tr>
  2576. <tr>
  2577. <td valign="top">destDir</td>
  2578. <td valign="top">the destination directory into which the NetRexx
  2579. source files should be copied and then compiled</td>
  2580. <td valign="top" align="center">Yes</td>
  2581. </tr>
  2582. <tr>
  2583. <td valign="top">diag</td>
  2584. <td valign="top">Whether diagnostic information about the compile is
  2585. generated</td>
  2586. <td valign="top" align="center">No</td>
  2587. </tr>
  2588. <tr>
  2589. <td valign="top">excludes</td>
  2590. <td valign="top">comma separated list of patterns of files that must be
  2591. excluded. No files (except default excludes) are excluded when
  2592. omitted.</td>
  2593. <td valign="top" align="center">No</td>
  2594. </tr>
  2595. <tr>
  2596. <td valign="top">explicit</td>
  2597. <td valign="top">Whether variables must be declared explicitly
  2598. before use</td>
  2599. <td valign="top" align="center">No</td>
  2600. </tr>
  2601. <tr>
  2602. <td valign="top">format</td>
  2603. <td valign="top">Whether the generated java code is formatted nicely
  2604. or left to match NetRexx line numbers for call stack debugging</td>
  2605. <td valign="top" align="center">No</td>
  2606. </tr>
  2607. <tr>
  2608. <td valign="top">includes</td>
  2609. <td valign="top">comma separated list of patterns of files that must be
  2610. included. All files are included when omitted.</td>
  2611. <td valign="top" align="center">No</td>
  2612. </tr>
  2613. <tr>
  2614. <td valign="top">java</td>
  2615. <td valign="top">Whether the generated java code is produced</td>
  2616. <td valign="top" align="center">No</td>
  2617. </tr>
  2618. <tr>
  2619. <td valign="top">keep</td>
  2620. <td valign="top">Sets whether the generated java source file should be kept
  2621. after compilation. The generated files will have an extension of
  2622. .java.keep, <b>not</b> .java</td>
  2623. <td valign="top" align="center">No</td>
  2624. </tr>
  2625. <tr>
  2626. <td valign="top">logo</td>
  2627. <td valign="top">Whether the compiler text logo is displayed when
  2628. compiling</td>
  2629. <td valign="top" align="center">No</td>
  2630. </tr>
  2631. <tr>
  2632. <td valign="top">replace</td>
  2633. <td valign="top">Whether the generated .java file should be replaced
  2634. when compiling</td>
  2635. <td valign="top" align="center">No</td>
  2636. </tr>
  2637. <tr>
  2638. <td valign="top">savelog</td>
  2639. <td valign="top">Whether the compiler messages will be written to
  2640. NetRexxC.log as well as to the console</td>
  2641. <td valign="top" align="center">No</td>
  2642. </tr>
  2643. <tr>
  2644. <td valign="top">sourcedir</td>
  2645. <td valign="top">Tells the NetRexx compiler to store the class files in the
  2646. same directory as the source files. The alternative is the working
  2647. directory</td>
  2648. <td valign="top" align="center">No</td>
  2649. </tr>
  2650. <tr>
  2651. <td valign="top">srcDir</td>
  2652. <td valign="top">Set the source dir to find the source Netrexx
  2653. files</td>
  2654. <td valign="top" align="center">Yes</td>
  2655. </tr>
  2656. <tr>
  2657. <td valign="top">strictargs</td>
  2658. <td valign="top">Tells the NetRexx compiler that method calls always
  2659. need parentheses, even if no arguments are needed, e.g.
  2660. <code>aStringVar.getBytes</code> vs.
  2661. <code>aStringVar.getBytes()</code></td>
  2662. <td valign="top" align="center">No</td>
  2663. </tr>
  2664. <tr>
  2665. <td valign="top">strictassign</td>
  2666. <td valign="top">Tells the NetRexx compile that assignments must
  2667. match exactly on type</td>
  2668. <td valign="top" align="center">No</td>
  2669. </tr>
  2670. <tr>
  2671. <td valign="top">strictcase</td>
  2672. <td valign="top">Specifies whether the NetRexx compiler should be
  2673. case sensitive or not</td>
  2674. <td valign="top" align="center">No</td>
  2675. </tr>
  2676. <tr>
  2677. <td valign="top">strictimport</td>
  2678. <td valign="top">Whether classes need to be imported explicitly using an
  2679. <code>import</code> statement. By default the NetRexx compiler will
  2680. import certain packages automatically</td>
  2681. <td valign="top" align="center">No</td>
  2682. </tr>
  2683. <tr>
  2684. <td valign="top">strictprops</td>
  2685. <td valign="top">Whether local properties need to be qualified
  2686. explicitly using <code>this</code></td>
  2687. <td valign="top" align="center">No</td>
  2688. </tr>
  2689. <tr>
  2690. <td valign="top">strictsignal</td>
  2691. <td valign="top">Whether the compiler should force catching of
  2692. exceptions by explicitly named types</td>
  2693. <td valign="top" align="center">No</td>
  2694. </tr>
  2695. <tr>
  2696. <td valign="top">symbols</td>
  2697. <td valign="top">Whether debug symbols should be generated into the
  2698. class file</td>
  2699. <td valign="top" align="center">No</td>
  2700. </tr>
  2701. <tr>
  2702. <td valign="top">time</td>
  2703. <td valign="top">Asks the NetRexx compiler to print compilation
  2704. times to the console</td>
  2705. <td valign="top" align="center">No</td>
  2706. </tr>
  2707. <tr>
  2708. <td valign="top">trace</td>
  2709. <td valign="top">Turns on or off tracing and directs the resultant
  2710. trace output</td>
  2711. <td valign="top" align="center">No</td>
  2712. </tr>
  2713. <tr>
  2714. <td valign="top">utf8</td>
  2715. <td valign="top">Tells the NetRexx compiler that the source is in UTF8</td>
  2716. <td valign="top" align="center">No</td>
  2717. </tr>
  2718. <tr>
  2719. <td valign="top">verbose</td>
  2720. <td valign="top">Whether lots of warnings and error messages should
  2721. be generated</td>
  2722. <td valign="top" align="center">Yes</td>
  2723. </tr>
  2724. </table>
  2725. <h3>Examples</h3>
  2726. <blockquote>
  2727. <p><code>&lt;netrexxc srcDir=&quot;/source/project&quot;
  2728. includes=&quot;vnr/util/*&quot;
  2729. destDir=&quot;/source/project/build&quot;
  2730. classpath=&quot;/source/project2/proj.jar&quot;
  2731. comments=&quot;true&quot;
  2732. crossref=&quot;false&quot; replace=&quot;true&quot;
  2733. keep=&quot;true&quot; /&gt;</code>
  2734. </p>
  2735. </blockquote>
  2736. <hr>
  2737. <h2><a name="renameexts">RenameExtensions</a></h2>
  2738. <h3><b>Description:</b></h3>
  2739. <p>Renames files in the <code>srcDir</code> directory ending with the
  2740. <code>fromExtension</code> string so that they end with the
  2741. <code>toExtension</code> string. Files are only replaced if
  2742. <code>replace</code> is true
  2743. </p>
  2744. <p>See the section on
  2745. <a href="#directorybasedtasks">directory based tasks</a>, on how the
  2746. inclusion/exclusion of files works, and how to write patterns. The
  2747. patterns are relative to the <i>srcDir</i> directory.</p>
  2748. <h3>Parameters:</h3>
  2749. <table border="1" cellpadding="2" cellspacing="0">
  2750. <tr>
  2751. <td valign="top"><b>Attribute</b></td>
  2752. <td valign="top"><b>Description</b></td>
  2753. <td align="center" valign="top"><b>Required</b></td>
  2754. </tr>
  2755. <tr>
  2756. <td valign="top">defaultexcludes</td>
  2757. <td valign="top">indicates whether default excludes should be used or not
  2758. (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when
  2759. omitted.</td>
  2760. <td valign="top" align="center">No</td>
  2761. </tr>
  2762. <tr>
  2763. <td valign="top">excludes</td>
  2764. <td valign="top">comma separated list of patterns of files that must be
  2765. excluded. No files (except default excludes) are excluded when
  2766. omitted.</td>
  2767. <td valign="top" align="center">No</td>
  2768. </tr>
  2769. <tr>
  2770. <td valign="top">fromExtention</td>
  2771. <td valign="top">The string that files must end in to be renamed</td>
  2772. <td valign="top" align="center">Yes</td>
  2773. </tr>
  2774. <tr>
  2775. <td valign="top">includes</td>
  2776. <td valign="top">comma separated list of patterns of files that must be
  2777. included. All files are included when omitted.</td>
  2778. <td valign="top" align="center">No</td>
  2779. </tr>
  2780. <tr>
  2781. <td valign="top">replace</td>
  2782. <td valign="top">Whether the file being renamed to should be
  2783. replaced if it already exists</td>
  2784. <td valign="top" align="center">No</td>
  2785. </tr>
  2786. <tr>
  2787. <td valign="top">srcDir</td>
  2788. <td valign="top">The starting directory for files to search in</td>
  2789. <td valign="top" align="center">Yes</td>
  2790. </tr>
  2791. <tr>
  2792. <td valign="top">toExtension</td>
  2793. <td valign="top">The string that renamed files will end with on
  2794. completion</td>
  2795. <td valign="top" align="center">Yes</td>
  2796. </tr>
  2797. </table>
  2798. <h3>Examples</h3>
  2799. <blockquote>
  2800. <p><code>&lt;renameext srcDir=&quot;/source/project1&quot;
  2801. includes=&quot;**&quot;
  2802. excludes=&quot;**/samples/*&quot;
  2803. fromExtension=&quot;.java.keep&quot;
  2804. toExtension=&quot;.java&quot;
  2805. replace=&quot;true&quot; /&gt;
  2806. </code>
  2807. </p>
  2808. </blockquote>
  2809. <hr>
  2810. <h2><a name="script">Script</a></h2>
  2811. <h3><b>Description:</b></h3>
  2812. <p>Execute a script in a
  2813. <a href="http://www.alphaworks.ibm.com/tech/bsf">BSF</a> supported language.
  2814. <p>All items (tasks, targets, etc) of the running project are accessible
  2815. from the script.
  2816. <h3>Parameters:</h3>
  2817. <table border="1" cellpadding="2" cellspacing="0">
  2818. <tr>
  2819. <td valign="top"><b>Attribute</b></td>
  2820. <td valign="top"><b>Description</b></td>
  2821. <td align="center" valign="top"><b>Required</b></td>
  2822. </tr>
  2823. <tr>
  2824. <td valign="top">language</td>
  2825. <td valign="top">The programming language the script is written in.
  2826. Must be a supported BSF language</td>
  2827. <td valign="top" align="center">No</td>
  2828. </tr>
  2829. <tr>
  2830. <td valign="top">src</td>
  2831. <td valign="top">The location of the script as a file, if not inline</td>
  2832. <td valign="top" align="center">No</td>
  2833. </tr>
  2834. </table>
  2835. <h3>Examples</h3>
  2836. <blockquote>
  2837. <p>None yet available</p>
  2838. </blockquote>
  2839. </body>
  2840. </html>