git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277869 13f79535-47bb-0310-9956-ffa450edef68master
@@ -86,7 +86,7 @@ A message which appears even in <tt>-quiet</tt> mode. | |||||
<pre><echo file="runner.csh" append="false">#\!/bin/tcsh | <pre><echo file="runner.csh" append="false">#\!/bin/tcsh | ||||
java-1.3.1 -mx1024m ${project.entrypoint} $$* | java-1.3.1 -mx1024m ${project.entrypoint} $$* | ||||
</echo></pre> | |||||
</echo></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 | ||||
@@ -86,20 +86,21 @@ with "<code>\,</code>".</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><genkey alias="apache-group" storepass="secret" | |||||
dname="CN=Ant Group, OU=Jakarta Division, O=Apache.org, C=US"/></code></p> | |||||
</blockquote> | |||||
<blockquote><pre> | |||||
<genkey alias="apache-group" storepass="secret" | |||||
dname="CN=Ant Group, OU=Jakarta Division, O=Apache.org, C=US"/> | |||||
</pre></blockquote> | |||||
<blockquote> | <blockquote> | ||||
<pre><code><genkey alias="apache-group" storepass="secret" > | |||||
<pre> | |||||
<genkey alias="apache-group" storepass="secret" > | |||||
<dname> | <dname> | ||||
<param name="CN" value="Ant Group"/> | <param name="CN" value="Ant Group"/> | ||||
<param name="OU" value="Jakarta Division"/> | <param name="OU" value="Jakarta Division"/> | ||||
<param name="O" value="Apache.Org"/> | <param name="O" value="Apache.Org"/> | ||||
<param name="C" value="US"/> | <param name="C" value="US"/> | ||||
</dname> | </dname> | ||||
</genkey></code></pre> | |||||
</genkey></pre> | |||||
</blockquote> | </blockquote> | ||||
<hr> | <hr> | ||||
<p align="center">Copyright © 2000-2001,2003,2005 Apache Software Foundation. All rights | <p align="center">Copyright © 2000-2001,2003,2005 Apache Software Foundation. All rights | ||||
@@ -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> <java jar="dist/test.jar" | |||||
<pre> | |||||
<java jar="dist/test.jar" | |||||
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> <java | |||||
<pre> | |||||
<java | |||||
dir="${exec.dir}" | dir="${exec.dir}" | ||||
jar="${exec.dir}/dist/test.jar" | jar="${exec.dir}/dist/test.jar" | ||||
fork="true" | fork="true" | ||||
@@ -339,7 +341,8 @@ is to start up. | |||||
<pre> <java classname="test.Main"/></pre> | <pre> <java classname="test.Main"/></pre> | ||||
<pre> <java classname="test.Main" | |||||
<pre> | |||||
<java classname="test.Main" | |||||
fork="yes" > | fork="yes" > | ||||
<sysproperty key="DEBUG" value="true"/> | <sysproperty key="DEBUG" value="true"/> | ||||
<arg value="-h"/> | <arg value="-h"/> | ||||
@@ -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"> | ||||
@@ -306,7 +306,8 @@ attribute.</p> | |||||
<style basedir="doc" destdir="build/doc" | <style basedir="doc" destdir="build/doc" | ||||
extension=".html" style="style/apache.xsl"/></pre> | extension=".html" style="style/apache.xsl"/></pre> | ||||
<h4>Using an xmlcatalog</h4> | <h4>Using an xmlcatalog</h4> | ||||
<pre><xslt basedir="doc" destdir="build/doc" | |||||
<pre> | |||||
<xslt basedir="doc" destdir="build/doc" | |||||
extension=".html" style="style/apache.xsl"> | extension=".html" style="style/apache.xsl"> | ||||
<xmlcatalog refid="mycatalog"/> | <xmlcatalog refid="mycatalog"/> | ||||
</xslt> | </xslt> | ||||
@@ -318,9 +319,11 @@ attribute.</p> | |||||
publicId="-//ArielPartners//DTD XML Article V1.0//EN" | publicId="-//ArielPartners//DTD XML Article V1.0//EN" | ||||
location="com/arielpartners/knowledgebase/dtd/article.dtd"/> | location="com/arielpartners/knowledgebase/dtd/article.dtd"/> | ||||
</xmlcatalog> | </xmlcatalog> | ||||
</xslt></pre> | |||||
</xslt> | |||||
</pre> | |||||
<h4>Using XSL parameters</h4> | <h4>Using XSL parameters</h4> | ||||
<pre><xslt basedir="doc" destdir="build/doc" | |||||
<pre> | |||||
<xslt basedir="doc" destdir="build/doc" | |||||
extension=".html" style="style/apache.xsl"> | extension=".html" style="style/apache.xsl"> | ||||
<param name="date" expression="07-01-2000"/> | <param name="date" expression="07-01-2000"/> | ||||
</xslt></pre> | </xslt></pre> | ||||
@@ -331,16 +334,19 @@ attribute.</p> | |||||
</p> | </p> | ||||
<h4>Using output properties</h4> | <h4>Using output properties</h4> | ||||
<pre><xslt in="doc.xml" out="build/doc/output.xml" | |||||
<pre> | |||||
<xslt in="doc.xml" out="build/doc/output.xml" | |||||
style="style/apache.xsl"> | style="style/apache.xsl"> | ||||
<outputproperty name="method" value="xml";/> | <outputproperty name="method" value="xml";/> | ||||
<outputproperty name="standalone" value="yes"/> | <outputproperty name="standalone" value="yes"/> | ||||
<outputproperty name="encoding" value="iso8859_1"/> | <outputproperty name="encoding" value="iso8859_1"/> | ||||
<outputproperty name="indent" value="yes"/> | <outputproperty name="indent" value="yes"/> | ||||
</xslt></pre> | |||||
</xslt> | |||||
</pre> | |||||
<h4>Using factory settings</h4> | <h4>Using factory settings</h4> | ||||
<pre><xslt in="doc.xml" out="build/doc/output.xml" | |||||
<pre> | |||||
<xslt in="doc.xml" out="build/doc/output.xml" | |||||
style="style/apache.xsl"> | style="style/apache.xsl"> | ||||
<factory name="org.apache.xalan.processor.TransformerFactoryImpl"> | <factory name="org.apache.xalan.processor.TransformerFactoryImpl"> | ||||
<attribute name="http://xml.apache.org/xalan/features/optimize" value="true"/> | <attribute name="http://xml.apache.org/xalan/features/optimize" value="true"/> | ||||
@@ -348,7 +354,8 @@ attribute.</p> | |||||
</xslt></pre> | </xslt></pre> | ||||
<h4>Using a mapper</h4> | <h4>Using a mapper</h4> | ||||
<pre><xslt basedir="in" destdir="out" | |||||
<pre> | |||||
<xslt basedir="in" destdir="out" | |||||
style="style/apache.xsl"> | style="style/apache.xsl"> | ||||
<mapper type="glob" from="*.xml.en" to="*.html.en"/> | <mapper type="glob" from="*.xml.en" to="*.html.en"/> | ||||
</xslt></pre> | </xslt></pre> | ||||
@@ -182,15 +182,17 @@ attributes | |||||
</table> | </table> | ||||
<h3>Examples</h3> | <h3>Examples</h3> | ||||
<pre> <tar tarfile="${dist}/manual.tar" basedir="htdocs/manual"/> | |||||
<gzip zipfile="${dist}/manual.tar.gz" src="${dist}/manual.tar"/></pre> | |||||
<pre> | |||||
<tar tarfile="${dist}/manual.tar" basedir="htdocs/manual"/> | |||||
<gzip zipfile="${dist}/manual.tar.gz" src="${dist}/manual.tar"/></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> <tar destfile="${dist}/manual.tar" | |||||
basedir="htdocs/manual" | |||||
excludes="mydocs/**, **/todo.html" | |||||
/></pre> | |||||
<pre> | |||||
<tar destfile="${dist}/manual.tar" | |||||
basedir="htdocs/manual" | |||||
excludes="mydocs/**, **/todo.html" | |||||
/></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><tar longfile="gnu" | |||||
<pre> | |||||
<tar longfile="gnu" | |||||
destfile="${dist.base}/${dist.name}-src.tar" > | destfile="${dist.base}/${dist.name}-src.tar" > | ||||
<tarfileset dir="${dist.name}/.." mode="755" username="ant" group="ant"> | <tarfileset dir="${dist.name}/.." mode="755" username="ant" group="ant"> | ||||
<include name="${dist.name}/bootstrap.sh"/> | <include name="${dist.name}/bootstrap.sh"/> | ||||
@@ -230,7 +233,8 @@ or files with the name <code>todo.html</code> are excluded.</p> | |||||
<exclude name="${dist.name}/bootstrap.sh"/> | <exclude name="${dist.name}/bootstrap.sh"/> | ||||
<exclude name="${dist.name}/build.sh"/> | <exclude name="${dist.name}/build.sh"/> | ||||
</tarfileset> | </tarfileset> | ||||
</tar> </pre> | |||||
</tar> | |||||
</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) | ||||
@@ -70,17 +70,15 @@ to perform unarchival upon. | |||||
</table> | </table> | ||||
<h3>Examples</h3> | <h3>Examples</h3> | ||||
<blockquote> | |||||
<p><code><unzip src="${tomcat_src}/tools-src.zip" dest="${tools.home}"/></code></p> | |||||
</blockquote> | |||||
<blockquote> | |||||
<p><code> | |||||
<gunzip src="tools.tar.gz"/><br> | |||||
<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}"/> | <untar src="tools.tar" dest="${tools.home}"/> | ||||
</code></p> | |||||
</blockquote> | |||||
<blockquote> | |||||
<p><pre> | |||||
</pre> | |||||
<pre> | |||||
<unzip src="${tomcat_src}/tools-src.zip" | <unzip src="${tomcat_src}/tools-src.zip" | ||||
dest="${tools.home}"> | dest="${tools.home}"> | ||||
<patternset> | <patternset> | ||||
@@ -88,10 +86,9 @@ to perform unarchival upon. | |||||
<exclude name="**/Test*.java"/> | <exclude name="**/Test*.java"/> | ||||
</patternset> | </patternset> | ||||
</unzip> | </unzip> | ||||
</pre></p> | |||||
</blockquote> | |||||
<blockquote> | |||||
<p><pre> | |||||
</pre> | |||||
<p/> | |||||
<pre> | |||||
<unzip dest="${tools.home}"> | <unzip dest="${tools.home}"> | ||||
<patternset> | <patternset> | ||||
<include name="**/*.java"/> | <include name="**/*.java"/> | ||||
@@ -102,18 +99,16 @@ to perform unarchival upon. | |||||
<exclude name="**/tmp*.zip"/> | <exclude name="**/tmp*.zip"/> | ||||
</fileset> | </fileset> | ||||
</unzip> | </unzip> | ||||
</pre></p> | |||||
</blockquote> | |||||
<blockquote> | |||||
<p><pre> | |||||
</pre> | |||||
<p/> | |||||
<pre> | |||||
<unzip src="apache-ant-bin.zip" dest="${tools.home}"> | <unzip src="apache-ant-bin.zip" dest="${tools.home}"> | ||||
<patternset> | <patternset> | ||||
<include name="apache-ant/lib/ant.jar"/> | <include name="apache-ant/lib/ant.jar"/> | ||||
</patternset> | </patternset> | ||||
<mapper type="flatten"/> | <mapper type="flatten"/> | ||||
</unzip> | </unzip> | ||||
</pre></p> | |||||
</blockquote> | |||||
</pre> | |||||
<hr> | <hr> | ||||
<p align="center">Copyright © 2000-2005 The Apache Software Foundation. All rights | <p align="center">Copyright © 2000-2005 The Apache Software Foundation. All rights | ||||
Reserved.</p> | Reserved.</p> | ||||
@@ -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><waitfor maxwait="30" maxwaitunit="second"><br> | |||||
<available file="errors.log"/><br> | |||||
</waitfor></code></p> | |||||
</blockquote> | |||||
<blockquote><pre> | |||||
<waitfor maxwait="30" maxwaitunit="second"> | |||||
<available file="errors.log"/> | |||||
</waitfor> | |||||
</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><waitfor maxwait="3" maxwaitunit="minute" checkevery="500"><br> | |||||
<http url="http://localhost/myapp/index.html"/><br> | |||||
</waitfor></code></p> | |||||
</blockquote> | |||||
<blockquote><pre> | |||||
<waitfor maxwait="3" maxwaitunit="minute" checkevery="500"> | |||||
<http url="http://localhost/myapp/index.html"/> | |||||
</waitfor> | |||||
</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><waitfor maxwait="10" maxwait="second"><br> | |||||
<and><br> | |||||
<socket server="dbserver" port="1521"/><br> | |||||
<http url="http://webserver/mypage.html"/><br> | |||||
</and><br> | |||||
</waitfor></code></p> | |||||
</blockquote> | |||||
<blockquote><pre> | |||||
<waitfor maxwait="10" maxwait="second"> | |||||
<and> | |||||
<socket server="dbserver" port="1521"/> | |||||
<http url="http://webserver/mypage.html"/> | |||||
</and> | |||||
</waitfor> | |||||
</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> | ||||