Update of /cvsroot/tm4j/tm4j/lib/ant/apache-ant-1.7.0/docs/manual/CoreTasks In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv12860/lib/ant/apache-ant-1.7.0/docs/manual/CoreTasks Added Files: ant.html antcall.html antstructure.html apply.html apt.html available.html basename.html buildnumber.html changelog.html checksum.html chmod.html common.html concat.html condition.html conditions.html copy.html copydir.html copyfile.html cvs.html cvspass.html cvstagdiff.html cvsversion.html defaultexcludes.html delete.html deltree.html dependset.html diagnostics.html dirname.html ear.html echo.html echoxml.html exec.html fail.html filter.html fixcrlf.html genkey.html get.html gunzip.html gzip.html import.html input.html jar.html java.html javac.html javadoc.html length.html loadfile.html loadproperties.html loadresource.html macrodef.html mail.html makeurl.html manifest.html manifestclasspath.html mkdir.html move.html nice.html pack.html parallel.html patch.html pathconvert.html presetdef.html property.html recorder.html rename.html replace.html resourcecount.html rmic.html sequential.html signjar.html sleep.html sql.html style.html subant.html sync.html tar.html taskdef.html tempfile.html touch.html tstamp.html typedef.html unpack.html untar.html unzip.html uptodate.html waitfor.html war.html whichresource.html xmlproperty.html zip.html Log Message: Update 4 years old ant. --- NEW FILE: unzip.html --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> <title>Unzip Task</title> </head> <body> <h2><a name="unzip">Unjar/Untar/Unwar/Unzip</a></h2> <h3>Description</h3> <p>Unzips a zip-, war-, or jar file.</p> <p><a href="../CoreTypes/patternset.html">PatternSet</a>s are used to select files to extract <I>from</I> the archive. If no patternset is used, all files are extracted. </p> <p><a href="../CoreTypes/resources.html#collection">Resource Collection</a>s may be used to select archived files to perform unarchival upon. Only file system based resource collections are supported by Unjar/Unwar/Unzip, this includes <a href="../CoreTypes/fileset.html">fileset</a>, <a href="../CoreTypes/filelist.html">filelist</a>, <a href="../using.html#path">path</a>, and <a href="../CoreTypes/resources.html#files">files</a>. Untar supports arbitrary resource collections. Prior to Ant 1.7 only fileset has been supported as a nested element.</p> <p>You can define filename transformations by using a nested <a href="../CoreTypes/mapper.html">mapper</a> element. The default mapper is the <a href="../CoreTypes/mapper.html#identity-mapper">identity mapper</a>. </p> <p>File permissions will not be restored on extracted files.</p> <p>The untar task recognizes the long pathname entries used by GNU tar.<p> <h3>Parameters</h3> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">src</td> <td valign="top">archive file to expand.</td> <td align="center" valign="top">Yes, if filesets are not used.</td> </tr> <tr> <td valign="top">dest</td> <td valign="top">directory where to store the expanded files.</td> <td align="center" valign="top">Yes</td> </tr> <tr> <td valign="top">overwrite</td> <td valign="top">Overwrite files, even if they are newer than the corresponding entries in the archive (true or false, default is true).</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">compression</td> <td valign="top"><b>Note:</b> This attribute is only available for the <code>untar</code> task.<br> compression method. Allowable values are "none", "gzip" and "bzip2". Default is "none".</td> <td valign="top" align="center">No</td> </tr> <tr> <td valign="top">encoding</td> <td valign="top"><b>Note:</b> This attribute is not available for the <code>untar</code> task.<br> The character encoding that has been used for filenames inside the zip file. For a list of possible values see <a href="http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html">http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html</a>.<br> Defaults to "UTF8", use the magic value <code>native-encoding</code> for the platform's default character encoding.</td> <td align="center" valign="top">No</td> </tr> </table> <h3>Examples</h3> <pre> <unzip src="${tomcat_src}/tools-src.zip" dest="${tools.home}"/> </pre> <p> <pre> <gunzip src="tools.tar.gz"/> <untar src="tools.tar" dest="${tools.home}"/> </pre> <pre> <unzip src="${tomcat_src}/tools-src.zip" dest="${tools.home}"> <patternset> <include name="**/*.java"/> <exclude name="**/Test*.java"/> </patternset> </unzip> </pre> <p> <pre> <unzip dest="${tools.home}"> <patternset> <include name="**/*.java"/> <exclude name="**/Test*.java"/> </patternset> <fileset dir="."> <include name="**/*.zip"/> <exclude name="**/tmp*.zip"/> </fileset> </unzip> </pre> <p> <pre> <unzip src="apache-ant-bin.zip" dest="${tools.home}"> <patternset> <include name="apache-ant/lib/ant.jar"/> </patternset> <mapper type="flatten"/> </unzip> </pre> <h3>Related tasks</h3> <pre> <unzip src="some-archive" dest="some-dir"> <patternset> <include name="some-pattern"/> </patternset> <mapper type="some-mapper"/> </unzip> </pre> is identical to <pre> <copy todir="some-dir" preservelastmodified="true"> <zipfileset src="some-archive"> <patternset> <include name="some-pattern"/> </patternset> </zipfileset> <mapper type="some-mapper"/> </copy> </pre> <p>The same is also true for <code><untar></code> and <code><tarfileset></code>. <code><copy></code> offers additional features like <a href="../CoreTypes/filterchain.html">filtering files</a> on the fly, allowing a file to be mapped to multiple destinations or a configurable file system timestamp granularity.</p> <pre><zip destfile="new.jar"> <zipfileset src="old.jar"> <exclude name="do/not/include/this/class"/> </zipfileset> </zip> </pre> <p>"Deletes" files from a zipfile.</p> </body> </html> --- NEW FILE: tempfile.html --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <title>Tempfile Task</title> </head> <body bgcolor="#ffffff" text="#000000" link="#525D76" alink="#525D76" vlink="#525D76"> <table border="0" width="100%" cellspacing="4"> <!-- PAGE HEADER --> <tr> <td> <table border="0" width="100%"><tr> <td valign="bottom"> <font size="+3" face="arial,helvetica,sanserif"><strong>Tempfile Task</strong></font> <br><font face="arial,helvetica,sanserif">This task sets a property to the name of a temporary file.</font> </td> <td> <!-- PROJECT LOGO --> <a href="http://ant.apache.org/"> <img src="../../images/ant_logo_large.gif" align="right" alt="Apache Ant" border="0"> </a> </td> </tr></table> </td> </tr> <!-- START RIGHT SIDE MAIN BODY --> <tr> <td valign="top" align="left"> <!-- Applying task/long-description --> <!-- Start Description --> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td> </td></tr> <tr><td bgcolor="#525D76"> <font color="#ffffff" face="arial,helvetica.sanserif"> <a name="description"> <strong>Description</strong></a></font> </td></tr> <tr><td><blockquote> This task sets a property to the name of a temporary file. Unlike <code>java.io.File.createTempFile</code>, this task does not actually create the temporary file, but it does guarantee that the file did not exist when the task was executed. <p>Examples: <pre><tempfile property="temp.file"/></pre> create a temporary file <pre><tempfile property="temp.file" suffix=".xml"/></pre> create a temporary file with the <code>.xml</code> suffix <pre><tempfile property="temp.file" destDir="build"/></pre> create a temporary file in the <code>build</code> subdirectory </blockquote></td></tr> </table> <!-- End Description --> <!-- Ignore --> <!-- Start Attributes --> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td> </td></tr> <tr><td bgcolor="#525D76"> <font color="#ffffff" face="arial,helvetica.sanserif"> <a name="attributes"> <strong>Parameters</strong></a></font> </td></tr> <tr><td><blockquote> <table> <tr> <td bgcolor="#cccccc" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Attribute</b></font> </td> <td bgcolor="#cccccc" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Description</b></font> </td> <td bgcolor="#cccccc" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Type</b></font> </td> <td bgcolor="#cccccc" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Requirement</b></font> </td> </tr> <!-- Attribute Group --> <!-- Attribute --> <tr> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">property</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">Sets the property you wish to assign the temporary file to.</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font> </td> <td bgcolor="#eeeeee" valign="top" align="left" rowspan="1"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">Required</font> </td> </tr> <!-- Attribute Group --> <!-- Attribute --> <tr> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">destdir</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">Sets the destination directory. If not set, the basedir directory is used instead.</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">File</font> </td> <td bgcolor="#eeeeee" valign="top" align="left" rowspan="4"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">Optional</font> </td> </tr> <!-- Attribute --> <tr> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">prefix</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">Sets the optional prefix string for the temp file.</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font> </td> </tr> <!-- Attribute --> <tr> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">suffix</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">Sets the optional suffix string for the temp file.</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font> </td> </tr> <!-- Attribute --> <tr> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">deleteonexit</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">Whether the temp file will be marked for deletion on normal exit of the Java Virtual Machine (even though the file may never be created); default <em>false</em>. <strong>Since Ant 1.7</strong></font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font> </td> </tr> </table> </blockquote></td></tr> </table> <!-- End Attributes --> <!-- Start Elements --> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td> </td></tr> <tr><td bgcolor="#525D76"> <font color="#ffffff" face="arial,helvetica.sanserif"> <a name="elements"> <strong>Parameters as nested elements</strong></a></font> </td></tr> <tr><td><blockquote> </blockquote></td></tr> </table> <!-- End Elements --> </td> </tr> <!-- END RIGHT SIDE MAIN BODY --> </table> </body> </html> --- NEW FILE: antcall.html --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> <title>AntCall Task</title> </head> <body> <h2><a name="antcall">AntCall</a></h2> <h3>Description</h3> <p>Call another target within the same buildfile optionally specifying some properties (params in this context). <strong>This task must not be used outside of a <code>target</code>.</strong></p> <p>By default, all of the properties of the current project will be available in the new project. Alternatively, you can set the <i>inheritAll</i> attribute to <code>false</code> and only "user" properties (i.e., those passed on the command-line) will be passed to the new project. In either case, the set of properties passed to the new project will override the properties that are set in the new project (See also the <a href="property.html">property task</a>).</p> <p>You can also set properties in the new project from the old project by using nested param tags. These properties are always passed to the new project and any project created in that project regardless of the setting of <i>inheritAll</i>. This allows you to parameterize your subprojects. Properties defined on the command line can not be overridden by nested <code><param></code> elements.</p> <p>Nested <a href="#reference"><i><code><reference></code>;</i></a> elements can be used to copy references from the calling project to the new project, optionally under a different id. References taken from nested elements will override existing references that have been defined outside of targets in the new project - but not those defined inside of targets.</p> <p> When a target is invoked by antcall, all of its dependent targets will also be called within the context of any new parameters. For example. if the target "doSomethingElse" depended on the target "init", then the <i>antcall</i> of "doSomethingElse" will call "init" during the call. Of course, any properties defined in the antcall task or inherited from the calling target will be fixed and not overridable in the init task--or indeed in the "doSomethingElse" task. </p> <p>If the build file changes after you've started the build, the behavior of this task is undefined.</p> <h3>Parameters</h3> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">target</td> <td valign="top">The target to execute.</td> <td valign="top" align="center">Yes</td> </tr> <tr> <td valign="top">inheritAll</td> <td valign="top">If <code>true</code>, pass all properties to the new Ant project. Defaults to <code>true</code>. </td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">inheritRefs</td> <td valign="top">If <code>true</code>, pass all references to the new Ant project. Defaults to <code>false</code>.</td> <td align="center" valign="top">No</td> </tr> </table> <h3>Note on <code>inheritRefs</code></h3> <p><code><antcall></code> will not override existing references, even if you set <code>inheritRefs</code> to true. As the called build files is the same build file as the calling one, this means it will not override any reference set via an <code>id</code> attribute at all. The only references that can be inherited by the child project are those defined by nested <code><reference></code> elements or references defined by tasks directly (not using the <code>id</code> attribute).</p> <h3>Parameters specified as nested elements</h3> <h4>param</h4> <p>Specifies the properties to set before running the specified target. See <a href="property.html">property</a> for usage guidelines.<br> These properties become equivalent to properties you define on the command line. These are special properties and they will always get passed down, even through additional <code><*ant*></code> tasks with inheritall set to false (see above). </p> <h4><a name="reference">reference</a></h4> <p>Used to choose references that shall be copied into the new project, optionally changing their id.</p> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">refid</td> <td valign="top">The id of the reference in the calling project.</td> <td valign="top" align="center">Yes</td> </tr> <tr> <td valign="top">torefid</td> <td valign="top">The id of the reference in the new project.</td> <td valign="top" align="center">No, defaults to the value of refid.</td> </tr> </table> <h4>propertyset</h4> <p>You can specify a set of properties to be copied into the new project with <a href="../CoreTypes/propertyset.html">propertyset</a>s.</p> <p><em>since Ant 1.6</em>.</p> <h4>target</h4> <p>You can specify multiple targets using nested <code><target></code> elements instead of using the target attribute. These will be executed as if Ant had been invoked with a single target whose dependencies are the targets so specified, in the order specified.</p> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">name</td> <td valign="top">The name of the called target.</td> <td valign="top" align="center">Yes</td> </tr> </table> <p><em>since Ant 1.6.3</em>.</p> <h3>Examples</h3> <blockquote><pre> <target name="default"> <antcall target="doSomethingElse"> <param name="param1" value="value"/> </antcall> </target> <target name="doSomethingElse"> <echo message="param1=${param1}"/> </target> </pre></blockquote> <p>Will run the target 'doSomethingElse' and echo 'param1=value'.</p> <blockquote><pre> <antcall ... > <reference refid="path1" torefid="path2"/> </antcall> </pre></blockquote> <p>will copy the parent's definition of <code>path1</code> into the new project using the id <code>path2</code>.</p> </body> </html> --- NEW FILE: replace.html --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> <title>Replace Task</title> </head> <body> <h2><a name="replace">Replace</a></h2> <h3>Description</h3> <p>Replace is a directory based task for replacing the occurrence of a given string with another string in selected file.</p> <p>If you want to replace a text that crosses line boundaries, you must use a nested <code><replacetoken></code> element.</p> <p>The output file is only written if it differs from the existing file. This prevents spurious rebuilds based on unchanged files which have been regenerated by this task.</p> <h3>Parameters</h3> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">file</td> <td valign="top">file for which the token should be replaced.</td> <td align="center" rowspan="2">Exactly one of the two.</td> </tr> <tr> <td valign="top">dir</td> <td valign="top">The base directory to use when replacing a token in multiple files.</td> </tr> <tr> <td valign="top">encoding</td> <td valign="top">The encoding of the files upon which replace operates.</td> <td align="center">No - defaults to default JVM encoding</td> </tr> <tr> <td valign="top">token</td> <td valign="top">the token which must be replaced.</td> <td valign="top" align="center">Yes, unless a nested <code>replacetoken</code> element or the replacefilterfile attribute is used.</td> </tr> <tr> <td valign="top">value</td> <td valign="top">the new value for the token. When omitted, an empty string ("") is used.</td> <td valign="top" align="center">No</td> </tr> <tr> <td valign="top">summary</td> <td valign="top">Indicates whether a summary of the replace operation should be produced, detailing how many token occurrences and files were processed </td> <td valign="top" align="center">No, by default no summary is produced</td> </tr> <tr> <td valign="top">propertyFile</td> <td valign="top">valid property file from which properties specified using nested <code><replacefilter></code> elements are drawn.</td> <td valign="top" align="center">Yes only if <i>property</i> attribute of <code><replacefilter></code> is used.</td> </tr> <tr> <td valign="top">replacefilterfile</td> <td valign="top">valid property file. Each property will be treated as a replacefilter where <code>token</code> is the name of the property and <code>value</code> is the properties value. <td valign="top" align="center">No.</td> </tr> <tr> <td valign="top">includes</td> <td valign="top">comma- or space-separated list of patterns of files that must be included. All files are included when omitted.</td> <td valign="top" align="center">No</td> </tr> <tr> <td valign="top">includesfile</td> <td valign="top">the name of a file. Each line of this file is taken to be an include pattern</td> <td valign="top" align="center">No</td> </tr> <tr> <td valign="top">excludes</td> <td valign="top">comma- or space-separated list of patterns of files that must be excluded. No files (except default excludes) are excluded when omitted.</td> <td valign="top" align="center">No</td> </tr> <tr> <td valign="top">excludesfile</td> <td valign="top">the name of a file. Each line of this file is taken to be an exclude pattern</td> <td valign="top" align="center">No</td> </tr> <tr> <td valign="top">defaultexcludes</td> <td valign="top">indicates whether default excludes should be used or not ("yes"/"no"). Default excludes are used when omitted.</td> <td valign="top" align="center">No</td> </tr> </table> <h3>Examples</h3> <pre> <replace file="${src}/index.html" token="@@@" value="wombat"/></pre> <p>replaces occurrences of the string "@@@" with the string "wombat", in the file <code>${src}/index.html</code>.</p> <h3>Parameters specified as nested elements</h3> <p>This task forms an implicit <a href="../CoreTypes/fileset.html">FileSet</a> and supports all attributes of <code><fileset></code> as well as the nested <code><include></code>, <code><exclude></code> and <code><patternset></code> elements.</p> <p>If either the text you want to replace or the replacement text cross line boundaries, you can use nested elements to specify them.</p> <h3>Examples</h3> <blockquote><pre> <replace dir="${src}" value="wombat"> <include name="**/*.html"/> <replacetoken><![CDATA[multi line token]]></replacetoken> </replace> </pre></blockquote> <p>replaces occurrences of the string "multi line<i>\n</i>token" with the string "wombat", in all HTML files in the directory <code>${src}</code>.Where <i>\n</i> is the platform specific line separator.</p> <blockquote><pre> <replace file="${src}/index.html"> <replacetoken><![CDATA[two line token]]></replacetoken> <replacevalue><![CDATA[two line token]]></replacevalue> </replace> </pre></blockquote> <h4>replacefilter</h4> <p>In addition to allowing for multiple replacements, optional nested <code><replacefilter></code> elements allow replacement values to be extracted from a property file. The name of this file is specified using the <code><replace></code> attribute <i>propertyFile</i>. </p> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">token</td> <td valign="top">The string to search for.</td> <td align="center" valign="top">Yes</td> </tr> <tr> <td valign="top">value</td> <td valign="top">The replacement string.</td> <td align="center" rowspan="2">Either may be specified, but not both. Both can be omitted, if desired.</td> </tr> <tr> <td valign="top">property</td> <td valign="top">Name of the property whose value is to serve as the replacement value.</td> </tr> </table> <p>If neither <i>value</i> nor <i>property</i> is used, the value provided using the <code><replace></code> attribute <i>value</i> and/or the <code><replacevalue></code> element is used. If no value was specified using either of these options, the token is replaced with an empty string. </p> <h3>Examples</h3> <blockquote><pre> <replace file="configure.sh" value="defaultvalue" propertyFile="source/name.properties"> <replacefilter token="@token1@"/> <replacefilter token="@token2@" value="value2"/> <replacefilter token="@token3@" property="property.key"/> </replace> </pre></blockquote> <p>In file <code>configure.sh</code>, replace all instances of "@token1@" with "defaultvalue", all instances of "@token2@" with "value2", and all instances of "@token3@" with the value of the property "property.key", as it appears in property file <code>src/name.properties</code>.</p> <p><b>Note:</b> It is possible to use either the <i>token</i>/<code><replacetoken></code> and <i>value</i>/<code><replacevalue></code> attributes/elements, the nested replacefilter elements, or both in the same operation. </p> </body> </html> --- NEW FILE: defaultexcludes.html --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> <title>DefaultExcludes Task</title> </head> <body> <h2><a name="echo">DefaultExcludes</a></h2> <p><em>since Ant 1.6</em></p> <h3>Description</h3> <p>Alters the default excludes for all subsequent processing in the build, and prints out the current default excludes if desired. <h3>Parameters</h3> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">echo</td> <td valign="top">whether or not to print out the default excludes.(defaults to false)</td> <td valign="top" align="center">attribute "true" required if no other attribute specified</td> </tr> <tr> <td valign="top">default</td> <td valign="top">go back to hard wired default excludes</td> <td valign="top" align="center">attribute "true" required if no if no other attribute is specified</td> </tr> <tr> <td valign="top">add</td> <td valign="top">the pattern to add to the default excludes</td> <td valign="top" align="center">if no other attribute is specified</td> </tr> <tr> <td valign="top">remove</td> <td valign="top">remove the specified pattern from the default excludes</td> <td valign="top" align="center">if no other attribute is specified</td> </tr> </table> <h3>Examples</h3> <p>Print out the default excludes</p> <pre> <defaultexcludes echo="true"/></pre> <p>Print out the default excludes and exclude all *.bak files in <strong>all</strong> further processing</p> <pre> <defaultexcludes echo="true" add="**/*.bak"/></pre> <p>Silently allow several fileset based tasks to operate on emacs backup files and then restore normal behavior</p> <pre> <defaultexcludes remove="**/*~"/> (do several fileset based tasks here) <defaultexcludes default="true"/> </pre> <h3>Notes</h3> By default the pattern <tt>**/.svn</tt> and <tt>**/.svn/**</tt> are set as default excludes. With version 1.3 Subversion supports the <a target="_blank" href="http://subversion.tigris.org/svn_1.3_releasenotes.html">"_svn hack"</a>. That means, that the svn-libraries evaluate environment variables and use <i>.svn</i> or <i>_svn</i> directory regarding to that value. We had chosen not to evaluate environment variables to get a more reliable build. Instead you have to change the settings by yourself by changing the exclude patterns: <pre> <defaultexcludes remove="**/.svn"/> <defaultexcludes remove="**/.svn/**"/> <defaultexcludes add="**/_svn"/> <defaultexcludes add="**/_svn/**"/> </pre> </body> </html> --- NEW FILE: cvsversion.html --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> <title>CVSVersion Task</title> <link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css"> </head> <body> <h2><a name="cvs">CvsVersion</a></h2> <h3>Description</h3> <p> This task allows to retrieve a CVS client and server version. <i>Since Ant 1.6.1.</i> </p> <h3>Parameters</h3> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td colspan="3">Attributes from parent Cvs task which are meaningful here</td> </tr> <tr> <td valign="top">cvsRoot</td> <td valign="top">the <code>CVSROOT</code> variable.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">cvsRsh</td> <td valign="top">the <code>CVS_RSH</code> variable.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">dest</td> <td valign="top">directory containing the checked out version of the project</td> <td align="center" valign="top">No, default is project's basedir.</td> </tr> <tr> <td valign="top">package</td> <td valign="top">the package/module to check out.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">port</td> <td valign="top">Port used by CVS to communicate with the server.</td> <td align="center" valign="top">No, default port 2401.</td> </tr> <tr> <td valign="top">passfile</td> <td valign="top">Password file to read passwords from.</td> <td align="center" valign="top">No, default file ~/.cvspass.</td> </tr> <tr> <td valign="top">failonerror</td> <td valign="top">Stop the build process if the command exits with a return code other than <code>0</code>. Defaults to false</td> <td align="center" valign="top">No</td> </tr> <tr> <td colspan="3">Specific attributes</td> </tr> <tr> <td valign="top">clientversionproperty</td> <td valign="top">Name of a property where the cvsclient version should be stored</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">serverversionproperty</td> <td valign="top">Name of a property where the cvs server version should be stored</td> <td align="center" valign="top">No</td> </tr> </table> <h3>Examples</h3> <pre> <cvsversion cvsRoot=":pserver:an...@cv...:/home/cvspublic" passfile="/home/myself/.cvspass" serverversionproperty="apachecvsversion" clientversionproperty="localcvsversion" /></pre> <p>finds out the cvs client and server versions and stores the versions in the properties called apachecvsversion and localcvsversion</p> </body> </html> --- NEW FILE: subant.html --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <title>Subant Task</title> </head> <body bgcolor="#ffffff" text="#000000" link="#525D76" alink="#525D76" vlink="#525D76"> <table border="0" width="100%" cellspacing="4"> <!-- PAGE HEADER --> <tr> <td> <table border="0" width="100%"><tr> <td valign="bottom"> <font size="+3" face="arial,helvetica,sanserif"><strong>Subant Task</strong></font> <br><font face="arial,helvetica,sanserif">Calls a given target for all defined sub-builds.</font> </td> <td> <!-- PROJECT LOGO --> <a href="http://ant.apache.org/"> <img src="../../images/ant_logo_large.gif" align="right" alt="Apache Ant" border="0"> </a> </td> </tr></table> </td> </tr> <!-- START RIGHT SIDE MAIN BODY --> <tr> <td valign="top" align="left"> <!-- Applying task/description --> <!-- Start Description --> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td> </td></tr> <tr><td bgcolor="#525D76"> <font color="#ffffff" face="arial,helvetica.sanserif"> <a name="description"> <strong>Description</strong></a></font> </td></tr> <tr><td><blockquote> <p> Calls a given target for all defined sub-builds. This is an extension of ant for bulk project execution. <strong>This task must not be used outside of a <code>target</code> if it invokes the same build file it is part of.</strong> </p> <p><em>Since Ant 1.6</em></p> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <!-- Subsection heading --> <tr><td bgcolor="#828DA6"> <font color="#ffffff" face="arial,helvetica.sanserif"> <a name="Use with directories"> <strong>Use with directories</strong></a></font> </td></tr> <!-- Subsection body --> <tr><td> <p> subant can be used with directory sets to execute a build from different directories. 2 different options are offered : </p> <ul> <li> to run the same build file <code>/somepath/otherpath/mybuild.xml</code> with different base directories, use the genericantfile attribute </li> <li>if you want to run <code>directory1/mybuild.xml</code>, <code>directory2/mybuild.xml</code>, <code>....</code>, use the antfile attribute. The subant task does not set the base directory for you in this case, because you can specify it in each build file. </li> </ul> </td></tr> </table> </blockquote></td></tr> </table> <!-- End Description --> <!-- Ignore --> <!-- Start Attributes --> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td> </td></tr> <tr><td bgcolor="#525D76"> <font color="#ffffff" face="arial,helvetica.sanserif"> <a name="attributes"> <strong>Parameters</strong></a></font> </td></tr> <tr><td><blockquote> <table> <tr> <td bgcolor="#cccccc" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Attribute</b></font> </td> <td bgcolor="#cccccc" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Description</b></font> </td> <td bgcolor="#cccccc" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Type</b></font> </td> <td bgcolor="#cccccc" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Requirement</b></font> </td> </tr> <!-- Attribute Group --> <!-- Attribute Group --> <!-- Attribute --> <tr> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">antfile</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">Build file name, to use in conjunction with directories.<br> Defaults to "build.xml".<br> If <code>genericantfile</code> is set, this attribute is ignored.</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font> </td> <td bgcolor="#eeeeee" valign="top" align="left" rowspan="10"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">Optional</font> </td> </tr> <!-- Attribute --> <tr> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">buildpath</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">Set the buildpath to be used to find sub-projects.</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">Path</font> </td> </tr> <!-- Attribute --> <tr> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">buildpathref</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">Buildpath to use, by reference.</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">Reference</font> </td> </tr> <!-- Attribute --> <tr> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">failonerror</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">Sets whether to fail with a build exception on error, or go on.</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">boolean</font> </td> </tr> <!-- Attribute --> <tr> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">genericantfile</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">Build file path, to use in conjunction with directories.<br> Use <code>genericantfile</code>, in order to run the same build file with different basedirs.<br> If this attribute is set, <code>antfile</code> is ignored.</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">File</font> </td> </tr> <!-- Attribute --> <tr> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">inheritall</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">Corresponds to <code><ant></code>'s <code>inheritall</code> attribute but defaults to false in this task..</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">boolean</font> </td> </tr> <!-- Attribute --> <tr> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">inheritrefs</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">Corresponds to <code><ant></code>'s <code>inheritrefs</code> attribute.</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">boolean</font> </td> </tr> <!-- Attribute --> <tr> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">output</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">Corresponds to <code><ant></code>'s <code>output</code> attribute.</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font> </td> </tr> <!-- Attribute --> <tr> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">target</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif"></font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font> </td> </tr> <!-- Attribute --> <tr> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">verbose</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif"> Enable/ disable log messages showing when each sub-build path is entered/ exited. The default value is false.</font> </td> <td bgcolor="#eeeeee" valign="top" align="left"> <font color="#000000" size="-1" face="arial,helvetica,sanserif">boolean</font> </td> </tr> </table> </blockquote></td></tr> </table> <!-- End Attributes --> <!-- Start Elements --> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td> </td></tr> <tr><td bgcolor="#525D76"> <font color="#ffffff" face="arial,helvetica.sanserif"> <a name="elements"> <strong>Parameters as nested elements</strong></a></font> </td></tr> <tr><td><blockquote> <!-- Start Element --> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td> </td></tr> <tr><td bgcolor="#828DA6"> <font color="#ffffff" face="arial,helvetica.sanserif" size="-1"> <strong>any filesystem based <a href="../CoreTypes/resources.html#collection">resource collection</a></strong></font> </td></tr> <tr><td><blockquote> This includes <code><fileset></code>, <code><dirset></code> and <code><filelist></code> which are the nested resource collections supported prior to Ant 1.7. <!-- Ignore --> <!-- Ignore --> </blockquote></td></tr> </table> <!-- End Element --> <!-- Start Element --> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td> </td></tr> <tr><td bgcolor="#828DA6"> <font color="#ffffff" face="arial,helvetica.sanserif" size="-1"> <strong>dirset</strong> (org.apache.tools.ant.types.DirSet)</font> </td></tr> <tr><td><blockquote> Adds a directory set to the implicit build path. <p> <em>Note that the directories will be added to the build path in no particular order, so if order is significant, one should use a file list instead!</em> <!-- Ignore --> <!-- Ignore --> </blockquote></td></tr> </table> <!-- End Element --> <!-- Start Element --> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td> </td></tr> <tr><td bgcolor="#828DA6"> <font color="#ffffff" face="arial,helvetica.sanserif" size="-1"> <strong>filelist</strong> (org.apache.tools.ant.types.FileList)</font> </td></tr> <tr><td><blockquote> Adds an ordered file list to the implicit build path. <p> <em>Note that contrary to file and directory sets, file lists can reference non-existent files or directories!</em> <!-- Ignore --> <!-- Ignore --> </blockquote></td></tr> </table> <!-- End Element --> <!-- Start Element --> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td> </td></tr> <tr><td bgcolor="#828DA6"> <font color="#ffffff" face="arial,helvetica.sanserif" size="-1"> <strong>fileset</strong> (org.apache.tools.ant.types.FileSet)</font> </td></tr> <tr><td><blockquote> Adds a file set to the implicit build path. <p> <em>Note that the directories will be added to the build path in no particular order, so if order is significant, one should use a file list instead!</em> <!-- Ignore --> <!-- Ignore --> </blockquote></td></tr> </table> <!-- End Element --> <!-- Start Element --> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td> </td></tr> <tr><td bgcolor="#828DA6"> <font color="#ffffff" face="arial,helvetica.sanserif" size="-1"> <strong>property</strong> (org.apache.tools.ant.taskdefs.Property)</font> </td></tr> <tr><td><blockquote> Corresponds to <code><ant></code>'s nested <code><property></code> element. <!-- Ignore --> <!-- Ignore --> </blockquote></td></tr> </table> <!-- End Element --> <!-- Start Element --> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td> </td></tr> <tr><td bgcolor="#828DA6"> <font color="#ffffff" face="arial,helvetica.sanserif" size="-1"> <strong>propertyset</strong> (org.apache.tools.ant.types.PropertySet)</font> </td></tr> <tr><td><blockquote> Corresponds to <code><ant></code>'s nested <code><propertyset></code> element. <!-- Ignore --> <!-- Ignore --> </blockquote></td></tr> </table> <!-- End Element --> <!-- Start Element --> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td> </td></tr> <tr><td bgcolor="#828DA6"> <font color="#ffffff" face="arial,helvetica.sanserif" size="-1"> <strong>buildpath</strong> (org.apache.tools.ant.types.Path)</font> </td></tr> <tr><td><blockquote> Creates a nested build path, and add it to the implicit build path. <!-- Ignore --> <!-- Ignore --> </blockquote></td></tr> </table> <!-- End Element --> <!-- Start Element --> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td> </td></tr> <tr><td bgcolor="#828DA6"> <font color="#ffffff" face="arial,helvetica.sanserif" size="-1"> <strong>buildpathelement</strong> (org.apache.tools.ant.types.Path.PathElement)</font> </td></tr> <tr><td><blockquote> Creates a nested <code><buildpathelement></code>, and add it to the implicit build path. <!-- Ignore --> <!-- Ignore --> </blockquote></td></tr> </table> <!-- End Element --> <!-- manually written --> <!-- Start Element --> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td> </td></tr> <tr><td bgcolor="#828DA6"> <font color="#ffffff" face="arial,helvetica.sanserif" size="-1"> <strong>target</strong> (org.apache.tools.ant.taskdefs.Ant.TargetElement)</font> </td></tr> <tr><td><blockquote> You can specify multiple targets using nested <code><target></code> elements instead of using the target attribute. These will be executed as if Ant had been invoked with a single target whose dependencies are the targets so specified, in the order specified. <!-- Ignore --> <!-- Ignore --> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">name</td> <td valign="top">The name of the called target.</td> <td valign="top" align="center">Yes</td> </tr> </table> <p><em>since Ant 1.7</em>.</p> </blockquote></td></tr> </table> <!-- End Element --> <!-- manually written end --> </blockquote></td></tr> </table> <!-- End Elements --> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td> </td></tr> <tr><td bgcolor="#525D76"> <font color="#ffffff" face="arial,helvetica.sanserif"> <a name="examples"> <strong>Examples</strong></a></font> </td></tr> <tr><td><blockquote style=""> <pre> <project name="subant" default="subant1"> <property name="build.dir" value="subant.build"/> <target name="subant1"> <subant target=""> <property name="build.dir" value="subant1.build"/> <property name="not.overloaded" value="not.overloaded"/> <fileset dir="." includes="*/build.xml"/> </subant> </target> </project> </pre> <p> this snippet build file will run ant in each subdirectory of the project directory, where a file called build.xml can be found. The property build.dir will have the value subant1.build in the ant projects called by subant. </p> <pre> <subant target=""> <propertyset> <propertyref prefix="toplevel"/> <mapper type="glob" from="foo*" to="bar*"/> </propertyset> <fileset dir="." includes="*/build.xml"/> </subant> </pre> <p> this snippet build file will run ant in each subdirectory of the project directory, where a file called build.xml can be found. All properties whose name starts with "foo" are passed, their names are changed to start with "bar" instead </p> <pre> <subant target="compile" genericantfile="/opt/project/build1.xml"> <dirset dir="." includes="projects*"/> </subant> </pre> <p> assuming the subdirs of the project dir are called projects1, projects2, projects3 this snippet will execute the compile target of /opt/project/build1.xml, setting the basedir to projects1, projects2, projects3 </p> <!-- manually written --> <p>Now a little more complex - but useful - scenario. Assume that we have a directory structure like this:</p> <pre> root | common.xml | build.xml | +-- modules +-- modA | +-- src +-- modB +-- src <u><b>common.xml:</b></u><br> <project> <property name="src.dir" value="src"/> <property name="build.dir" value="build"/> <property name="classes.dir" value="build/classes"/> <target name="compile"> <mkdir dir="${classes.dir}"/> <javac srcdir="src" destdir="${classes.dir}"/> </target> ... [truncated message content] |