git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271659 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -0,0 +1,785 @@ | |||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |||
| <!-- Content Stylesheet for Site --> | |||
| <!-- start the processing --> | |||
| <html> | |||
| <head> | |||
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> | |||
| <meta name="author" value="Adam Murdoch"> | |||
| <meta name="email" value="adammurdoch@apache.org"> | |||
| <title>Apache Myrmidon - User Guide</title> | |||
| </head> | |||
| <body bgcolor="#ffffff" text="#000000" link="#525D76"> | |||
| <table border="0" width="100%" cellspacing="0"> | |||
| <!-- TOP IMAGE --> | |||
| <tr> | |||
| <td> <td colspan="2"> | |||
| <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" align="left" border="0"/></a> | |||
| </td> | |||
| </td> | |||
| <td valign="bottom"><div align="right"><b><font size="+3" color="#525D76">Apache Myrmidon</font></b></div></td> | |||
| </tr> | |||
| </table> | |||
| <table border="0" width="100%" cellspacing="4"> | |||
| <tr><td colspan="2"> | |||
| <hr noshade="" size="1"/> | |||
| </td></tr> | |||
| <tr> | |||
| <!-- LEFT SIDE NAVIGATION --> | |||
| <td valign="top" nowrap="true"> | |||
| <p><strong>Myrmidon</strong></p> | |||
| <ul> | |||
| <li> <a href="./index.html">Introduction</a> | |||
| </li> | |||
| <li> <a href="./getinvolved.html">Get Involved</a> | |||
| </li> | |||
| <li> <a href="./user.html">Building Myrmidon</a> | |||
| </li> | |||
| <li> <a href="./todo.html">Todo List</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>User Guide</strong></p> | |||
| <ul> | |||
| <li> <a href="./buildfile.html">Build file</a> | |||
| </li> | |||
| <li> <a href="./vfs.html">Virtual File System</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>Extending Ant</strong></p> | |||
| <ul> | |||
| <li> <a href="./task.html">Task Writers HOWTO</a> | |||
| </li> | |||
| <li> <a href="./classloader.html">ClassLoader HOWTO</a> | |||
| </li> | |||
| <li> <a href="./librarys.html">Library HOWTO</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>Container Design</strong></p> | |||
| <ul> | |||
| </ul> | |||
| </td> | |||
| <td align="left" valign="top"> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#525D76"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| <a name="Project File"><strong>Project File</strong></a> | |||
| </font> | |||
| </td></tr> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p> | |||
| The project file format is very similar to that of Ant 1. The root element of | |||
| the project file must be a <code><project></code> element. It can | |||
| take the following attributes: | |||
| </p> | |||
| <table> | |||
| <tr> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Attribute | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Description | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Default Value | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| name | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| The project name. | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| The base-name of the project file, with the extension removed. | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| basedir | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| The base directory for the project. The base directory is used | |||
| to resolve all relative file names used in the project file. | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| The directory containing the project file. | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| default | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| The name of the default target. | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| <code>main</code> | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| version | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| The project file version that the project is written for. | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| None, must be <code>2.0</code> | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| <p> | |||
| A <code><project></code> element can contain the following elements, | |||
| in the order given below: | |||
| </p> | |||
| <ul> | |||
| <li><a href="#Project References"><code><projectref></code></a></li> | |||
| <li><a href="#Library Imports"><code><import></code></a></li> | |||
| <li><a href="#Implicit Tasks">Implicit tasks</a></li> | |||
| <li><a href="#Targets"><code><target></code></a></li> | |||
| </ul> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#828DA6"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| <a name="Project References"><strong>Project References</strong></a> | |||
| </font> | |||
| </td></tr> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>Project references allow the project to import, or reference, other projects. | |||
| A <code><projectref></code> element takes the following attributes:</p> | |||
| <table> | |||
| <tr> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Attribute | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Description | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Default Value | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| name | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| The name to use to identify the referenced project. | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Required | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| location | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| The path to the project file to reference. | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Required | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| <p> | |||
| The targets of a referenced project can be used in the <code>depends</code> list | |||
| of a target in the referencing project, using the following syntax: | |||
| <code><i>project-name</i>-><i>target-name</i></code>. Here is a simple example:</p> | |||
| <div align="left"> | |||
| <table cellspacing="4" cellpadding="0" border="0"> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#ffffff"><pre> | |||
| <project version="2.0"> | |||
| <!-- Reference another project --> | |||
| <projectref name="subproject" location="subproject/build.xml"/> | |||
| <!-- Use the "compile" target from the referenced project --> | |||
| <target name="main" depends="subproject->compile"> | |||
| .. do some stuff .. | |||
| </target> | |||
| </project> | |||
| </pre></td> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| </table> | |||
| </div> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#828DA6"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| <a name="Library Imports"><strong>Library Imports</strong></a> | |||
| </font> | |||
| </td></tr> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>Library imports allow the project to import the tasks and data-types from an | |||
| antlib. An <code><import></code> element takes the following attributes:</p> | |||
| <table> | |||
| <tr> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Attribute | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Description | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Default Value | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| library | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| The name of the library to import. The <code>ext</code> directory | |||
| of the Myrmidon distribution is searched for a library file with | |||
| the given name, and an <code>atl</code> extension. | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Required | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| type | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| The type of definition to import. Values include <code>task</code>, | |||
| and <code>data-type</code>. | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| None | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| name | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| The name of the type to import. | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| None | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| <p> | |||
| If the <code>type</code> and <code>name</code> attributes are not provided, | |||
| the entire contents of the antlib are imported. | |||
| </p> | |||
| <p>The following example import the <code><my-task></code> task from | |||
| the <code>my-tasks</code> antlib.</p> | |||
| <div align="left"> | |||
| <table cellspacing="4" cellpadding="0" border="0"> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#ffffff"><pre> | |||
| <project version="2.0"> | |||
| <!-- Import task <my-task> from the 'my-tasks' antlib. --> | |||
| <import library="my-tasks" type="task" name="my-task"/> | |||
| <target name="main"> | |||
| <my-task some-prop=".."/> | |||
| </target> | |||
| </project> | |||
| </pre></td> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| </table> | |||
| </div> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#828DA6"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| <a name="Implicit Tasks"><strong>Implicit Tasks</strong></a> | |||
| </font> | |||
| </td></tr> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>Implicit tasks are run before any of the project's targets are run. Any task | |||
| can be used, including <code><property></code> and data-type instances. | |||
| Implicit tasks can be used to initialise the project. For example:</p> | |||
| <div align="left"> | |||
| <table cellspacing="4" cellpadding="0" border="0"> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#ffffff"><pre> | |||
| <project version="2.0"> | |||
| <property name="some-property" value="some value"/> | |||
| <path id="classpath"> | |||
| <fileset dir="lib"/> | |||
| </path> | |||
| <log>Set classpath to ${classpath}</log> | |||
| <target name="main"> | |||
| .. do some stuff .. | |||
| </target> | |||
| </project> | |||
| </pre></td> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| </table> | |||
| </div> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#828DA6"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| <a name="Targets"><strong>Targets</strong></a> | |||
| </font> | |||
| </td></tr> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>Targets have the same format as in Ant 1.x, though some of the behaviour | |||
| is different. A <code><target></code> element takes the following | |||
| attributes:</p> | |||
| <table> | |||
| <tr> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Attribute | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Description | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Default Value | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| name | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| The name of the target. | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Required | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| depends | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| A comma-separated list of targets that this target depends on. | |||
| This list can contain targets from referenced projects. | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| None | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| if | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Only execute this target if the specified property is set, and not | |||
| equal to <code>false</code>. | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| None | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| unless | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Do not execute this target if the specified property is set, and not | |||
| equal to <code>false</code>. | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| None | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#525D76"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| <a name="Tasks"><strong>Tasks</strong></a> | |||
| </font> | |||
| </td></tr> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p> | |||
| The following table lists some of the current set of tasks. You can find | |||
| example usages of these tasks in the sample project file | |||
| <code>src/make/sample.ant</code>. | |||
| </p> | |||
| <table> | |||
| <tr> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Task | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Description | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| fail | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Causes the build to fail. | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| if | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Conditionally executes a set of tasks. | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| load-properties | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Loads a set of properties from a file. | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| log | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Writes a log message. | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| property | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Sets a property. | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| try-catch | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Runs a set of tasks, with a provided error and clean-up handler. | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| converter-def | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Register a type converter. These are used when configuring a task | |||
| or data-type from attributes. | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| type-def | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Register a task or data-type. | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| import | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Register the contents of an antlib. | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| </td> | |||
| </tr> | |||
| <!-- FOOTER --> | |||
| <tr><td colspan="2"> | |||
| <hr noshade="" size="1"/> | |||
| </td></tr> | |||
| <tr><td colspan="2"> | |||
| <div align="center"><font color="#525D76" size="-1"><em> | |||
| Copyright © 2000-2002, Apache Software Foundation | |||
| </em></font></div> | |||
| </td></tr> | |||
| </table> | |||
| </body> | |||
| </html> | |||
| <!-- end the processing --> | |||
| @@ -0,0 +1,208 @@ | |||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |||
| <!-- Content Stylesheet for Site --> | |||
| <!-- start the processing --> | |||
| <html> | |||
| <head> | |||
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> | |||
| <meta name="author" value="Peter Donald"> | |||
| <meta name="email" value="peter@apache.org"> | |||
| <title>Apache Myrmidon - On ClassLoaders in Ant2</title> | |||
| </head> | |||
| <body bgcolor="#ffffff" text="#000000" link="#525D76"> | |||
| <table border="0" width="100%" cellspacing="0"> | |||
| <!-- TOP IMAGE --> | |||
| <tr> | |||
| <td> <td colspan="2"> | |||
| <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" align="left" border="0"/></a> | |||
| </td> | |||
| </td> | |||
| <td valign="bottom"><div align="right"><b><font size="+3" color="#525D76">Apache Myrmidon</font></b></div></td> | |||
| </tr> | |||
| </table> | |||
| <table border="0" width="100%" cellspacing="4"> | |||
| <tr><td colspan="2"> | |||
| <hr noshade="" size="1"/> | |||
| </td></tr> | |||
| <tr> | |||
| <!-- LEFT SIDE NAVIGATION --> | |||
| <td valign="top" nowrap="true"> | |||
| <p><strong>Myrmidon</strong></p> | |||
| <ul> | |||
| <li> <a href="./index.html">Introduction</a> | |||
| </li> | |||
| <li> <a href="./getinvolved.html">Get Involved</a> | |||
| </li> | |||
| <li> <a href="./user.html">Building Myrmidon</a> | |||
| </li> | |||
| <li> <a href="./todo.html">Todo List</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>User Guide</strong></p> | |||
| <ul> | |||
| <li> <a href="./buildfile.html">Build file</a> | |||
| </li> | |||
| <li> <a href="./vfs.html">Virtual File System</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>Extending Ant</strong></p> | |||
| <ul> | |||
| <li> <a href="./task.html">Task Writers HOWTO</a> | |||
| </li> | |||
| <li> <a href="./classloader.html">ClassLoader HOWTO</a> | |||
| </li> | |||
| <li> <a href="./librarys.html">Library HOWTO</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>Container Design</strong></p> | |||
| <ul> | |||
| </ul> | |||
| </td> | |||
| <td align="left" valign="top"> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#525D76"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| <a name="ClassLoader Management"><strong>ClassLoader Management</strong></a> | |||
| </font> | |||
| </td></tr> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>In many ways Ant2 needs to follow rules similar to a number of | |||
| different application servers with respect to ClassLoader management. | |||
| Ant2 will create a number of different ClassLoaders that have access | |||
| to different sets of resources (and thus Classes). The main reason | |||
| for this arrangment is to partition different sections of the | |||
| application such as the Container, the Task API, task/type libraries | |||
| and support libraries.</p> | |||
| <p>The recomended structure for ClassLoader relationships is a hierarchy. | |||
| When a ClassLoader is asked for a resource (or a class) it first delegates | |||
| to it's parent to ask for the resource. If the resource is not present in | |||
| its parent ClassLoader then the ClassLoader attempts to locate the resource | |||
| in it's own store. In practice this means that all the classes (and static | |||
| variables defined by said classes) in a parent ClassLoader are shared with | |||
| the child ClassLoaders.</p> | |||
| <p>Using kooky ascii art, the specific ClassLoader structure for Ant2 is as | |||
| follows:</p> | |||
| <div align="left"> | |||
| <table cellspacing="4" cellpadding="0" border="0"> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#ffffff"><pre> | |||
| Bootstrap | |||
| | | |||
| System | |||
| | | |||
| Common | |||
| / \ | |||
| Container Shared | |||
| / \ | |||
| Antlib1 Antlib2 ... | |||
| </pre></td> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| </table> | |||
| </div> | |||
| <ul> | |||
| <li> | |||
| The <strong>Bootstrap</strong> ClassLoader contains the classes and resources | |||
| provided by the Java runtime. | |||
| </li> | |||
| <li> | |||
| The <strong>System</strong> ClassLoader contains the classes that were made accessible | |||
| via the CLASSPATH environment variable. If the standard ant script was used then this | |||
| should only contain the classes that are used to bootstrap the ant runtime. ie | |||
| <code>$ANT_HOME/bin/ant-launcher.jar</code> | |||
| </li> | |||
| <li> | |||
| The <strong>Common</strong> ClassLoader contains the classes and resources | |||
| that are made visible to both the Container and to all the ant type librarys. This | |||
| contains all the classes that the Container uses to communicate with tasks and other | |||
| supporting infrastructure. In particular it contains the following APIs; | |||
| <ul> | |||
| <li> | |||
| <em>Task API</em> - Contains the classes that are part of the API used | |||
| to define tasks. | |||
| </li> | |||
| <li> | |||
| <em>ProjectListener API</em> - Contains the classes necessary to define new | |||
| ProjectListeners. | |||
| </li> | |||
| <li> | |||
| <em>Aspect API</em> - Contains the classes that are used to define Aspects | |||
| of the container. | |||
| </li> | |||
| <li> | |||
| <em>Container API</em> - Contains the interfaces that are required to communicate | |||
| with the objects deep within the container. <strong>NOTE</strong>: These interfaces | |||
| are not to be used by user tasks but are made available so that certain tasks (such | |||
| as <antcall/>) can be implemented. However they are subject to change without | |||
| notice between between different ant2 versions. | |||
| </li> | |||
| </ul> | |||
| <p> | |||
| These classes are loaded from all the jars present in the <code>$ANT_HOME/lib</code> | |||
| directory. | |||
| </p> | |||
| </li> | |||
| <li> | |||
| The <strong>Container</strong> ClassLoader contains all the classes and resources | |||
| that are part of the actual implementation of the Container. These classes are not | |||
| directly accessible to any Ant library or task. Some of the classes are indirectly | |||
| accessible to tasks and other elements defined in the ant librarys as they implement | |||
| interfaces defined in the <strong>Common</strong> ClassLoader. The classes that are | |||
| stored in jars in the <code>$ANT_HOME/bin/lib/</code> directory. | |||
| </li> | |||
| <li> | |||
| The <strong>Shared</strong> ClassLoader contains all the classes and resources | |||
| that are shared across all of the ant librarys (unless they are als needed by the | |||
| container in which case they should be placed int the <strong>Container</strong> | |||
| ClassLoader). This ClassLoader is populated by all the jars that are contained in | |||
| the <code>$ANT_HOME/shared/</code> directory. | |||
| </li> | |||
| <li> | |||
| The <strong>AntLib</strong> ClassLoaders each contain the classes and resources | |||
| that required by that particular library. Note that in some cases a single Ant | |||
| Library will manifest as a single ClassLoader containing a single jar. However | |||
| in some cases it is possible for one Ant Library to have multiple jars in its | |||
| ClassLoader or even have multiple ClassLoaders. See XXXX for further details. | |||
| </li> | |||
| </ul> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| </td> | |||
| </tr> | |||
| <!-- FOOTER --> | |||
| <tr><td colspan="2"> | |||
| <hr noshade="" size="1"/> | |||
| </td></tr> | |||
| <tr><td colspan="2"> | |||
| <div align="center"><font color="#525D76" size="-1"><em> | |||
| Copyright © 2000-2002, Apache Software Foundation | |||
| </em></font></div> | |||
| </td></tr> | |||
| </table> | |||
| </body> | |||
| </html> | |||
| <!-- end the processing --> | |||
| @@ -0,0 +1,110 @@ | |||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |||
| <!-- Content Stylesheet for Site --> | |||
| <!-- start the processing --> | |||
| <html> | |||
| <head> | |||
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> | |||
| <meta name="author" value="Adam Murdoch"> | |||
| <meta name="email" value="adammurdoch@apache.org"> | |||
| <title>Apache Myrmidon - Get Involved</title> | |||
| </head> | |||
| <body bgcolor="#ffffff" text="#000000" link="#525D76"> | |||
| <table border="0" width="100%" cellspacing="0"> | |||
| <!-- TOP IMAGE --> | |||
| <tr> | |||
| <td> <td colspan="2"> | |||
| <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" align="left" border="0"/></a> | |||
| </td> | |||
| </td> | |||
| <td valign="bottom"><div align="right"><b><font size="+3" color="#525D76">Apache Myrmidon</font></b></div></td> | |||
| </tr> | |||
| </table> | |||
| <table border="0" width="100%" cellspacing="4"> | |||
| <tr><td colspan="2"> | |||
| <hr noshade="" size="1"/> | |||
| </td></tr> | |||
| <tr> | |||
| <!-- LEFT SIDE NAVIGATION --> | |||
| <td valign="top" nowrap="true"> | |||
| <p><strong>Myrmidon</strong></p> | |||
| <ul> | |||
| <li> <a href="./index.html">Introduction</a> | |||
| </li> | |||
| <li> <a href="./getinvolved.html">Get Involved</a> | |||
| </li> | |||
| <li> <a href="./user.html">Building Myrmidon</a> | |||
| </li> | |||
| <li> <a href="./todo.html">Todo List</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>User Guide</strong></p> | |||
| <ul> | |||
| <li> <a href="./buildfile.html">Build file</a> | |||
| </li> | |||
| <li> <a href="./vfs.html">Virtual File System</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>Extending Ant</strong></p> | |||
| <ul> | |||
| <li> <a href="./task.html">Task Writers HOWTO</a> | |||
| </li> | |||
| <li> <a href="./classloader.html">ClassLoader HOWTO</a> | |||
| </li> | |||
| <li> <a href="./librarys.html">Library HOWTO</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>Container Design</strong></p> | |||
| <ul> | |||
| </ul> | |||
| </td> | |||
| <td align="left" valign="top"> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#525D76"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| <a name="Get Involved"><strong>Get Involved</strong></a> | |||
| </font> | |||
| </td></tr> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>There are plenty of things you can do to help out with Myrmidon. The Todo | |||
| list below describes items which still need to be done. Of course, since | |||
| this is an open-source project, there's plenty of scope for experimentation, | |||
| and you can pretty much make up your own items to work on.</p> | |||
| <p>Some things that are worth reading if you do want to get involved:</p> | |||
| <ul> | |||
| <li>The <a href="http://jakarta.apache.org/ant/ant2/">Ant 2</a> goals and requirements.</li> | |||
| <li>The <a href="http://jakarta.apache.org/ant/ant2/actionlist.html">Ant 1.9 Action List</a>.</li> | |||
| <li>The Jakarta Project's <a href="http://jakarta.apache.org/site/getinvolved.html">Get Involved</a> page.</li> | |||
| </ul> | |||
| <p>There is no Ant 2 or Myrmidon mailing list yet, so direct any questions | |||
| or comments you have to the ant-dev mailing list.</p> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| </td> | |||
| </tr> | |||
| <!-- FOOTER --> | |||
| <tr><td colspan="2"> | |||
| <hr noshade="" size="1"/> | |||
| </td></tr> | |||
| <tr><td colspan="2"> | |||
| <div align="center"><font color="#525D76" size="-1"><em> | |||
| Copyright © 2000-2002, Apache Software Foundation | |||
| </em></font></div> | |||
| </td></tr> | |||
| </table> | |||
| </body> | |||
| </html> | |||
| <!-- end the processing --> | |||
| @@ -18,10 +18,12 @@ | |||
| <table border="0" width="100%" cellspacing="0"> | |||
| <!-- TOP IMAGE --> | |||
| <tr> | |||
| <td colspan="2"> | |||
| <td> <td colspan="2"> | |||
| <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" align="left" border="0"/></a> | |||
| </td> | |||
| </tr> | |||
| </td> | |||
| <td valign="bottom"><div align="right"><b><font size="+3" color="#525D76">Apache Myrmidon</font></b></div></td> | |||
| </tr> | |||
| </table> | |||
| <table border="0" width="100%" cellspacing="4"> | |||
| <tr><td colspan="2"> | |||
| @@ -35,12 +37,31 @@ | |||
| <ul> | |||
| <li> <a href="./index.html">Introduction</a> | |||
| </li> | |||
| <li> <a href="./user.html">User Guide</a> | |||
| <li> <a href="./getinvolved.html">Get Involved</a> | |||
| </li> | |||
| <li> <a href="./user.html">Building Myrmidon</a> | |||
| </li> | |||
| <li> <a href="./todo.html">Todo List</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>User Guide</strong></p> | |||
| <ul> | |||
| <li> <a href="./buildfile.html">Build file</a> | |||
| </li> | |||
| <li> <a href="./vfs.html">Virtual File System</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>Extending Ant</strong></p> | |||
| <ul> | |||
| <li> <a href="./task.html">Task Writers HOWTO</a> | |||
| </li> | |||
| <li> <a href="./todo.html">Get Involved</a> | |||
| <li> <a href="./classloader.html">ClassLoader HOWTO</a> | |||
| </li> | |||
| <li> <a href="./todo.html#Todo List">Todo List</a> | |||
| <li> <a href="./librarys.html">Library HOWTO</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>Container Design</strong></p> | |||
| <ul> | |||
| </ul> | |||
| </td> | |||
| <td align="left" valign="top"> | |||
| @@ -0,0 +1,327 @@ | |||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |||
| <!-- Content Stylesheet for Site --> | |||
| <!-- start the processing --> | |||
| <html> | |||
| <head> | |||
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> | |||
| <meta name="author" value="Peter Donald"> | |||
| <meta name="email" value="peter@apache.org"> | |||
| <title>Apache Myrmidon - On Librarys in Ant2</title> | |||
| </head> | |||
| <body bgcolor="#ffffff" text="#000000" link="#525D76"> | |||
| <table border="0" width="100%" cellspacing="0"> | |||
| <!-- TOP IMAGE --> | |||
| <tr> | |||
| <td> <td colspan="2"> | |||
| <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" align="left" border="0"/></a> | |||
| </td> | |||
| </td> | |||
| <td valign="bottom"><div align="right"><b><font size="+3" color="#525D76">Apache Myrmidon</font></b></div></td> | |||
| </tr> | |||
| </table> | |||
| <table border="0" width="100%" cellspacing="4"> | |||
| <tr><td colspan="2"> | |||
| <hr noshade="" size="1"/> | |||
| </td></tr> | |||
| <tr> | |||
| <!-- LEFT SIDE NAVIGATION --> | |||
| <td valign="top" nowrap="true"> | |||
| <p><strong>Myrmidon</strong></p> | |||
| <ul> | |||
| <li> <a href="./index.html">Introduction</a> | |||
| </li> | |||
| <li> <a href="./getinvolved.html">Get Involved</a> | |||
| </li> | |||
| <li> <a href="./user.html">Building Myrmidon</a> | |||
| </li> | |||
| <li> <a href="./todo.html">Todo List</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>User Guide</strong></p> | |||
| <ul> | |||
| <li> <a href="./buildfile.html">Build file</a> | |||
| </li> | |||
| <li> <a href="./vfs.html">Virtual File System</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>Extending Ant</strong></p> | |||
| <ul> | |||
| <li> <a href="./task.html">Task Writers HOWTO</a> | |||
| </li> | |||
| <li> <a href="./classloader.html">ClassLoader HOWTO</a> | |||
| </li> | |||
| <li> <a href="./librarys.html">Library HOWTO</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>Container Design</strong></p> | |||
| <ul> | |||
| </ul> | |||
| </td> | |||
| <td align="left" valign="top"> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#525D76"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| <a name="Library Management"><strong>Library Management</strong></a> | |||
| </font> | |||
| </td></tr> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>Long ago there was identified the need for librarys that contain | |||
| tasks and other elements present in the build file. This document | |||
| attempts to describe the mechanism via which these libraries will be | |||
| defined and used in Ant2. The librarys (also referred to as | |||
| deployments) will be termed antlibs.</p> | |||
| <p>Ant librarys can be packaged and signed into a ANt Type Library | |||
| format (.atl) using the standard Java Archive tools. (For details on | |||
| the .jar file format see the | |||
| <a href="http://java.sun.com/j2se/1.3/docs/guide/jar/index.html"> | |||
| Jar Specification</a>.</p> | |||
| <p>When packaged into such a form the META-INF/ directory contains | |||
| ant specific descriptors in addition to the standard Jar manifest | |||
| and other descriptor files. The archive will also contain the | |||
| <code>.class</code> files for all the tasks and other types the | |||
| library defines. It may also contain additional resources that can | |||
| be referenced in the build file (an example being DTDs).</p> | |||
| <p>The library may also need access to other librarys or resources | |||
| to perform its job. For instance, if the task loaded an XML document | |||
| and then processed said document using the <em>Trax API</em> then | |||
| the Ant library needs to have access to the <em>Trax API</em> and an | |||
| implementation of the API. The Antlib mechanism thus uses the standard | |||
| "Optional Package" Specification to declare dependencies on other | |||
| libraries.</p> | |||
| <p>The libraries will usually be installed in standard locations that | |||
| make it possible for the Ant container to automatically locate and scan | |||
| the libraries. It will also be possible for the users to specify | |||
| additional search locations or even the specific location of ant | |||
| libraries.</p> | |||
| <p>The following sections will describe each of these different facets | |||
| in greater detail.</p> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#828DA6"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| <a name="Descriptors"><strong>Descriptors</strong></a> | |||
| </font> | |||
| </td></tr> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>FIXME: Import this part from other doco</p> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#828DA6"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| <a name="Class and Resource Files"><strong>Class and Resource Files</strong></a> | |||
| </font> | |||
| </td></tr> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>The class and resources files should be stored as in standard jars. The | |||
| root directory being the base via which code and resources are loaded. So | |||
| the <code>.class</code> file for the Java class <code>com.biz.tasks.Mytask</code> | |||
| would be stored in <code>/com/biz/tasks/Mytask.class</code></p> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#828DA6"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| <a name="Dependencies"><strong>Dependencies</strong></a> | |||
| </font> | |||
| </td></tr> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>It is often the case that a library will need external resources. The | |||
| example given above described dependence on an external XML library. The | |||
| ant library thus needs a mechanism via which to declare dependencies on | |||
| external libraries.</p> | |||
| <p>Ant2 uses the "Optional Package" mechanism. Prior to JDK1.3, an "Optional | |||
| Package" was known as an <em>Extension</em>. The specification for this | |||
| mechanism is available in the JDK1.3 documentation in the directory | |||
| <code>$JDK_HOME/docs/guide/extensions/versioning.html</code>. Alternatively | |||
| it is available online at | |||
| <a href="http://java.sun.com/j2se/1.3/docs/guide/extensions/versioning.html"> | |||
| http://java.sun.com/j2se/1.3/docs/guide/extensions/versioning.html</a>.</p> | |||
| <p>This mechanism was adopted as it is an established standard. The standard | |||
| is also begining to be adopted by other specifications such as the <em>Servlet | |||
| 2.3 API</em>. Thus we are likely to see an increase of jars using this mechanism | |||
| to specify dependencies.</p> | |||
| <p>The "Optional Package" mechanism allows jars to specify dependencies on other | |||
| jars that implement a particular specification at particular version levels. For | |||
| example you could specify a dependency on the Trax 1.1 API by adding the following | |||
| to the manifest of your jar.</p> | |||
| <div align="left"> | |||
| <table cellspacing="4" cellpadding="0" border="0"> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#ffffff"><pre> | |||
| Extension-List: trax | |||
| trax-Extension-Name: Java API for XML Parsing | |||
| trax-Specification-Version: 1.1 | |||
| </pre></td> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| </table> | |||
| </div> | |||
| <p>In some cases you may also wish to specify a dependency on a specific vendors | |||
| implementation. For instance you may need to use xalan due to it implementing a | |||
| particular extension you need. In that case you manifest may contain;</p> | |||
| <div align="left"> | |||
| <table cellspacing="4" cellpadding="0" border="0"> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#ffffff"><pre> | |||
| Extension-List: trax | |||
| trax-Extension-Name: Java API for XML Parsing | |||
| trax-Specification-Version: 1.1 | |||
| trax-Implementation-Title: org.apache.xalan.xslt | |||
| trax-Implementation-Version: 2.1.0 | |||
| trax-Implementation-Vendor: Apache Software Foundation | |||
| </pre></td> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| </table> | |||
| </div> | |||
| <p>In many cases there will be no distinction between the specification and | |||
| the implementation of a library. For instance the Velocity project only has | |||
| one implementation and one specification. In which case it is sufficient to | |||
| just declare a dependency on the Velocity "Specification". A library that uses | |||
| both the Trax API and the Velocity project may look like;</p> | |||
| <div align="left"> | |||
| <table cellspacing="4" cellpadding="0" border="0"> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#ffffff"><pre> | |||
| Extension-List: trax velocity | |||
| velocity-Extension-Name: org.apache.velocity | |||
| velocity-Specification-Version: 1.0 | |||
| trax-Extension-Name: Java API for XML Parsing | |||
| trax-Specification-Version: 1.1 | |||
| trax-Implementation-Title: org.apache.xalan.xslt | |||
| trax-Implementation-Version: 2.1.0 | |||
| trax-Implementation-Vendor: Apache Software Foundation | |||
| </pre></td> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| </table> | |||
| </div> | |||
| <p>To make other jars available to Ant librarys as "Optional Packages" | |||
| or Extensions then you need to add a few lines to the manifest of the | |||
| other jar. The minimal manifest is the following;</p> | |||
| <div align="left"> | |||
| <table cellspacing="4" cellpadding="0" border="0"> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#ffffff"><pre> | |||
| Extension-Name: org.realityforge.dve | |||
| Specification-Vendor: Peter Donald | |||
| Specification-Version: 1.0 | |||
| </pre></td> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| </table> | |||
| </div> | |||
| <p>It is important to note that looking for dependencies is recursive. For example, | |||
| if the ant library depends upon jar A and and A depends on B then both A and B will | |||
| need to be loaded by the container.</p> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#828DA6"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| <a name="Implementation Notes"><strong>Implementation Notes</strong></a> | |||
| </font> | |||
| </td></tr> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>So far there has been no mention of implementation strategies for | |||
| managing ClassLoaders and other details about where the "Optional Packages" | |||
| are stored. This section will outline such details but they could change | |||
| in the future. The above specification will still be accurate but the approach | |||
| to implementing specification will be different.</p> | |||
| <p>In the current architecture all of the "Optional Packages" are assumed to | |||
| be stored in the <code>$ANT_HOME/ext</code> directory. The runtime will scan | |||
| this directory for jars and add all the "optional Packages" found into a | |||
| registry. This registry will be used by the library loading mechanism to locate | |||
| all the "Optional Packages". The user is able to specify an alternative directory | |||
| or add a new directory to search on the commandline.</p> | |||
| <p>When the container attempts to load an ant library it will also try to load | |||
| any needed dependencies. First it will check the parent ClassLoaders to see if any | |||
| of them contain the required dependencies. If not then it will search the | |||
| "Optional Packages" registry. If the dependency is not found then a error will be | |||
| signaled. If the dependency is found in the "Optional Packages" registry then it is | |||
| loaded by the same ClassLoader that is used to load the Ant library.</p> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| </td> | |||
| </tr> | |||
| <!-- FOOTER --> | |||
| <tr><td colspan="2"> | |||
| <hr noshade="" size="1"/> | |||
| </td></tr> | |||
| <tr><td colspan="2"> | |||
| <div align="center"><font color="#525D76" size="-1"><em> | |||
| Copyright © 2000-2002, Apache Software Foundation | |||
| </em></font></div> | |||
| </td></tr> | |||
| </table> | |||
| </body> | |||
| </html> | |||
| <!-- end the processing --> | |||
| @@ -18,10 +18,12 @@ | |||
| <table border="0" width="100%" cellspacing="0"> | |||
| <!-- TOP IMAGE --> | |||
| <tr> | |||
| <td colspan="2"> | |||
| <td> <td colspan="2"> | |||
| <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" align="left" border="0"/></a> | |||
| </td> | |||
| </tr> | |||
| </td> | |||
| <td valign="bottom"><div align="right"><b><font size="+3" color="#525D76">Apache Myrmidon</font></b></div></td> | |||
| </tr> | |||
| </table> | |||
| <table border="0" width="100%" cellspacing="4"> | |||
| <tr><td colspan="2"> | |||
| @@ -35,39 +37,35 @@ | |||
| <ul> | |||
| <li> <a href="./index.html">Introduction</a> | |||
| </li> | |||
| <li> <a href="./user.html">User Guide</a> | |||
| <li> <a href="./getinvolved.html">Get Involved</a> | |||
| </li> | |||
| <li> <a href="./user.html">Building Myrmidon</a> | |||
| </li> | |||
| <li> <a href="./todo.html">Get Involved</a> | |||
| <li> <a href="./todo.html">Todo List</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>User Guide</strong></p> | |||
| <ul> | |||
| <li> <a href="./buildfile.html">Build file</a> | |||
| </li> | |||
| <li> <a href="./todo.html#Todo List">Todo List</a> | |||
| <li> <a href="./vfs.html">Virtual File System</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>Extending Ant</strong></p> | |||
| <ul> | |||
| <li> <a href="./task.html">Task Writers HOWTO</a> | |||
| </li> | |||
| <li> <a href="./classloader.html">ClassLoader HOWTO</a> | |||
| </li> | |||
| <li> <a href="./librarys.html">Library HOWTO</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>Container Design</strong></p> | |||
| <ul> | |||
| </ul> | |||
| </td> | |||
| <td align="left" valign="top"> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#525D76"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| <a name="Get Involved"><strong>Get Involved</strong></a> | |||
| </font> | |||
| </td></tr> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>There are plenty of things you can do to help out with Myrmidon. The Todo | |||
| list below describes items which still need to be done. Of course, since | |||
| this is an open-source project, there's plenty of scope for experimentation, | |||
| and you can pretty much make up your own items to work on.</p> | |||
| <p>Some things that are worth reading if you do want to get involved:</p> | |||
| <ul> | |||
| <li>The <a href="http://jakarta.apache.org/ant/ant2/">Ant 2</a> goals and requirements.</li> | |||
| <li>The <a href="http://jakarta.apache.org/ant/ant2/actionlist.html">Ant 1.9 Action List</a>.</li> | |||
| <li>The Jakarta Project's <a href="http://jakarta.apache.org/site/getinvolved.html">Get Involved</a> page.</li> | |||
| </ul> | |||
| <p>There is no Ant 2 or Myrmidon mailing list yet, so direct any questions | |||
| or comments you have to the ant-dev mailing list.</p> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#525D76"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| <a name="Todo List"><strong>Todo List</strong></a> | |||
| @@ -76,9 +74,9 @@ or comments you have to the ant-dev mailing list.</p> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>The broad goal is to grow Myrmidon from a prototype task engine into a fully | |||
| fledged build system, that can serve as the basis for Ant 2. The following | |||
| sections describe some of the many things which still need to be done to | |||
| achieve that goal. This list is currently under construction.</p> | |||
| fledged build system, that can serve as the basis for Ant 2. The following | |||
| sections describe some of the many things which still need to be done to | |||
| achieve that goal. This list is currently under construction.</p> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#828DA6"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| @@ -88,10 +86,10 @@ achieve that goal. This list is currently under construction.</p> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>Myrmidon must be able to build itself. Currently, it is built using | |||
| Ant 1.x. Ultimately, Myrmidon should be able to build itself from exactly the | |||
| same build file. To start with, however, there is no need for Myrmidon to be | |||
| able to do this. Myrmidon should also be able to be bootstrapped (that is, be | |||
| able to be built from scratch, without using Ant 1.x at all).</p> | |||
| Ant 1.x. Ultimately, Myrmidon should be able to build itself from exactly the | |||
| same build file. To start with, however, there is no need for Myrmidon to be | |||
| able to do this. Myrmidon should also be able to be bootstrapped (that is, be | |||
| able to be built from scratch, without using Ant 1.x at all).</p> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| @@ -104,8 +102,8 @@ able to be built from scratch, without using Ant 1.x at all).</p> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>There are 2 parts to this broad topic: Allow Ant 1.x build scripts to be | |||
| executed by Myrmidon, and allow Ant 1.x tasks to be executed unmodified | |||
| by Myrmidon.</p> | |||
| executed by Myrmidon, and allow Ant 1.x tasks to be executed unmodified | |||
| by Myrmidon.</p> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| @@ -119,21 +117,21 @@ by Myrmidon.</p> | |||
| <blockquote> | |||
| <p>The VFS needs plenty of work:</p> | |||
| <ul> | |||
| <li>Move and copy files/folders.</li> | |||
| <li>Search through a file hierarchy, using Ant-style wildcards.</li> | |||
| <li>Search through a file hierarchy, using a Selector interface.</li> | |||
| <li>The in-memory caching mechanism is pretty rudimentary at this stage. | |||
| It needs work to make it size capped. In addition, some mechanism needs | |||
| to be provided to release and refresh cached info. | |||
| </li> | |||
| <li>Capabilities discovery.</li> | |||
| <li>Attributes and attribute schema.</li> | |||
| <li>File system layering. That is, the ability for a file system to | |||
| sit on top of another file system, or a file from another file system | |||
| (e.g. Zip/Jar/Tar file systems, gzip/encoding file systems, virtual file | |||
| systems). | |||
| </li> | |||
| </ul> | |||
| <li>Move and copy files/folders.</li> | |||
| <li>Search through a file hierarchy, using Ant-style wildcards.</li> | |||
| <li>Search through a file hierarchy, using a Selector interface.</li> | |||
| <li>The in-memory caching mechanism is pretty rudimentary at this stage. | |||
| It needs work to make it size capped. In addition, some mechanism needs | |||
| to be provided to release and refresh cached info. | |||
| </li> | |||
| <li>Capabilities discovery.</li> | |||
| <li>Attributes and attribute schema.</li> | |||
| <li>File system layering. That is, the ability for a file system to | |||
| sit on top of another file system, or a file from another file system | |||
| (e.g. Zip/Jar/Tar file systems, gzip/encoding file systems, virtual file | |||
| systems). | |||
| </li> | |||
| </ul> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| @@ -146,72 +144,72 @@ by Myrmidon.</p> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>The file data-types, such as <code><fileset></code> and | |||
| <code><path></code>, are some of the most widely used parts of Ant 1.x. | |||
| Unfortunately, they aren't particularly extensible.</p> | |||
| <code><path></code>, are some of the most widely used parts of Ant 1.x. | |||
| Unfortunately, they aren't particularly extensible.</p> | |||
| <ul> | |||
| <li>Redesign the file data-types, replacing them with an interface-based | |||
| API, plus a set of implementations. The API should use the VFS file | |||
| <code>FileObject</code>, rather than <code>java.io.File</code>. | |||
| This process has started, in the <code>antlib.vfile</code> package. | |||
| </li> | |||
| <li>File Selectors: | |||
| <ul> | |||
| <li>Change <code>AbstractNameFileSelector</code> to use Ant 1 style patterns | |||
| matches, rather than Globs patterns.</li> | |||
| <li>Add 'defaultexcludes' to <code>DefaultFileSet</code>. Also add a | |||
| file selector implementation that matches everything except the default | |||
| excludes.</li> | |||
| <li>Add a condition -> file selector adaptor, so that arbitrary conditions | |||
| can be used to select files.</li> | |||
| <li>Add a name selector that loads patterns from a file.</li> | |||
| <li>Add more selector implementations: size and last-modified comparisons, | |||
| checksum comparison, byte-wise content comparison.</li> | |||
| </ul></li> | |||
| <li>File Name Mappers: | |||
| <ul> | |||
| <li>Add a file name mapper interface, and port the current Mapper | |||
| implementations to it.</li> | |||
| </ul></li> | |||
| <li>File Sets: | |||
| <ul> | |||
| <li>Add a file set implementation that uses a mapper to transform a nested | |||
| file set.</li> | |||
| <li>Add a file set implementation that provides the union of several | |||
| nested file sets (that is, a file set that merges several file sets | |||
| together).</li> | |||
| <li>Add a file set implementation that filters files that are up-to-date | |||
| WRT some other file. Alternatively, this might be better done using a | |||
| file selector.</li> | |||
| </ul></li> | |||
| <li>Paths: | |||
| <ul> | |||
| <li>Add path implementations that evaluate to the system classpath, | |||
| and the ant runtime classpath. Or, more generally, combine this with | |||
| <code>ClassLoaderManager</code> to evaluate to the classpath of any | |||
| 'library' (e.g. system classpath, ant runtime, tools.jar, | |||
| an antlib, an installed extension, or the system classes of another JVM | |||
| for cross-compiling).</li> | |||
| </ul></li> | |||
| <li>File Filters: | |||
| <ul> | |||
| <li>Add a file filter interface, and use it in the copy task.</li> | |||
| <li>Add a filter implementation that applies the token replacement that | |||
| the old copy task provides.</li> | |||
| <li>Add a filter that does cr/lf translation.</li> | |||
| <li>Add a gzip/gunzip filter.</li> | |||
| <li>Add a filter that applies character set encode/decode.</li> | |||
| </ul></li> | |||
| <li>Copy task: | |||
| <ul> | |||
| <li>Implement 'preservelastmodified', 'overwrite', and 'includeemptydirs'.</li> | |||
| <li>Support a file name mapper.</li> | |||
| <li>Support file filters.</li> | |||
| </ul></li> | |||
| <li>Implement the <code><move></code>, <code><delete></code>, | |||
| <code><touch></code> and <code><mkdir></code> tasks on top | |||
| of the VFS and the new file data-types. Might be some scope for generalising | |||
| 'touch' and 'mkdir' into a single task.</li> | |||
| </ul> | |||
| <li>Redesign the file data-types, replacing them with an interface-based | |||
| API, plus a set of implementations. The API should use the VFS file | |||
| <code>FileObject</code>, rather than <code>java.io.File</code>. | |||
| This process has started, in the <code>antlib.vfile</code> package. | |||
| </li> | |||
| <li>File Selectors: | |||
| <ul> | |||
| <li>Change <code>AbstractNameFileSelector</code> to use Ant 1 style patterns | |||
| matches, rather than Globs patterns.</li> | |||
| <li>Add 'defaultexcludes' to <code>DefaultFileSet</code>. Also add a | |||
| file selector implementation that matches everything except the default | |||
| excludes.</li> | |||
| <li>Add a condition -> file selector adaptor, so that arbitrary conditions | |||
| can be used to select files.</li> | |||
| <li>Add a name selector that loads patterns from a file.</li> | |||
| <li>Add more selector implementations: size and last-modified comparisons, | |||
| checksum comparison, byte-wise content comparison.</li> | |||
| </ul></li> | |||
| <li>File Name Mappers: | |||
| <ul> | |||
| <li>Add a file name mapper interface, and port the current Mapper | |||
| implementations to it.</li> | |||
| </ul></li> | |||
| <li>File Sets: | |||
| <ul> | |||
| <li>Add a file set implementation that uses a mapper to transform a nested | |||
| file set.</li> | |||
| <li>Add a file set implementation that provides the union of several | |||
| nested file sets (that is, a file set that merges several file sets | |||
| together).</li> | |||
| <li>Add a file set implementation that filters files that are up-to-date | |||
| WRT some other file. Alternatively, this might be better done using a | |||
| file selector.</li> | |||
| </ul></li> | |||
| <li>Paths: | |||
| <ul> | |||
| <li>Add path implementations that evaluate to the system classpath, | |||
| and the ant runtime classpath. Or, more generally, combine this with | |||
| <code>ClassLoaderManager</code> to evaluate to the classpath of any | |||
| 'library' (e.g. system classpath, ant runtime, tools.jar, | |||
| an antlib, an installed extension, or the system classes of another JVM | |||
| for cross-compiling).</li> | |||
| </ul></li> | |||
| <li>File Filters: | |||
| <ul> | |||
| <li>Add a file filter interface, and use it in the copy task.</li> | |||
| <li>Add a filter implementation that applies the token replacement that | |||
| the old copy task provides.</li> | |||
| <li>Add a filter that does cr/lf translation.</li> | |||
| <li>Add a gzip/gunzip filter.</li> | |||
| <li>Add a filter that applies character set encode/decode.</li> | |||
| </ul></li> | |||
| <li>Copy task: | |||
| <ul> | |||
| <li>Implement 'preservelastmodified', 'overwrite', and 'includeemptydirs'.</li> | |||
| <li>Support a file name mapper.</li> | |||
| <li>Support file filters.</li> | |||
| </ul></li> | |||
| <li>Implement the <code><move></code>, <code><delete></code>, | |||
| <code><touch></code> and <code><mkdir></code> tasks on top | |||
| of the VFS and the new file data-types. Might be some scope for generalising | |||
| 'touch' and 'mkdir' into a single task.</li> | |||
| </ul> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| @@ -224,26 +222,26 @@ Unfortunately, they aren't particularly extensible.</p> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>One of the goals of Ant 2 is to allow the user to easily customise and | |||
| extend Ant. The command-line and local configuration files, are two places | |||
| where this would be done. Currently, Myrmidon some customisation from the | |||
| command-line, but does not support configuration files.</p> | |||
| extend Ant. The command-line and local configuration files, are two places | |||
| where this would be done. Currently, Myrmidon some customisation from the | |||
| command-line, but does not support configuration files.</p> | |||
| <ul> | |||
| <li>Load configuration from system (from $ANT_HOME) and user (from $HOME) | |||
| configuration files.</li> | |||
| <li>Load configuration from system (from $ANT_HOME) and user (from $HOME) | |||
| configuration files.</li> | |||
| <li>Allow the following via config files: | |||
| <ul> | |||
| <li>Add (or override) the <code>lib</code> and <code>ext</code> directories.</li> | |||
| <li>Enable more than one listener, and configure the listeners from | |||
| the conents of the config file.</li> | |||
| <li>Import libraries, and set properties.</li> | |||
| <li>Execute tasks.</li> | |||
| <li>Install and configure runtime services.</li> | |||
| </ul> | |||
| </li> | |||
| <li>Allow the following via config files: | |||
| <ul> | |||
| <li>Add (or override) the <code>lib</code> and <code>ext</code> directories.</li> | |||
| <li>Enable more than one listener, and configure the listeners from | |||
| the conents of the config file.</li> | |||
| <li>Import libraries, and set properties.</li> | |||
| <li>Execute tasks.</li> | |||
| <li>Install and configure runtime services.</li> | |||
| </ul> | |||
| </li> | |||
| </ul> | |||
| </ul> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| @@ -256,23 +254,23 @@ configuration files.</li> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>Everyone loves writing documentation, and so a goal for Ant 2 is to | |||
| generate a lot of reference documentation for tasks and other types directly | |||
| from the source. Unfortunately, there's still plenty of tutorial material | |||
| to write. In particular we need these:</p> | |||
| generate a lot of reference documentation for tasks and other types directly | |||
| from the source. Unfortunately, there's still plenty of tutorial material | |||
| to write. In particular we need these:</p> | |||
| <ul> | |||
| <li>User documentation - describing things like the build file format, | |||
| how properties work, how to use references, how sub-builds work, how to customise | |||
| Myrmidon, and so on.</li> | |||
| <li>User documentation - describing things like the build file format, | |||
| how properties work, how to use references, how sub-builds work, how to customise | |||
| Myrmidon, and so on.</li> | |||
| <li>Task writer documentation - describing things like an overview the task API, | |||
| how configuration works, task lifecycle, how to assemble an antlib, a catalog | |||
| of the runtime services, and so on.</li> | |||
| <li>Task writer documentation - describing things like an overview the task API, | |||
| how configuration works, task lifecycle, how to assemble an antlib, a catalog | |||
| of the runtime services, and so on.</li> | |||
| <li>Myrmidon developer documentation - a broad outline of the architecture, | |||
| how to build, how to test, and so on. Also, this todo list needs plenty | |||
| of filling out.</li> | |||
| <li>Myrmidon developer documentation - a broad outline of the architecture, | |||
| how to build, how to test, and so on. Also, this todo list needs plenty | |||
| of filling out.</li> | |||
| </ul> | |||
| </ul> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| @@ -286,32 +284,32 @@ of filling out.</li> | |||
| <blockquote> | |||
| <p>A completely unordered list of items, big and small:</p> | |||
| <ul> | |||
| <li>Search through the code for 'TODO' items and fix them.</li> | |||
| <li>Add a custom task to the build to generate antlib descriptors from source. | |||
| It would wrap XDoclet, and replace <code>antlib.xml</code>.</li> | |||
| <li>Tidy-up CLIMain so that it calls System.exit() with a non-zero exit code, | |||
| if the build fails.</li> | |||
| <li>Tidy-up the 'build failed' message, so that the stack trace is only | |||
| printed out if the log level is verbose/debug.</li> | |||
| <li>Allow service factories to be configured from the contents of the | |||
| <code>ant-services.xml</code> descriptor.</li> | |||
| <li>Route external process stdout and stderr through the logger.</li> | |||
| <li>Add verbosity level to ProjectListener LogEvent</li> | |||
| <li>Fire ProjectListener events taskFinished(), targetFinished() and | |||
| projectFinished() events on build failure, adding indicator methods to | |||
| ProjectEvent.</li> | |||
| <li>Fire ProjectListener events projectStarted() and projectFinished() | |||
| events on start and finish of referenced projects, adding indicator methods | |||
| to ProjectEvent.</li> | |||
| <li>Convert PropertyUtil to a non-static PropertyResolver service.</li> | |||
| <li>Validate project and target names in DefaultProjectBuilder - reject dodgy | |||
| names like "," or "", or " ". Probably want to exclude names that start or | |||
| end with white-space (though internal whitespace is probably fine).</li> | |||
| <li>Detect duplicate type names.</li> | |||
| <li>Add fully qualified type names, based on antlib name and type shorthand name. | |||
| Allow these to be used in build files in addition to the shorthand names.</li> | |||
| <li>Unit tests.</li> | |||
| </ul> | |||
| <li>Search through the code for 'TODO' items and fix them.</li> | |||
| <li>Add a custom task to the build to generate antlib descriptors from source. | |||
| It would wrap XDoclet, and replace <code>antlib.xml</code>.</li> | |||
| <li>Tidy-up CLIMain so that it calls System.exit() with a non-zero exit code, | |||
| if the build fails.</li> | |||
| <li>Tidy-up the 'build failed' message, so that the stack trace is only | |||
| printed out if the log level is verbose/debug.</li> | |||
| <li>Allow service factories to be configured from the contents of the | |||
| <code>ant-services.xml</code> descriptor.</li> | |||
| <li>Route external process stdout and stderr through the logger.</li> | |||
| <li>Add verbosity level to ProjectListener LogEvent</li> | |||
| <li>Fire ProjectListener events taskFinished(), targetFinished() and | |||
| projectFinished() events on build failure, adding indicator methods to | |||
| ProjectEvent.</li> | |||
| <li>Fire ProjectListener events projectStarted() and projectFinished() | |||
| events on start and finish of referenced projects, adding indicator methods | |||
| to ProjectEvent.</li> | |||
| <li>Convert PropertyUtil to a non-static PropertyResolver service.</li> | |||
| <li>Validate project and target names in DefaultProjectBuilder - reject dodgy | |||
| names like "," or "", or " ". Probably want to exclude names that start or | |||
| end with white-space (though internal whitespace is probably fine).</li> | |||
| <li>Detect duplicate type names.</li> | |||
| <li>Add fully qualified type names, based on antlib name and type shorthand name. | |||
| Allow these to be used in build files in addition to the shorthand names.</li> | |||
| <li>Unit tests.</li> | |||
| </ul> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| @@ -0,0 +1,413 @@ | |||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |||
| <!-- Content Stylesheet for Site --> | |||
| <!-- start the processing --> | |||
| <html> | |||
| <head> | |||
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> | |||
| <meta name="author" value="Adam Murdoch"> | |||
| <meta name="email" value="adammurdoch@apache.org"> | |||
| <title>Apache Myrmidon - VFS User Guide</title> | |||
| </head> | |||
| <body bgcolor="#ffffff" text="#000000" link="#525D76"> | |||
| <table border="0" width="100%" cellspacing="0"> | |||
| <!-- TOP IMAGE --> | |||
| <tr> | |||
| <td> <td colspan="2"> | |||
| <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" align="left" border="0"/></a> | |||
| </td> | |||
| </td> | |||
| <td valign="bottom"><div align="right"><b><font size="+3" color="#525D76">Apache Myrmidon</font></b></div></td> | |||
| </tr> | |||
| </table> | |||
| <table border="0" width="100%" cellspacing="4"> | |||
| <tr><td colspan="2"> | |||
| <hr noshade="" size="1"/> | |||
| </td></tr> | |||
| <tr> | |||
| <!-- LEFT SIDE NAVIGATION --> | |||
| <td valign="top" nowrap="true"> | |||
| <p><strong>Myrmidon</strong></p> | |||
| <ul> | |||
| <li> <a href="./index.html">Introduction</a> | |||
| </li> | |||
| <li> <a href="./getinvolved.html">Get Involved</a> | |||
| </li> | |||
| <li> <a href="./user.html">Building Myrmidon</a> | |||
| </li> | |||
| <li> <a href="./todo.html">Todo List</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>User Guide</strong></p> | |||
| <ul> | |||
| <li> <a href="./buildfile.html">Build file</a> | |||
| </li> | |||
| <li> <a href="./vfs.html">Virtual File System</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>Extending Ant</strong></p> | |||
| <ul> | |||
| <li> <a href="./task.html">Task Writers HOWTO</a> | |||
| </li> | |||
| <li> <a href="./classloader.html">ClassLoader HOWTO</a> | |||
| </li> | |||
| <li> <a href="./librarys.html">Library HOWTO</a> | |||
| </li> | |||
| </ul> | |||
| <p><strong>Container Design</strong></p> | |||
| <ul> | |||
| </ul> | |||
| </td> | |||
| <td align="left" valign="top"> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#525D76"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| <a name="Handling Files"><strong>Handling Files</strong></a> | |||
| </font> | |||
| </td></tr> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>Myrmidon includes a Virtual File System (VFS), which allows files from | |||
| different sources to be treated identically. The VFS currently supports | |||
| the following file types:</p> | |||
| <table> | |||
| <tr> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| File System | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Description | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| URL Format | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Local Files | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Files on the local file system. | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Three different formats are currently supported for local file names: | |||
| <ul> | |||
| <li><code>file://</code> <i>absolute-file-name</i></li> | |||
| <li>Absolute file names</li> | |||
| <li>Relative file names. These are resolved relative to the | |||
| project's base directory. | |||
| </li> | |||
| </ul> | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Zip Files | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| The contents of Zip files (and Jar, War, and Ear files). | |||
| Currently, the VFS supports read-only access to Zip file contents, | |||
| and only for local Zip files. | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| <code>zip://</code> <i>zip-file-path</i> [<code>!</code><i>absolute-path</i>] | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| FTP | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Files on an FTP server. | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| <code>ftp://</code> [[<i>password</i><code>:</code>] <i>username</i><code>@</code>] <i>hostname</i> [<code>:</code><i>port</i>] [<i>absolute-path</i>] | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| SMB | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Files on a CFIS server, such as Samba or Windows shares. | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| <code>smb://</code> [[<i>password</i><code>:</code>] <i>username</i><code>@</code>] <i>hostname</i> [<code>:</code><i>port</i>] [<i>absolute-path</i>] | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| <p>Here are some example URLs:</p> | |||
| <ul> | |||
| <li><code>build/classes</code></li> | |||
| <li><code>c:\program files\ant\bin</code></li> | |||
| <li><code>file://C:/program files/ant</code></li> | |||
| <li><code>zip://build/lib/ant.jar!/org/apache/tools</code></li> | |||
| <li><code>ftp://adam@somehost/pub/downloads</code></li> | |||
| <li><code>smb://password:adam@somehost/home/adam</code></li> | |||
| </ul> | |||
| <p>Currently, there are only a handful of VFS aware tasks. This will grow | |||
| as more tasks are ported to the new API, and data types.</p> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#828DA6"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| <a name="File Sets"><strong>File Sets</strong></a> | |||
| </font> | |||
| </td></tr> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>A file set in Myrmidon is more general than Ant 1's concept of a file set. | |||
| Firstly, there is more than one type of file set. Secondly, they are VFS enabled. | |||
| File sets are automatically converted to a <a href="#Paths">path</a>, and so | |||
| can be used anywhere that a path can.</p> | |||
| <h3><code><v-fileset></code></h3> | |||
| <p>This is the equivalent of Ant 1's <code><fileset></code> (The name | |||
| is temporary, it will be changed to <code><fileset></code> once more | |||
| porting work as been completed).</p> | |||
| <p>Rather than use a set of include and exclude patterns to choose the files | |||
| that make up the file set, <code><v-fileset></code> takes zero or more | |||
| <a href="#File Selectors">file selectors</a>. File selectors can be used to | |||
| select files based on any attribute of the file, rather than just the name. | |||
| You can use <code><name></code> selectors to achieve the same result | |||
| as using includes or excludes.</p> | |||
| <p>A <code><v-fileset></code> element takes the following attributes:</p> | |||
| <table> | |||
| <tr> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Attribute | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Description | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#039acc" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Default Value | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| dir | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| The base directory for the file set. This can be any URL that the | |||
| VFS supports. | |||
| </font> | |||
| </td> | |||
| <td bgcolor="#a0ddf0" colspan="" rowspan="" | |||
| valign="top" align="left"> | |||
| <font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||
| Required | |||
| </font> | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| <p>A <code><v-fileset></code> element takes any number of nested | |||
| <a href="#File Selectors">file selector</a> elements. To be included in the | |||
| file set, a file must be selected by all the file selectors. That is, the | |||
| file selectors are implicitly AND-ed together. If no file selector is provided, | |||
| all the files and directories are included in the set.</p> | |||
| <p>An example:</p> | |||
| <div align="left"> | |||
| <table cellspacing="4" cellpadding="0" border="0"> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#ffffff"><pre> | |||
| <v-fileset dir="src"> | |||
| <name pattern="org/apache/tools/ant/**"/> | |||
| <is-file/> | |||
| </v-fileset> | |||
| </pre></td> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| </table> | |||
| </div> | |||
| <h3><code><flat-fileset></code></h3> | |||
| <p>This file set takes a set of nested file sets and paths, and flattens them | |||
| into a single directory. It can be used as a way of converting a path into a | |||
| file set. It can also be used as a replacement for the <code>flatten</code> | |||
| attribute for the copy and move tasks.</p> | |||
| <p>A <code><flat-fileset></code> element takes no attributes, and a set | |||
| of nested paths or file sets.</p> | |||
| <p>An example:</p> | |||
| <div align="left"> | |||
| <table cellspacing="4" cellpadding="0" border="0"> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#ffffff"><pre> | |||
| <v-copy todir="dist/lib"> | |||
| <flat-fileset> | |||
| <v-fileset dir="build/lib"> | |||
| <basename pattern="*.jar"/> | |||
| <v-fileset> | |||
| <v-path path="${classpath}"/> | |||
| </flat-fileset> | |||
| </v-copy> | |||
| </pre></td> | |||
| <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> | |||
| </tr> | |||
| </table> | |||
| </div> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#828DA6"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| <a name="Paths"><strong>Paths</strong></a> | |||
| </font> | |||
| </td></tr> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>Paths are an ordered list of files.</p> | |||
| <h3><code><v-path></code></h3> | |||
| <p>This is the equivalent of Ant 1's <code><path></code>.</p> | |||
| <h3><code><filtered-path></code></h3> | |||
| <p>A path that applies file selectors to a set of nested file sets and paths.</p> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||
| <tr><td bgcolor="#828DA6"> | |||
| <font color="#ffffff" face="arial,helvetica,sanserif"> | |||
| <a name="File Selectors"><strong>File Selectors</strong></a> | |||
| </font> | |||
| </td></tr> | |||
| <tr><td> | |||
| <blockquote> | |||
| <p>File selectors are used to select files from file sets and paths.</p> | |||
| <h3><code><and></code></h3> | |||
| <p>Combines zero or more file selectors, using AND. An empty <code><and></code> | |||
| selector accepts all files.</p> | |||
| <h3><code><basename></code></h3> | |||
| <p>Selects files whose base name matches an Ant 1 style pattern, or a regular | |||
| expression.</p> | |||
| <h3><code><exists></code></h3> | |||
| <p>Selects files that exist.</p> | |||
| <h3><code><is-empty></code></h3> | |||
| <p>Selects empty folders, that is, folders that have no children.</p> | |||
| <h3><code><is-folder></code></h3> | |||
| <p>Selects folders, does not select regular files.</p> | |||
| <h3><code><is-file></code></h3> | |||
| <p>Selects regular files, does not select folders.</p> | |||
| <h3><code><name></code></h3> | |||
| <p>Selects files whose path in a file set matches an Ant 1 style pattern, or | |||
| a regular expression.</p> | |||
| <h3><code><not></code></h3> | |||
| <p>Selects files that are not selected by a nested file selector.</p> | |||
| <h3><code><or></code></h3> | |||
| <p>Combines zero or more file selectors, using OR. An empty <code><or></code> | |||
| selector accepts all files.</p> | |||
| <h3><code><url></code></h3> | |||
| <p>Selects files whose URL matches an Ant 1 style pattern, or a regular expression.</p> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| </blockquote> | |||
| </td></tr> | |||
| </table> | |||
| </td> | |||
| </tr> | |||
| <!-- FOOTER --> | |||
| <tr><td colspan="2"> | |||
| <hr noshade="" size="1"/> | |||
| </td></tr> | |||
| <tr><td colspan="2"> | |||
| <div align="center"><font color="#525D76" size="-1"><em> | |||
| Copyright © 2000-2002, Apache Software Foundation | |||
| </em></font></div> | |||
| </td></tr> | |||
| </table> | |||
| </body> | |||
| </html> | |||
| <!-- end the processing --> | |||