peterreilly 2003/08/14 05:48:10 Modified: docs/manual coretasklist.html Added: docs/manual/CoreTasks presetdef.html macrodef.html Log: adding doc for presetdef and macrodef Revision Changes Path 1.50 +2 -0 ant/docs/manual/coretasklist.html Index: coretasklist.html =================================================================== RCS file: /home/cvs/ant/docs/manual/coretasklist.html,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- coretasklist.html 9 Jul 2003 16:24:35 -0000 1.49 +++ coretasklist.html 14 Aug 2003 12:48:10 -0000 1.50 @@ -60,12 +60,14 @@ <a href="CoreTasks/loadfile.html">LoadFile</a><br> <a href="CoreTasks/loadproperties.html">LoadProperties</a><br> <a href="CoreTasks/mail.html">Mail</a><br> +<a href="CoreTasks/macrodef.html">MacroDef</a><br> <a href="CoreTasks/manifest.html">Manifest</a><br> <a href="CoreTasks/mkdir.html">Mkdir</a><br> <a href="CoreTasks/move.html">Move</a><br> <a href="CoreTasks/parallel.html">Parallel</a><br> <a href="CoreTasks/patch.html">Patch</a><br> <a href="CoreTasks/pathconvert.html">PathConvert</a><br> +<a href="CoreTasks/presetdef.html">PreSetDef</a><br> <a href="CoreTasks/property.html">Property</a><br> <a href="CoreTasks/recorder.html">Record</a><br> <a href="CoreTasks/rename.html"><i>Rename</i></a><br> 1.1 ant/docs/manual/CoreTasks/presetdef.html Index: presetdef.html =================================================================== <html> <head> <meta http-equiv="Content-Language" content="en-us"></meta> <title>PreSetDef Task</title> </head> <body> <h2><a name="presetdef">PreSetDef</a></h2> <h3>Description</h3> <p> The preset definition generates a new definition based on a current definition with some attributes or elements preset. </p> <p> Introduced in ant1.6 <font color="red">Experimental</font>. </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">name</td> <td valign="top">the name of the new definition</td> <td valign="top" align="center">Yes</td> </tr> <tr> <td valign="top">uri</td> <td valign="top"> The uri that this definition should live in. </td> <td valign="top" align="center">No</td> </tr> </table> <h3>Parameters specified as nested elements</h3> <h4>another type with attributes or elements set</h4> <p>The <presetdef> task takes one nested element as a parameter. This nested element can be any other type or task. The attributes and elements that need to be preset are placed here. </p> <h3>Examples</h3> <p> The following fragment defines a javac task with the debug and deprecation attributes set. It also has a src element to source files from a generated directory. </p> <blockquote> <pre> <presetdef name="my.javac"> <javac debug="${debug}" deprecation="${deprecation}"> <src path="${gen.dir}"/> </javac> </presetdef> </pre> </blockquote> <p> This can be used as a normal javac task - example: </p> <blockquote> <pre> <my.javac src="${src.dir}" destdir="${classes.dir}"/> </pre> </blockquote> <hr> <p align="center">Copyright © 2003 Apache Software Foundation. All rights Reserved.</p> </body> </html> 1.1 ant/docs/manual/CoreTasks/macrodef.html Index: macrodef.html =================================================================== <html> <head> <meta http-equiv="Content-Language" content="en-us"></meta> <title>MacroDef Task</title> </head> <body> <h2><a name="macrodef">MacroDef</a></h2> <h3>Description</h3> <p> This defines a new task using a <sequential> or <parallel> nested task as a template. Nested elements <param> and <element> are used to specify attributes and elements of the new task. These get substituted into the <sequential> or <parallel> task when the new task is run. </p> <p> Introduced in ant1.6 <font color="red">Experimental</font>. </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">name</td> <td valign="top">the name of the new definition</td> <td valign="top" align="center">Yes</td> </tr> <tr> <td valign="top">uri</td> <td valign="top"> The uri that this definition should live in. </td> <td valign="top" align="center">No</td> </tr> </table> <h3>Parameters specified as nested elements</h3> <h4>param</h4> <p> This is used to specify attributes of the new task. The values of the attributes get substituted into the templated task. The attributes will be required attributes unless a default value has been set. </p> <p> This attribute is placed in the body of the templated task using the ant property notation - ${attribute name}. Note that is not an actual ant property. </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">name</td> <td valign="top">the name of the new attribute</td> <td valign="top" align="center">Yes</td> </tr> <tr> <td valign="top">default</td> <td valign="top"> the default value of the attribute. </td> <td valign="top" align="center">No</td> </tr> </table> <h4>element</h4> <p> This is used to specify nested elements of the new task. The contents of the nested elements of the task instance are placed in the templated task at the tag name. </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">name</td> <td valign="top">the name of the new attribute</td> <td valign="top" align="center">Yes</td> </tr> <tr> <td valign="top">optional</td> <td valign="top"> if true this nested element is optional. Default is false - i.e the nested element is required in the new task. </td> <td valign="top" align="center">No</td> </tr> </table> <h3>Examples</h3> <p> The following example defined a task called testing and runs it. </p> <blockquote> <pre> <macrodef name="testing"> <param name="v" default="NOT SET"/> <element name="some-tasks" optional="yes"/> <sequential> <echo>v is ${v}</echo> <some-tasks/> </sequential> </macrodef> <testing v="This is v"> <some-tasks> <echo>this is a test</echo> </some-tasks> </testing> </pre> </blockquote> <p> The following fragment defines a task called <call-cc> which take the attributes "target", "link" and "target.dir" and the nested element "cc-elements". The body of the task uses the <cc> task from the <a href="http://ant-contrib.sourceforge.net/">ant-contrib</a> project. </p> <blockquote> <pre> <macrodef name="call-cc"> <param name="target"/> <param name="link"/> <param name="target.dir"/> <element name="cc-elements"/> <sequential> <mkdir dir="${obj.dir}/${target}"/> <mkdir dir="${target.dir}"/> <cc link="${link}" objdir="${obj.dir}/${target}" outfile="${target.dir}/${target}"> <compiler refid="compiler.options"/> <cc-elements/> </cc> </sequential> </macrodef> </pre> </blockquote> <p> This then can be used as follows: </p> <blockquote> <pre> <call-cc target="unittests" link="executable" target.dir="${build.bin.dir}"> <cc-elements> <includepath location="${gen.dir}"/> <includepath location="test"/> <fileset dir="test/unittest" includes = "**/*.cpp"/> <fileset dir="${gen.dir}" includes = "*.cpp"/> <linker refid="linker-libs"/> </cc-elements> </call-cc> </pre> </blockquote> <hr> <p align="center">Copyright © 2003 Apache Software Foundation. All rights Reserved.</p> </body> </html>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]