peterreilly 2005/03/08 10:17:41 Modified: docs/manual/CoreTasks ant.html antcall.html apt.html available.html basename.html buildnumber.html checksum.html chmod.html pack.html unpack.html Log: place examples in <blockquote> blocks Revision Changes Path 1.32 +40 -40 ant/docs/manual/CoreTasks/ant.html Index: ant.html =================================================================== RCS file: /home/cvs/ant/docs/manual/CoreTasks/ant.html,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- ant.html 7 Mar 2005 18:09:09 -0000 1.31 +++ ant.html 8 Mar 2005 18:17:40 -0000 1.32 @@ -198,72 +198,72 @@ </table> <h3>Examples</h3> -<pre> - <ant antfile="subproject/subbuild.xml" dir="subproject" target="compile"/> - - <ant dir="subproject"/> - - <ant antfile="subproject/property_based_subbuild.xml"> - <property name="param1" value="version 1.x"/> - <property file="config/subproject/default.properties"/> - </ant> - - <ant inheritAll="false" antfile="subproject/subbuild.xml"> - <property name="output.type" value="html"/> - </ant> -</pre> - +<blockquote><pre> +<ant antfile="subproject/subbuild.xml" + dir="subproject" target="compile"/> + +<ant dir="subproject"/> + +<ant antfile="subproject/property_based_subbuild.xml"> + <property name="param1" value="version 1.x"/> + <property file="config/subproject/default.properties"/> +</ant> + +<ant inheritAll="false" antfile="subproject/subbuild.xml"> + <property name="output.type" value="html"/> +</ant> +</pre></blockquote> <p>The build file of the calling project defines some <code><path></code> elements like this:</p> -<pre> - <path id="path1"> +<blockquote><pre> +<path id="path1"> ... - </path> - <path id="path2"> +</path> +<path id="path2"> ... - </path> -</pre> +</path> +</pre></blockquote> <p>and the called build file (<code>subbuild.xml</code>) also defines a <code><path></code> with the id <code>path1</code>, but <code>path2</code> is not defined:</p> -<pre> - <ant antfile="subbuild.xml" inheritrefs="true"/> -</pre> +<blockquote><pre> +<ant antfile="subbuild.xml" inheritrefs="true"/> +</pre></blockquote> <p>will not override <code>subbuild</code>'s definition of <code>path1</code>, but make the parent's definition of <code>path2</code> available in the subbuild.</p> -<pre> - <ant antfile="subbuild.xml"/> -</pre> +<blockquote><pre> +<ant antfile="subbuild.xml"/> +</pre></blockquote> <p>as well as</p> -<pre> - <ant antfile="subbuild.xml" inheritrefs="false"/> -</pre> +<blockquote><pre> +<ant antfile="subbuild.xml" inheritrefs="false"/> +</pre></blockquote> <p>will neither override <code>path1</code> nor copy <code>path2</code>.</p> -<pre> - <ant antfile="subbuild.xml" inheritrefs="false"> - <reference refid="path1"/> - </ant> -</pre> +<blockquote><pre> +<ant antfile="subbuild.xml" inheritrefs="false"> + <reference refid="path1"/> +</ant> +</pre></blockquote> <p>will override <code>subbuild</code>'s definition of <code>path1</code>.</p> -<pre> - <ant antfile="subbuild.xml" inheritrefs="false"> - <reference refid="path1" torefid="path2"/> - </ant> -</pre> +<blockquote><pre> +<ant antfile="subbuild.xml" inheritrefs="false"> + <reference refid="path1" torefid="path2"/> +</ant> +</pre></blockquote> <p>will copy the parent's definition of <code>path1</code> into the new project using the id <code>path2</code>.</p> 1.31 +16 -16 ant/docs/manual/CoreTasks/antcall.html Index: antcall.html =================================================================== RCS file: /home/cvs/ant/docs/manual/CoreTasks/antcall.html,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- antcall.html 7 Mar 2005 18:09:09 -0000 1.30 +++ antcall.html 8 Mar 2005 18:17:40 -0000 1.31 @@ -147,24 +147,24 @@ <p><em>since Ant 1.6.3</em>.</p> <h3>Examples</h3> -<pre> - <target name="default"> - <antcall target="doSomethingElse"> - <param name="param1" value="value"/> - </antcall> - </target> +<blockquote><pre> +<target name="default"> + <antcall target="doSomethingElse"> + <param name="param1" value="value"/> + </antcall> +</target> - <target name="doSomethingElse"> - <echo message="param1=${param1}"/> - </target> -</pre> +<target name="doSomethingElse"> + <echo message="param1=${param1}"/> +</target> +</pre></blockquote> <p>Will run the target 'doSomethingElse' and echo 'param1=value'.</p> -<pre> - <antcall ... > - <reference refid="path1" torefid="path2"/> - </antcall> -</pre> +<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> @@ -173,4 +173,4 @@ Reserved.</p> </body> -</html> \ No newline at end of file +</html> 1.8 +32 -29 ant/docs/manual/CoreTasks/apt.html Index: apt.html =================================================================== RCS file: /home/cvs/ant/docs/manual/CoreTasks/apt.html,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- apt.html 7 Mar 2005 18:09:09 -0000 1.7 +++ apt.html 8 Mar 2005 18:17:40 -0000 1.8 @@ -84,15 +84,17 @@ </tbody></table> <h3>Examples</h3> -<pre> <apt srcdir="${src}" - destdir="${build}" - classpath="xyz.jar" - debug="on" - compile="true" - factory="com.mycom.MyAnnotationProcessorFactory" - factorypathref="my.factorypath.id" - preprocessdir="${preprocess.dir}"> - </apt></pre> +<blockquote><pre> +<apt srcdir="${src}" + destdir="${build}" + classpath="xyz.jar" + debug="on" + compile="true" + factory="com.mycom.MyAnnotationProcessorFactory" + factorypathref="my.factorypath.id" + preprocessdir="${preprocess.dir}"> +</apt> +</pre></blockquote> <p>compiles all <code>.java</code> files under the <code>${src}</code> directory, and stores the <code>.class</code> files in the <code>${build}</code> directory. @@ -121,26 +123,27 @@ <code><javac></code> task to compile first your original source code, and then the generated source code:</p> -<pre> <apt srcdir="${src}" - destdir="${build}" - classpath="xyz.jar" - debug="true" - compile="false" - factory="com.mycom.MyAnnotationProcessorFactory" - factorypathref="my.factorypath.id" - preprocessdir="${preprocess.dir}"> - </apt> - - <javac srcdir="${src}" - destdir="${build}" - classpath="xyz.jar" - debug="on"/> - - <javac srcdir="${preprocess.dir}" - destdir="${build}" - classpath="xyz.jar" - debug="true"/> -</pre> +<blockquote><pre> +<apt srcdir="${src}" + destdir="${build}" + classpath="xyz.jar" + debug="true" + compile="false" + factory="com.mycom.MyAnnotationProcessorFactory" + factorypathref="my.factorypath.id" + preprocessdir="${preprocess.dir}"> +</apt> + +<javac srcdir="${src}" + destdir="${build}" + classpath="xyz.jar" + debug="on"/> + +<javac srcdir="${preprocess.dir}" + destdir="${build}" + classpath="xyz.jar" + debug="true"/> +</pre></blockquote> This may involve more build file coding, but the speedup gained from switching to jikes may justify the effort. 1.14 +15 -11 ant/docs/manual/CoreTasks/available.html Index: available.html =================================================================== RCS file: /home/cvs/ant/docs/manual/CoreTasks/available.html,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- available.html 7 Mar 2005 18:09:09 -0000 1.13 +++ available.html 8 Mar 2005 18:17:40 -0000 1.14 @@ -87,37 +87,41 @@ href="../using.html#path">path-like structure</a> and can also be set via a nested <code><filepath></code> element.</p> <h3>Examples</h3> -<pre> <available classname="org.whatever.Myclass" property="Myclass.present"/></pre> +<blockquote><pre> +<available classname="org.whatever.Myclass" property="Myclass.present"/> +</pre></blockquote> <p>sets the <code>Myclass.present</code> property to the value "true" if the class <code>org.whatever.Myclass</code> is found in Ant's classpath.</p> -<pre> +<blockquote><pre> <property name="jaxp.jar" value="./lib/jaxp11/jaxp.jar"/> <available file="${jaxp.jar}" property="jaxp.jar.present"/> -</pre> +</pre></blockquote> <p>sets the <code>jaxp.jar.present</code> property to the value "true" if the file <code>./lib/jaxp11/jaxp.jar</code> is found.</p> -<pre> -<available file="/usr/local/lib" type="dir" property="local.lib.present"/> -</pre> +<blockquote><pre> +<available file="/usr/local/lib" type="dir" + property="local.lib.present"/> +</pre></blockquote> <p>sets the <code>local.lib.present</code> property to the value "true" if the directory <code>/usr/local/lib</code> is found.</p> -<pre> +<blockquote><pre> ...in project ... <property name="jaxp.jar" value="./lib/jaxp11/jaxp.jar"/> <path id="jaxp" location="${jaxp.jar}"/> ...in target ... -<available classname="javax.xml.transform.Transformer" classpathref="jaxp" property="jaxp11.present"/> -</pre> +<available classname="javax.xml.transform.Transformer" + classpathref="jaxp" property="jaxp11.present"/> +</pre></blockquote> <p>sets the <code>jaxp11.present</code> property to the value "true" if the class <code>javax.xml.transform.Transformer</code> is found in the classpath referenced by <code>jaxp</code> (in this case, <code>./lib/jaxp11/jaxp.jar</code>). </p> -<pre> +<blockquote><pre> <available property="have.extras" resource="extratasks.properties"> <classpath> <pathelement location="/usr/local/ant/extra.jar/> </classpath> </available> -</pre> +</pre></blockquote> <p>sets the <code>have.extras</code> property to the value "true" if the resource-file <code>extratasks.properties</code> is found. </p> 1.6 +11 -4 ant/docs/manual/CoreTasks/basename.html Index: basename.html =================================================================== RCS file: /home/cvs/ant/docs/manual/CoreTasks/basename.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- basename.html 7 Mar 2005 18:09:09 -0000 1.5 +++ basename.html 8 Mar 2005 18:17:40 -0000 1.6 @@ -48,16 +48,23 @@ </table> <h3>Examples</h3> -<pre> <basename property="jar.filename" file="${lib.jarfile}"/></pre> +<blockquote><pre> +<basename property="jar.filename" file="${lib.jarfile}"/> +</pre></blockquote> will set <code>jar.filename</code> to <code>myjar.jar</code>, if <code>lib.jarfile</code> is defined as either a full-path filename (eg., <code>/usr/local/lib/myjar.jar</code>), a relative-path filename (eg., <code>lib/myjar.jar</code>), or a simple filename (eg., <code>myjar.jar</code>). -<pre> <basename property="cmdname" file="D:/usr/local/foo.exe" suffix=".exe"/></pre> +<blockquote><pre> +<basename property="cmdname" file="D:/usr/local/foo.exe" + suffix=".exe"/> +</pre></blockquote> will set <code>cmdname</code> to <code>foo</code>. -<pre> <property environment="env"/> - <basename property="temp.dirname" file="${env.TEMP}"/></pre> +<blockquote><pre> +<property environment="env"/> +<basename property="temp.dirname" file="${env.TEMP}"/> +</pre></blockquote> will set <code>temp.dirname</code> to the last directory element of the path defined for the <code>TEMP</code> environment variable.</p> 1.5 +6 -2 ant/docs/manual/CoreTasks/buildnumber.html Index: buildnumber.html =================================================================== RCS file: /home/cvs/ant/docs/manual/CoreTasks/buildnumber.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- buildnumber.html 7 Mar 2005 18:09:09 -0000 1.4 +++ buildnumber.html 8 Mar 2005 18:17:40 -0000 1.5 @@ -37,12 +37,16 @@ </table> <h3>Examples</h3> -<pre> <buildnumber/></pre> +<blockquote><pre> +<buildnumber/> +</pre></blockquote> <p>Read, increment, and write a build number to the default file, <code>build.number</code>.</p> -<pre> <buildnumber file="mybuild.number"/></pre> +<blockquote><pre> +<buildnumber file="mybuild.number"/> +</pre></blockquote> <p>Read, increment, and write a build number to the file <code>mybuild.number</code>.</p> 1.17 +11 -11 ant/docs/manual/CoreTasks/checksum.html Index: checksum.html =================================================================== RCS file: /home/cvs/ant/docs/manual/CoreTasks/checksum.html,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- checksum.html 7 Mar 2005 18:09:09 -0000 1.16 +++ checksum.html 8 Mar 2005 18:17:40 -0000 1.17 @@ -150,48 +150,48 @@ <h3>Examples</h3> <p><b>Example 1</b></p> -<pre><checksum file="foo.bar"/></pre> +<blockquote><pre><checksum file="foo.bar"/></pre></blockquote> Generates a MD5 checksum for foo.bar and stores the checksum in the destination file foo.bar.MD5. foo.bar.MD5 is overwritten only if foo.bar is newer than itself. <p><b>Example 2</b></p> -<pre><checksum file="foo.bar" forceOverwrite="yes"/></pre> +<blockquote><pre><checksum file="foo.bar" forceOverwrite="yes"/></pre></blockquote> Generates a MD5 checksum for foo.bar and stores the checksum in foo.bar.MD5. If foo.bar.MD5 already exists, it is overwritten. <p><b>Example 3</b></p> -<pre><checksum file="foo.bar" property="foobarMD5"/></pre> +<blockquote><pre><checksum file="foo.bar" property="foobarMD5"/></pre></blockquote> Generates a MD5 checksum for foo.bar and stores it in the Project Property foobarMD5. <p><b>Example 4</b></p> -<pre><checksum file="foo.bar" verifyProperty="isMD5ok"/></pre> +<blockquote><pre><checksum file="foo.bar" verifyProperty="isMD5ok"/></pre></blockquote> Generates a MD5 checksum for foo.bar, compares it against foo.bar.MD5 and sets isMD5ok to either true or false, depending upon the result. <p><b>Example 5</b></p> -<pre><checksum file="foo.bar" algorithm="SHA" fileext="asc"/></pre> +<blockquote><pre><checksum file="foo.bar" algorithm="SHA" fileext="asc"/></pre></blockquote> Generates a SHA checksum for foo.bar and stores the checksum in the destination file foo.bar.asc. foo.bar.asc is overwritten only if foo.bar is newer than itself. <p><b>Example 6</b></p> -<pre> +<blockquote><pre> <checksum file="foo.bar" property="${md5}" verifyProperty="isEqual"/> -</pre> +</pre></blockquote> Generates a MD5 checksum for foo.bar, compares it against the value of the property md5, and sets isEqual to either true or false, depending upon the result. <p><b>Example 7</b></p> -<pre> +<blockquote><pre> <checksum> <fileset dir="."> <include name="foo*"/> </fileset> </checksum> -</pre> +</pre></blockquote> Works just like Example 1, but generates a .MD5 file for every file that begins with the name foo. <p><b>Example 8</b></p> -<pre> +<blockquote><pre> <condition property="isChecksumEqual"> <checksum> <fileset dir="."> @@ -199,7 +199,7 @@ </fileset> </checksum> </condition> -</pre> +</pre></blockquote> Works like Example 4, but only sets isChecksumEqual to true, if the checksum matches - it will never be set to false. This example demonstrates use with the Condition task. 1.19 +1 -1 ant/docs/manual/CoreTasks/chmod.html Index: chmod.html =================================================================== RCS file: /home/cvs/ant/docs/manual/CoreTasks/chmod.html,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- chmod.html 7 Mar 2005 18:09:09 -0000 1.18 +++ chmod.html 8 Mar 2005 18:17:40 -0000 1.19 @@ -145,7 +145,7 @@ </dirset> </chmod> </pre> -</blockquote> +</blockquote>blockquote> <p>keeps non-owners from touching cgi scripts, files with a <code>.old</code> extension or directories beginning with <code>private_</code>. A directory 1.11 +6 -6 ant/docs/manual/CoreTasks/pack.html Index: pack.html =================================================================== RCS file: /home/cvs/ant/docs/manual/CoreTasks/pack.html,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- pack.html 7 Mar 2005 18:09:09 -0000 1.10 +++ pack.html 8 Mar 2005 18:17:40 -0000 1.11 @@ -36,12 +36,12 @@ </tr> </table> <h3>Examples</h3> -<blockquote> - <p><code><gzip src="test.tar" destfile="test.tar.gz"/></code></p> -</blockquote> -<blockquote> - <p><code><bzip2 src="test.tar" destfile="test.tar.bz2"/></code></p> -</blockquote> +<blockquote><pre> +<gzip src="test.tar" destfile="test.tar.gz"/> +</pre></blockquote> +<blockquote><pre> +<bzip2 src="test.tar" destfile="test.tar.bz2"/> +</pre></blockquote> <hr> <p align="center">Copyright © 2000-2005 The Apache Software Foundation. All rights Reserved.</p> 1.8 +12 -12 ant/docs/manual/CoreTasks/unpack.html Index: unpack.html =================================================================== RCS file: /home/cvs/ant/docs/manual/CoreTasks/unpack.html,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- unpack.html 7 Mar 2005 18:09:10 -0000 1.7 +++ unpack.html 8 Mar 2005 18:17:40 -0000 1.8 @@ -38,21 +38,21 @@ </tr> </table> <h3>Examples</h3> -<blockquote> - <p><code><gunzip src="test.tar.gz"/></code></p> -</blockquote> +<blockquote><pre> +<gunzip src="test.tar.gz"/> +</pre></blockquote> <p>expands <i>test.tar.gz</i> to <i>test.tar</i></p> -<blockquote> - <p><code><bunzip2 src="test.tar.bz2"/></code></p> -</blockquote> +<blockquote><pre> +<bunzip2 src="test.tar.bz2"/> +</pre></blockquote> <p>expands <i>test.tar.bz2</i> to <i>test.tar</i></p> -<blockquote> - <p><code><gunzip src="test.tar.gz" dest="test2.tar"/></code></p> -</blockquote> +<blockquote><pre> +<gunzip src="test.tar.gz" dest="test2.tar"/> +</pre></blockquote> <p>expands <i>test.tar.gz</i> to <i>test2.tar</i></p> -<blockquote> - <p><code><gunzip src="test.tar.gz" dest="subdir"/></code></p> -</blockquote> +<blockquote><pre> +<gunzip src="test.tar.gz" dest="subdir"/> +</pre></blockquote> <p>expands <i>test.tar.gz</i> to <i>subdir/test.tar</i> (assuming subdir is a directory).</p>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]