Browse Source

some fixes to align examples

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277869 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 20 years ago
parent
commit
ebd1d6e28d
8 changed files with 93 additions and 75 deletions
  1. +1
    -1
      docs/manual/CoreTasks/echo.html
  2. +7
    -6
      docs/manual/CoreTasks/genkey.html
  3. +6
    -3
      docs/manual/CoreTasks/java.html
  4. +20
    -12
      docs/manual/CoreTasks/mail.html
  5. +14
    -7
      docs/manual/CoreTasks/style.html
  6. +12
    -8
      docs/manual/CoreTasks/tar.html
  7. +15
    -20
      docs/manual/CoreTasks/unzip.html
  8. +18
    -18
      docs/manual/CoreTasks/waitfor.html

+ 1
- 1
docs/manual/CoreTasks/echo.html View File

@@ -86,7 +86,7 @@ A message which appears even in <tt>-quiet</tt> mode.


<pre>&lt;echo file="runner.csh" append="false"&gt;#\!/bin/tcsh <pre>&lt;echo file="runner.csh" append="false"&gt;#\!/bin/tcsh
java-1.3.1 -mx1024m ${project.entrypoint} $$* java-1.3.1 -mx1024m ${project.entrypoint} $$*
</echo></pre>
&lt;/echo&gt;</pre>
Generate a shell script by echoing to a file. Generate a shell script by echoing to a file.
Note the use of a double $ symbol to stop Ant Note the use of a double $ symbol to stop Ant
filtering out the single $ during variable expansion filtering out the single $ during variable expansion


+ 7
- 6
docs/manual/CoreTasks/genkey.html View File

@@ -86,20 +86,21 @@ with &quot;<code>\,</code>&quot;.</p>
<p>The following two examples are identical: </p> <p>The following two examples are identical: </p>


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


<blockquote> <blockquote>
<pre><code>&lt;genkey alias=&quot;apache-group&quot; storepass=&quot;secret&quot; &gt;
<pre>
&lt;genkey alias=&quot;apache-group&quot; storepass=&quot;secret&quot; &gt;
&lt;dname&gt; &lt;dname&gt;
&lt;param name=&quot;CN&quot; value=&quot;Ant Group&quot;/&gt; &lt;param name=&quot;CN&quot; value=&quot;Ant Group&quot;/&gt;
&lt;param name=&quot;OU&quot; value=&quot;Jakarta Division&quot;/&gt; &lt;param name=&quot;OU&quot; value=&quot;Jakarta Division&quot;/&gt;
&lt;param name=&quot;O&quot; value=&quot;Apache.Org&quot;/&gt; &lt;param name=&quot;O&quot; value=&quot;Apache.Org&quot;/&gt;
&lt;param name=&quot;C&quot; value=&quot;US&quot;/&gt; &lt;param name=&quot;C&quot; value=&quot;US&quot;/&gt;
&lt;/dname&gt; &lt;/dname&gt;
&lt;/genkey&gt;</code></pre>
&lt;/genkey&gt;</pre>
</blockquote> </blockquote>
<hr> <hr>
<p align="center">Copyright &copy; 2000-2001,2003,2005 Apache Software Foundation. All rights <p align="center">Copyright &copy; 2000-2001,2003,2005 Apache Software Foundation. All rights


+ 6
- 3
docs/manual/CoreTasks/java.html View File

@@ -302,7 +302,8 @@ to the JAR file.
</pre> </pre>
Run a class in this JVM with a new jar on the classpath Run a class in this JVM with a new jar on the classpath


<pre> &lt;java jar=&quot;dist/test.jar&quot;
<pre>
&lt;java jar=&quot;dist/test.jar&quot;
fork="true" fork="true"
failonerror="true" failonerror="true"
maxmemory="128m" maxmemory="128m"
@@ -318,7 +319,8 @@ Run the JAR test.jar in this project's dist/lib directory.
using the manifest supplied entry point, forking (as required), using the manifest supplied entry point, forking (as required),
and with a maximum memory of 128MB. Any non zero return code breaks the build. and with a maximum memory of 128MB. Any non zero return code breaks the build.


<pre> &lt;java
<pre>
&lt;java
dir="${exec.dir}" dir="${exec.dir}"
jar=&quot;${exec.dir}/dist/test.jar&quot; jar=&quot;${exec.dir}/dist/test.jar&quot;
fork="true" fork="true"
@@ -339,7 +341,8 @@ is to start up.




<pre> &lt;java classname=&quot;test.Main&quot;/&gt;</pre> <pre> &lt;java classname=&quot;test.Main&quot;/&gt;</pre>
<pre> &lt;java classname=&quot;test.Main&quot;
<pre>
&lt;java classname=&quot;test.Main&quot;
fork=&quot;yes&quot; &gt; fork=&quot;yes&quot; &gt;
&lt;sysproperty key=&quot;DEBUG&quot; value=&quot;true&quot;/&gt; &lt;sysproperty key=&quot;DEBUG&quot; value=&quot;true&quot;/&gt;
&lt;arg value=&quot;-h&quot;/&gt; &lt;arg value=&quot;-h&quot;/&gt;


+ 20
- 12
docs/manual/CoreTasks/mail.html View File

@@ -10,18 +10,26 @@


<h2><a name="mail">Mail</a></h2> <h2><a name="mail">Mail</a></h2>
<h3>Description</h3> <h3>Description</h3>
<p>A task to send SMTP email.<br></br><br></br>
This task can send mail using either plain
text, UU encoding, or MIME format mail, depending on what is available.<br></br><br></br>
<br>
SMTP auth and SSL/TLS require JavaMail and are only available in MIME format.<br></br><br></br>
Attachments may be sent using nested
<a href="../CoreTypes/fileset.html">fileset</a> elements.</p>
<p><strong>Note:</strong> This task may depend on external libraries
that are not included
in the Ant distribution. See <a href="../install.html#librarydependencies">
Library Dependencies</a> for more information.
</p>
<p>
A task to send SMTP email.
</p>
<p>
This task can send mail using either plain
text, UU encoding, or MIME format mail, depending on what is available.
</p>
<p>
SMTP auth and SSL/TLS require JavaMail and are only available in MIME format.
</p>
<p>
Attachments may be sent using nested
<a href="../CoreTypes/fileset.html">fileset</a> elements.
</p>
<p>
<strong>Note:</strong> This task may depend on external libraries
that are not included in the Ant distribution.
See <a href="../install.html#librarydependencies">Library Dependencies</a>
for more information.
</p>


<h3>Parameters</h3> <h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0"> <table border="1" cellpadding="2" cellspacing="0">


+ 14
- 7
docs/manual/CoreTasks/style.html View File

@@ -306,7 +306,8 @@ attribute.</p>
&lt;style basedir=&quot;doc&quot; destdir=&quot;build/doc&quot; &lt;style basedir=&quot;doc&quot; destdir=&quot;build/doc&quot;
extension=&quot;.html&quot; style=&quot;style/apache.xsl&quot;/&gt;</pre> extension=&quot;.html&quot; style=&quot;style/apache.xsl&quot;/&gt;</pre>
<h4>Using an xmlcatalog</h4> <h4>Using an xmlcatalog</h4>
<pre>&lt;xslt basedir=&quot;doc&quot; destdir=&quot;build/doc&quot;
<pre>
&lt;xslt basedir=&quot;doc&quot; destdir=&quot;build/doc&quot;
extension=&quot;.html&quot; style=&quot;style/apache.xsl&quot;&gt; extension=&quot;.html&quot; style=&quot;style/apache.xsl&quot;&gt;
&lt;xmlcatalog refid=&quot;mycatalog&quot;/&gt; &lt;xmlcatalog refid=&quot;mycatalog&quot;/&gt;
&lt;/xslt&gt; &lt;/xslt&gt;
@@ -318,9 +319,11 @@ attribute.</p>
publicId=&quot;-//ArielPartners//DTD XML Article V1.0//EN&quot; publicId=&quot;-//ArielPartners//DTD XML Article V1.0//EN&quot;
location=&quot;com/arielpartners/knowledgebase/dtd/article.dtd&quot;/&gt; location=&quot;com/arielpartners/knowledgebase/dtd/article.dtd&quot;/&gt;
&lt;/xmlcatalog&gt; &lt;/xmlcatalog&gt;
&lt;/xslt&gt;</pre>
&lt;/xslt&gt;
</pre>
<h4>Using XSL parameters</h4> <h4>Using XSL parameters</h4>
<pre>&lt;xslt basedir=&quot;doc&quot; destdir=&quot;build/doc&quot;
<pre>
&lt;xslt basedir=&quot;doc&quot; destdir=&quot;build/doc&quot;
extension=&quot;.html&quot; style=&quot;style/apache.xsl&quot;&gt; extension=&quot;.html&quot; style=&quot;style/apache.xsl&quot;&gt;
&lt;param name=&quot;date&quot; expression=&quot;07-01-2000&quot;/&gt; &lt;param name=&quot;date&quot; expression=&quot;07-01-2000&quot;/&gt;
&lt;/xslt&gt;</pre> &lt;/xslt&gt;</pre>
@@ -331,16 +334,19 @@ attribute.</p>
</p> </p>


<h4>Using output properties</h4> <h4>Using output properties</h4>
<pre>&lt;xslt in=&quot;doc.xml&quot; out=&quot;build/doc/output.xml&quot;
<pre>
&lt;xslt in=&quot;doc.xml&quot; out=&quot;build/doc/output.xml&quot;
style=&quot;style/apache.xsl&quot;&gt; style=&quot;style/apache.xsl&quot;&gt;
&lt;outputproperty name=&quot;method&quot; value=&quot;xml&quot;;/&gt; &lt;outputproperty name=&quot;method&quot; value=&quot;xml&quot;;/&gt;
&lt;outputproperty name=&quot;standalone&quot; value=&quot;yes&quot;/&gt; &lt;outputproperty name=&quot;standalone&quot; value=&quot;yes&quot;/&gt;
&lt;outputproperty name=&quot;encoding&quot; value=&quot;iso8859_1&quot;/&gt; &lt;outputproperty name=&quot;encoding&quot; value=&quot;iso8859_1&quot;/&gt;
&lt;outputproperty name=&quot;indent&quot; value=&quot;yes&quot;/&gt; &lt;outputproperty name=&quot;indent&quot; value=&quot;yes&quot;/&gt;
&lt;/xslt&gt;</pre>
&lt;/xslt&gt;
</pre>


<h4>Using factory settings</h4> <h4>Using factory settings</h4>
<pre>&lt;xslt in=&quot;doc.xml&quot; out=&quot;build/doc/output.xml&quot;
<pre>
&lt;xslt in=&quot;doc.xml&quot; out=&quot;build/doc/output.xml&quot;
style=&quot;style/apache.xsl&quot;&gt; style=&quot;style/apache.xsl&quot;&gt;
&lt;factory name=&quot;org.apache.xalan.processor.TransformerFactoryImpl&quot;&gt; &lt;factory name=&quot;org.apache.xalan.processor.TransformerFactoryImpl&quot;&gt;
&lt;attribute name=&quot;http://xml.apache.org/xalan/features/optimize&quot; value=&quot;true&quot;/&gt; &lt;attribute name=&quot;http://xml.apache.org/xalan/features/optimize&quot; value=&quot;true&quot;/&gt;
@@ -348,7 +354,8 @@ attribute.</p>
&lt;/xslt&gt;</pre> &lt;/xslt&gt;</pre>


<h4>Using a mapper</h4> <h4>Using a mapper</h4>
<pre>&lt;xslt basedir=&quot;in&quot; destdir=&quot;out&quot;
<pre>
&lt;xslt basedir=&quot;in&quot; destdir=&quot;out&quot;
style=&quot;style/apache.xsl&quot;&gt; style=&quot;style/apache.xsl&quot;&gt;
&lt;mapper type=&quot;glob&quot; from=&quot;*.xml.en&quot; to=&quot;*.html.en&quot;/&gt; &lt;mapper type=&quot;glob&quot; from=&quot;*.xml.en&quot; to=&quot;*.html.en&quot;/&gt;
&lt;/xslt&gt;</pre> &lt;/xslt&gt;</pre>


+ 12
- 8
docs/manual/CoreTasks/tar.html View File

@@ -182,15 +182,17 @@ attributes
</table> </table>


<h3>Examples</h3> <h3>Examples</h3>
<pre> &lt;tar tarfile=&quot;${dist}/manual.tar&quot; basedir=&quot;htdocs/manual&quot;/&gt;
&lt;gzip zipfile=&quot;${dist}/manual.tar.gz&quot; src=&quot;${dist}/manual.tar&quot;/&gt;</pre>
<pre>
&lt;tar tarfile=&quot;${dist}/manual.tar&quot; basedir=&quot;htdocs/manual&quot;/&gt;
&lt;gzip zipfile=&quot;${dist}/manual.tar.gz&quot; src=&quot;${dist}/manual.tar&quot;/&gt;</pre>
<p>tars all files in the <code>htdocs/manual</code> directory into a file called <code>manual.tar</code> <p>tars all files in the <code>htdocs/manual</code> directory into a file called <code>manual.tar</code>
in the <code>${dist}</code> directory, then applies the gzip task to compress in the <code>${dist}</code> directory, then applies the gzip task to compress
it.</p> it.</p>
<pre> &lt;tar destfile=&quot;${dist}/manual.tar&quot;
basedir=&quot;htdocs/manual&quot;
excludes=&quot;mydocs/**, **/todo.html&quot;
/&gt;</pre>
<pre>
&lt;tar destfile=&quot;${dist}/manual.tar&quot;
basedir=&quot;htdocs/manual&quot;
excludes=&quot;mydocs/**, **/todo.html&quot;
/&gt;</pre>
<p>tars all files in the <code>htdocs/manual</code> directory into a file called <code>manual.tar</code> <p>tars all files in the <code>htdocs/manual</code> directory into a file called <code>manual.tar</code>
in the <code>${dist}</code> directory. Files in the directory <code>mydocs</code>, in the <code>${dist}</code> directory. Files in the directory <code>mydocs</code>,
or files with the name <code>todo.html</code> are excluded.</p> or files with the name <code>todo.html</code> are excluded.</p>
@@ -219,7 +221,8 @@ or files with the name <code>todo.html</code> are excluded.</p>
</p> </p>




<pre>&lt;tar longfile=&quot;gnu&quot;
<pre>
&lt;tar longfile=&quot;gnu&quot;
destfile=&quot;${dist.base}/${dist.name}-src.tar&quot; &gt; destfile=&quot;${dist.base}/${dist.name}-src.tar&quot; &gt;
&lt;tarfileset dir=&quot;${dist.name}/..&quot; mode=&quot;755&quot; username=&quot;ant&quot; group=&quot;ant&quot;&gt; &lt;tarfileset dir=&quot;${dist.name}/..&quot; mode=&quot;755&quot; username=&quot;ant&quot; group=&quot;ant&quot;&gt;
&lt;include name=&quot;${dist.name}/bootstrap.sh&quot;/&gt; &lt;include name=&quot;${dist.name}/bootstrap.sh&quot;/&gt;
@@ -230,7 +233,8 @@ or files with the name <code>todo.html</code> are excluded.</p>
&lt;exclude name=&quot;${dist.name}/bootstrap.sh&quot;/&gt; &lt;exclude name=&quot;${dist.name}/bootstrap.sh&quot;/&gt;
&lt;exclude name=&quot;${dist.name}/build.sh&quot;/&gt; &lt;exclude name=&quot;${dist.name}/build.sh&quot;/&gt;
&lt;/tarfileset&gt; &lt;/tarfileset&gt;
&lt;/tar&gt; </pre>
&lt;/tar&gt;
</pre>


<p>This example shows building a tar which uses the GNU extensions for long paths and <p>This example shows building a tar which uses the GNU extensions for long paths and
where some files need to be marked as executable (mode 755) where some files need to be marked as executable (mode 755)


+ 15
- 20
docs/manual/CoreTasks/unzip.html View File

@@ -70,17 +70,15 @@ to perform unarchival upon.


</table> </table>
<h3>Examples</h3> <h3>Examples</h3>
<blockquote>
<p><code>&lt;unzip src=&quot;${tomcat_src}/tools-src.zip&quot; dest=&quot;${tools.home}&quot;/&gt;</code></p>
</blockquote>
<blockquote>
<p><code>
&lt;gunzip src=&quot;tools.tar.gz&quot;/&gt;<br>
<pre>
&lt;unzip src=&quot;${tomcat_src}/tools-src.zip&quot; dest=&quot;${tools.home}&quot;/&gt;
</pre>
<p/>
<pre>
&lt;gunzip src=&quot;tools.tar.gz&quot;/&gt;
&lt;untar src=&quot;tools.tar&quot; dest=&quot;${tools.home}&quot;/&gt; &lt;untar src=&quot;tools.tar&quot; dest=&quot;${tools.home}&quot;/&gt;
</code></p>
</blockquote>
<blockquote>
<p><pre>
</pre>
<pre>
&lt;unzip src=&quot;${tomcat_src}/tools-src.zip&quot; &lt;unzip src=&quot;${tomcat_src}/tools-src.zip&quot;
dest=&quot;${tools.home}&quot;&gt; dest=&quot;${tools.home}&quot;&gt;
&lt;patternset&gt; &lt;patternset&gt;
@@ -88,10 +86,9 @@ to perform unarchival upon.
&lt;exclude name=&quot;**/Test*.java&quot;/&gt; &lt;exclude name=&quot;**/Test*.java&quot;/&gt;
&lt;/patternset&gt; &lt;/patternset&gt;
&lt;/unzip&gt; &lt;/unzip&gt;
</pre></p>
</blockquote>
<blockquote>
<p><pre>
</pre>
<p/>
<pre>
&lt;unzip dest=&quot;${tools.home}&quot;&gt; &lt;unzip dest=&quot;${tools.home}&quot;&gt;
&lt;patternset&gt; &lt;patternset&gt;
&lt;include name=&quot;**/*.java&quot;/&gt; &lt;include name=&quot;**/*.java&quot;/&gt;
@@ -102,18 +99,16 @@ to perform unarchival upon.
&lt;exclude name=&quot;**/tmp*.zip&quot;/&gt; &lt;exclude name=&quot;**/tmp*.zip&quot;/&gt;
&lt;/fileset&gt; &lt;/fileset&gt;
&lt;/unzip&gt; &lt;/unzip&gt;
</pre></p>
</blockquote>
<blockquote>
<p><pre>
</pre>
<p/>
<pre>
&lt;unzip src=&quot;apache-ant-bin.zip&quot; dest=&quot;${tools.home}&quot;&gt; &lt;unzip src=&quot;apache-ant-bin.zip&quot; dest=&quot;${tools.home}&quot;&gt;
&lt;patternset&gt; &lt;patternset&gt;
&lt;include name=&quot;apache-ant/lib/ant.jar&quot;/&gt; &lt;include name=&quot;apache-ant/lib/ant.jar&quot;/&gt;
&lt;/patternset&gt; &lt;/patternset&gt;
&lt;mapper type=&quot;flatten&quot;/&gt; &lt;mapper type=&quot;flatten&quot;/&gt;
&lt;/unzip&gt; &lt;/unzip&gt;
</pre></p>
</blockquote>
</pre>
<hr> <hr>
<p align="center">Copyright &copy; 2000-2005 The Apache Software Foundation. All rights <p align="center">Copyright &copy; 2000-2005 The Apache Software Foundation. All rights
Reserved.</p> Reserved.</p>


+ 18
- 18
docs/manual/CoreTasks/waitfor.html View File

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


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


Loading…
Cancel
Save