git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272349 13f79535-47bb-0310-9956-ffa450edef68master
@@ -749,26 +749,6 @@ Legal: | |||||
style="${ant.home}/etc/jdepend-frames.xsl"/> | style="${ant.home}/etc/jdepend-frames.xsl"/> | ||||
</target> | </target> | ||||
<target name="docs" description="Generate documentation and website"> | |||||
<taskdef name="anakia" | |||||
classname="org.apache.velocity.anakia.AnakiaTask"> | |||||
<classpath> | |||||
<fileset dir="${jakarta-site.dir}/lib"> | |||||
<include name="*.jar"/> | |||||
</fileset> | |||||
</classpath> | |||||
</taskdef> | |||||
<anakia basedir="src/xdocs" | |||||
destdir="docs" | |||||
style="docs.vsl" | |||||
projectfile="stylesheets/project.xml" | |||||
includes="**/*.xml" | |||||
excludes="stylesheets/**" | |||||
velocitypropertiesfile="src/xdocs/velocity.properties" | |||||
/> | |||||
</target> | |||||
<target name="javadoc" description="Generates the API docs."> | <target name="javadoc" description="Generates the API docs."> | ||||
<property name="build.apidocs" value="${build.dir}/apidocs"/> | <property name="build.apidocs" value="${build.dir}/apidocs"/> | ||||
<mkdir dir="${build.apidocs}"/> | <mkdir dir="${build.apidocs}"/> | ||||
@@ -1,231 +0,0 @@ | |||||
<!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="Darrell DeBoer"> | |||||
<meta name="email" value="darrell at apache dot org"> | |||||
<title>Apache Myrmidon - Ant 1 Compatibitlity Layer</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">Project File</a> | |||||
</li> | |||||
<li> <a href="./vfs.html">Virtual File System</a> | |||||
</li> | |||||
<li> <a href="./ant1compat.html">Ant 1 Compatibility Layer</a> | |||||
</li> | |||||
<li> <a href="./differences.html">Differences to Ant 1</a> | |||||
</li> | |||||
<li> <a href="./task.html">My First Task</a> | |||||
</li> | |||||
</ul> | |||||
<p><strong>Extending Ant</strong></p> | |||||
<ul> | |||||
<li> <a href="./configuring.html">Configuration HOWTO</a> | |||||
</li> | |||||
<li> <a href="./converter.html">Converter HOWTO</a> | |||||
</li> | |||||
<li> <a href="./type.html">Type 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="Overview"><strong>Overview</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p> | |||||
The Myrmidon-Ant1 Compatibility layer works by reusing most of the Ant 1 code, | |||||
with tasks and datatypes | |||||
being prefixed with "ant1." in build files. Almost all of the main Ant 1 tree | |||||
is included in the compatibility layer antlib. To insulate from changes in | |||||
the Ant 1 tree, Ant 1 class files are extracted from a jar, rather than | |||||
being compiled from scratch. | |||||
</p> | |||||
<p> | |||||
Here's how it works: The first time an Ant 1 task is encountered, an Ant 1 | |||||
project is created, and stored in the TaskContext under the name "ant1.project". | |||||
The Ant 1 versions of Task and Project have been extended, overriding core behaviour, | |||||
with Myrmidon-specific behaviour. | |||||
</p> | |||||
<p> | |||||
The updated version of Task implements Configurable, receiving it's | |||||
complete Task Model, and actually setting/adding/creating attributes | |||||
with the help of the IntrospectionHelper. This process is designed to | |||||
mimic the Ant 1 configuration policy, although not <i>all</i> of the | |||||
subtle variations of configuration present in Ant 1 are handled. | |||||
</p> | |||||
<p> | |||||
The updated version of Project will provide hooks into the Myrmidon TaskContext, | |||||
such as:</p> | |||||
<ul> | |||||
<li>logging (done)</li> | |||||
<li>properties (done)</li> | |||||
<li>references (not yet done)</li> | |||||
<li>Task defined by <taskdef> (done)</li> | |||||
</ul> | |||||
<p> | |||||
So at present, properties declared in Ant 2 tasks are available to all Ant 1 tasks, | |||||
and vice-versa. However, while a <code><ant1.path></code> reference works fine | |||||
in other <code><ant1.XXX></code> | |||||
tasks, it's not visible to Ant 2 tasks in the same build, and vice-versa. | |||||
</p> | |||||
<p> | |||||
The <code><taskdef></code> task works ok, registering the task with the TypeManager using the | |||||
"ant1." prefix. Only a couple of DataTypes (Path and Patternset) are working | |||||
as top-level types, but this should be just a matter of adding references to | |||||
the Ant 1 version of TypeInstanceTask in the descriptor. | |||||
</p> | |||||
<p> | |||||
The TransformingProjectBuilder (which is now the default builder for files | |||||
of type ".xml", applies a transformation stylesheet to the file, prefixing select | |||||
tasks (all at present) with "ant.". If a version attribute is encountered, the | |||||
file is not transformed | |||||
</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="Using the compatibility layer"><strong>Using the compatibility layer</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||||
<tr><td bgcolor="#828DA6"> | |||||
<font color="#ffffff" face="arial,helvetica,sanserif"> | |||||
<a name="Using Ant 1 tasks in a Myrmidon build file"><strong>Using Ant 1 tasks in a Myrmidon build file</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p> | |||||
If you have a Myrmidon build file (eg with <code>version="2.0"</code> | |||||
on the project element, you can use Ant 1 tasks and datatypes by using | |||||
the "ant1." suffix on the regular element name. | |||||
Virtually <i>all</i> tasks and datatypes from Ant 1.4.1 are available | |||||
in this way. | |||||
</p> | |||||
<p> | |||||
When declaring a new task using the <code><ant1.taskdef></code> | |||||
task, <i>don't</i> prepend "ant1." to the taskname. This will be | |||||
done automatically by the taskdef task. However, you will need | |||||
to use the "ant1." prefix in all uses of that task. | |||||
</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="Using an existing Ant 1 build file"><strong>Using an existing Ant 1 build file</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p> | |||||
Myrmidon will automatically handle Ant 1 build files using the | |||||
Ant 1 Compatibility layer. So, using an Ant 1 build | |||||
file with Myrmidon should be as simple as:</p> | |||||
<pre>[myrmidon-command] -f ant1-build-file.xml</pre> | |||||
<p> | |||||
This works as follows: When Myrmidon encounters a ".xml" build file which does not have a | |||||
<code>version</code> attribute on the top-level <code>project</code> | |||||
element, it assumes that it is an Ant 1 build file. So all tasks are | |||||
interpreted as though they are prefixed with the "ant." name prefix. | |||||
</p> | |||||
</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="Building the compatibility layer"><strong>Building the compatibility layer</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Before building the Ant 1 Compatibility layer, you need to build | |||||
Myrmidon, running the <code>dist-lite</code> target of the main build. | |||||
See <a href="user.html#Building Myrmidon">the build instructions</a> | |||||
for more details.</p> | |||||
<p>To build the compatibility layer, simply execute:</p> | |||||
<pre>ant -f ant1compat.xml</pre> | |||||
<p>from within the root directory of the Myrmidon source tree.</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 --> | |||||
@@ -1,685 +0,0 @@ | |||||
<!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">Project File</a> | |||||
</li> | |||||
<li> <a href="./vfs.html">Virtual File System</a> | |||||
</li> | |||||
<li> <a href="./ant1compat.html">Ant 1 Compatibility Layer</a> | |||||
</li> | |||||
<li> <a href="./differences.html">Differences to Ant 1</a> | |||||
</li> | |||||
<li> <a href="./task.html">My First Task</a> | |||||
</li> | |||||
</ul> | |||||
<p><strong>Extending Ant</strong></p> | |||||
<ul> | |||||
<li> <a href="./configuring.html">Configuration HOWTO</a> | |||||
</li> | |||||
<li> <a href="./converter.html">Converter HOWTO</a> | |||||
</li> | |||||
<li> <a href="./type.html">Type 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> | |||||
A project file is an XML file that describes which tasks to execute, and in | |||||
which order to execute them in. A project can be broken up into several steps, | |||||
or <i>targets</i>. A target is simply a list of the tasks that need to be | |||||
executed to perform the step. A target may also include some dependency | |||||
information. Myrmidon makes sure that targets are executed in the correct order, | |||||
so that a target is executed before the targets that depend on it.</p> | |||||
<p>The project file format is very similar to the format used in Ant 1. The | |||||
root element of a 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 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 format 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-refs">Project references</a></li> | |||||
<li><a href="#antlib-imports">Library imports</a></li> | |||||
<li><a href="#init-tasks">Initialization tasks</a></li> | |||||
<li><a href="#targets">Targets</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-refs"><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 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="antlib-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="init-tasks"><strong>Initialization Tasks</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Initialisation tasks are run before any of the project's targets are run, and | |||||
are used to initialise the project. Any task can be used as an initialization | |||||
task, including <code><property></code> and data-type instances. 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> | |||||
<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 a similar format to targets 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> | |||||
</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> | |||||
Listed below are 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> | |||||
<h3><code><condition></code></h3> | |||||
<p>Sets a property if a particular condition is true. See | |||||
<a href="#Conditions">Conditions</a> for a list of available conditions.</p> | |||||
<h3><code><fail></code></h3> | |||||
<p>Causes the build to fail.</p> | |||||
<h3><code><if></code></h3> | |||||
<p>Conditionally executes a set of tasks.</p> | |||||
<h3><code><load-properties></code></h3> | |||||
<p>Loads a set of properties from a file.</p> | |||||
<h3><code><log></code></h3> | |||||
<p>Writes a log message.</p> | |||||
<h3><code><property></code></h3> | |||||
<p>Sets a property.</p> | |||||
<h3><code><try-catch></code></h3> | |||||
<p>Runs a set of tasks, with a provided error and clean-up handler.</p> | |||||
<h3><code><converter-def></code></h3> | |||||
<p>Register a type converter. These are used when configuring a task | |||||
or data-type from attributes.</p> | |||||
<h3><code><type-def></code></h3> | |||||
<p>Register a task or data-type.</p> | |||||
<h3><code><import></code></h3> | |||||
<p>Register the contents of an antlib.</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="Conditions"><strong>Conditions</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>The following conditions are available </p> | |||||
<h3><code><and></code></h3> | |||||
<p>Evaluates a set of nested conditions, and AND them together. Evaluation is | |||||
lazy. An empty <code><and></code> condition evaluates to true.</p> | |||||
<h3><code><available></code></h3> | |||||
<p>Tests if a particular class or resource is available.</p> | |||||
<h3><code><file-test></code></h3> | |||||
<p>Tests a file against a set of <a href="vfs.html#File Selectors">file selectors</a>.</p> | |||||
<h3><code><is-set></code></h3> | |||||
<p>Tests whether a proeprty is set, and not set to 'false'.</p> | |||||
<h3><code><or></code></h3> | |||||
<p>Evaluates a set of nested conditions, and OR them together. Evaluation is | |||||
lazy. An empty <code><or></code> evaluates to true.</p> | |||||
<h3><code><os></code></h3> | |||||
<p>Tests which operating system the build is running on.</p> | |||||
<h3><code><not></code></h3> | |||||
<p>Negates a nested condition.</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="File Name Mappers"><strong>File Name Mappers</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>The following file name mappers are available:</p> | |||||
<h3><code><chain></code></h3> | |||||
<p>Applies a set of nested file name mappers to file names.</p> | |||||
<h3><code><flatten></code></h3> | |||||
<p>Maps all file names to a single directory.</p> | |||||
<h3><code><prefix></code></h3> | |||||
<p>Adds a prefix to the front of each file name.</p> | |||||
<h3><code><map-extension></code></h3> | |||||
<p>Changes the extension of file names.</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 --> | |||||
@@ -1,241 +0,0 @@ | |||||
<!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 Ant 2</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">Project File</a> | |||||
</li> | |||||
<li> <a href="./vfs.html">Virtual File System</a> | |||||
</li> | |||||
<li> <a href="./ant1compat.html">Ant 1 Compatibility Layer</a> | |||||
</li> | |||||
<li> <a href="./differences.html">Differences to Ant 1</a> | |||||
</li> | |||||
<li> <a href="./task.html">My First Task</a> | |||||
</li> | |||||
</ul> | |||||
<p><strong>Extending Ant</strong></p> | |||||
<ul> | |||||
<li> <a href="./configuring.html">Configuration HOWTO</a> | |||||
</li> | |||||
<li> <a href="./converter.html">Converter HOWTO</a> | |||||
</li> | |||||
<li> <a href="./type.html">Type 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 Ant 2 needs to follow rules similar to a number of | |||||
different application servers with respect to ClassLoader management. | |||||
Ant 2 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 Ant 2 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 libraries. 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 Ant 2 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 libraries 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 libraries (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 --> | |||||
@@ -1,419 +0,0 @@ | |||||
<!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 Task Configuring in Ant 2</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">Project File</a> | |||||
</li> | |||||
<li> <a href="./vfs.html">Virtual File System</a> | |||||
</li> | |||||
<li> <a href="./ant1compat.html">Ant 1 Compatibility Layer</a> | |||||
</li> | |||||
<li> <a href="./differences.html">Differences to Ant 1</a> | |||||
</li> | |||||
<li> <a href="./task.html">My First Task</a> | |||||
</li> | |||||
</ul> | |||||
<p><strong>Extending Ant</strong></p> | |||||
<ul> | |||||
<li> <a href="./configuring.html">Configuration HOWTO</a> | |||||
</li> | |||||
<li> <a href="./converter.html">Converter HOWTO</a> | |||||
</li> | |||||
<li> <a href="./type.html">Type 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="Introduction"><strong>Introduction</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>This section will describe in detail the mechanism via which tasks are | |||||
configured. Configuration is the name given to the stage in tasks | |||||
lifecycle via which the XML representation is mapped onto the task | |||||
object.</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="Names"><strong>Names</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>When mapping the XML representation on to the task object you | |||||
need to be able map the names as they appear in the XML to the | |||||
names as they appear in the Java code. The process is for generating | |||||
a java name from the xml name is as follows.</p> | |||||
<ol> | |||||
<li>Capitalize the first character of name.</li> | |||||
<li>Find any '-' characters in XML name and remove character and | |||||
capitalize the following letter. (And there must be a following | |||||
letter)</li> | |||||
</ol> | |||||
<p>Some example mappings;</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> | |||||
my-name ===> MyName | |||||
aString ===> AString | |||||
Basedir ===> Basedir | |||||
baseDir ===> BaseDir | |||||
url ===> Url</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>Note that the above transformation is lossy and as such the | |||||
following XML names all map to the same Java name. The ant1.x mapping | |||||
is similarly lossy and in practice this has not been an issue.</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> | |||||
base-dir ===> BaseDir | |||||
Base-dir ===> BaseDir | |||||
baseDir ===> BaseDir | |||||
BaseDir ===> BaseDir</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><i>NOTE: We should really resolve this and either disallow '-' characters | |||||
or disallow uppercase or something. (PD)</i></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="Resolving Values"><strong>Resolving Values</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>The first stage of mapping the XML representation to the task | |||||
is resolving all text data. The text data that needs to be resolved | |||||
include the values of attributes and the content.</p> | |||||
<p>Resolution consists of expanding any property references in the text | |||||
data. Property references are identified as starting with the token | |||||
"${" and finishing with another "}" token. The text | |||||
in between is the name of a property. The value of the property replaces | |||||
the sequence of text starting with the "${" token and finishing | |||||
with the "}" token.</p> | |||||
<p>Note that the value of the property may not be a string. If the text data | |||||
contains text (or other property references) to either side of the property | |||||
reference then it must be <a href="converter.html">converted</a> to a | |||||
String.</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="Modeller"><strong>Modeller</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Currently the representation of object are stored in a hierarchial | |||||
tree of <code>org.apache.myrmidon.api.metadata.ModelElement</code> | |||||
objects. Each ModelElement has a number of attributes and can have | |||||
either content or sub-elements.</p> | |||||
<p>In most cases it is the responsibility of the runtime to map | |||||
the ModelElement onto an object. However in some cases it may be useful | |||||
for the object to get access to it's own model and for it to explicitly | |||||
manage it's own configuration. In this case the object should implement | |||||
the <code>org.apache.myrmidon.api.metadata.Modeller</code> interface | |||||
which will provide the mechanism for the object to receive its own | |||||
representation and configure itself.</p> | |||||
<p>Note that the Modeller mechanism should be avoided if possible | |||||
as it adds considerable complexity to the implementing object.</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="Attributes"><strong>Attributes</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>To map an XML attribute on to a Java object, the name of the | |||||
attribute is mapped to a java name and prefixed with the string | |||||
"set". The resulting string is then used to look up a | |||||
method with a single parameter.</p> | |||||
<p>For example, for the attribute "world" would result | |||||
in a lookup of a method named "setWorld" with a single | |||||
parameter.</p> | |||||
<p>If multiple methods were matched during the lookup then an | |||||
exception is thrown indicating ambiguity. Theres is an exception | |||||
to this rule that allows 2 methods to be matched if one of the | |||||
methods takes a <code>java.lang.String</code> parameter. The method | |||||
that has the <code>java.lang.String</code> parameter is ignored and | |||||
the other method would be chosen. This exception is allowed as it is | |||||
common practice for a task to evolve from String parameters to more | |||||
strongly typed parameters.</p> | |||||
<p>The resolved text data of the attribute must be | |||||
<a href="converter.html">converted</a> to the type of the matched | |||||
methods parameter. For example, if the "setWorld" method | |||||
took a parameter of type <code>java.io.File</code> then the resolved | |||||
text data must be converted into a <code>java.io.File</code>. The | |||||
conversion is done by the Converter architecture that is more fully | |||||
described in the <a href="converter.html">Converter HOWTO</a>.</p> | |||||
<p>After the value is converted to the correct type the method is | |||||
invoked with the converted value.</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="Content"><strong>Content</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>The XML representation of object can have either have nested | |||||
elements or nested text (content) but not both. To add the content | |||||
to an object a method named "content" with one parameter is looked | |||||
up. The resolved text data for content is then | |||||
<a href="converter.html">converted</a> to the type of the parameter | |||||
and passed in via the method.</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="Element"><strong>Element</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Mapping an ModelElement onto a java object is a series of steps. | |||||
If the ModelElement name ends with the string "-ref" then | |||||
it is treated as a reference element - see the <em>Referrenced | |||||
Elements</em> section. Otherwise, the element is first attempted to | |||||
be mapped as a <em>Named Element</em> and if no match is found via | |||||
that method it tries to treat the element as a <em>Typed Element</em>.</p> | |||||
<table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||||
<tr><td bgcolor="#828DA6"> | |||||
<font color="#ffffff" face="arial,helvetica,sanserif"> | |||||
<a name="Named Elements"><strong>Named Elements</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>To map a named ModelElement on to a Java object, the name of | |||||
the element is mapped to a java name and prefixed with the string | |||||
"add". The resulting string is then used to look up a | |||||
method with a single parameter.</p> | |||||
<p>For example, for the attribute "geometry" would result | |||||
in a lookup of a method named "addGeometry" with a single | |||||
parameter. If multiple methods were matched during the lookup then an | |||||
exception is thrown indicating ambiguity. If no methods were found that | |||||
match name then skip down to configuring "typed" elements.</p> | |||||
<p>The type of the methods single parameter is then examined to determine | |||||
what happens next. There are two valid situations, if neither of these are | |||||
satisfied, then an exception is thrown.</p> | |||||
<ul> | |||||
<li>The parameters type is <code>org.apache.myrmidon.api.metadata.ModelElement</code></li> | |||||
<li>The parameters type is a concrete class</li> | |||||
</ul> | |||||
<p>1. If the parameter has a type of <code>org.apache.myrmidon.api.metadata.ModelElement</code> | |||||
then the un-modified model representation of element is passed to object by invoking | |||||
the adder method.</p> | |||||
<p>2. If the parameters type is concrete then an instance of the parameter is | |||||
instantiated using the default constructor. This created object is then configured | |||||
in the same manner as task using the elements representation as the model. After | |||||
the object is configured it is passed into object by invoking the adder method.</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="Referrenced Elements"><strong>Referrenced Elements</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>A referenced element is one that has a name ending in | |||||
"-ref" and has a single attribute "name" | |||||
and no content or child elements.</p> | |||||
<p>The value of the "name" attribute is the name of a property. | |||||
The value of this property is retrieved from the TaskContext.</p> | |||||
<p>Like with <em>Named Elements</em> the name of the element (minus | |||||
the "-ref" part) is mapped to a java name and prefixed with the string | |||||
"add". The resulting string is then used to look up a | |||||
method with a single parameter. If multiple methods were matched during the lookup then an | |||||
exception is thrown indicating ambiguity.</p> | |||||
<p>The value retrieved from the TaskContext is then converted to the type | |||||
of the methods parameter and the add method is invoked with the converted value.</p> | |||||
<p>An example usage 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> | |||||
<my-task ...> | |||||
<classpath-ref name="project.class.path"/> | |||||
</my-task> | |||||
</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="Typed Elements"><strong>Typed Elements</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>"Typed" elements can also be added to an object. A typed element | |||||
is one in which the name of the element actually refers to a type rather than the | |||||
name of the adder to call.</p> | |||||
<p>For example, you may wish to allow a task to add arbitrary instances of the | |||||
Condition role to a task. So instead of adding methods such as | |||||
<code>addAnd(AndCondition)</code>, <code>addOr(OrCondition)</code> and | |||||
<code>addXor(XorCondition)</code> you can instead add a single method | |||||
<code>add(Condition)</code>. This vastly simplifies the amount of work required | |||||
to write tasks that take conditions. More importantly it allows end-users to | |||||
extend the number of elements selected by task. For instance if the user wanted | |||||
a "nand" condition they could write the Nand type use it in their build | |||||
file. For a discussion on roles and types see the <a href="types.html">Types | |||||
HOWTO</a>.</p> | |||||
<p>To use a Typed adder there must be a single method named "add" that | |||||
has a single parameter. The parameter <em>MUST</em> be an abstract interface and | |||||
must be registered as a role. The name of the element is then used to lookup the | |||||
a type in the TypeManager with a role matching the interface name.</p> | |||||
<p>For example if an element named "nand" was added to an object that had | |||||
an adder with the signature <code>void add( Condition condition )</code> then | |||||
the type named "nand" in the role "Condition" would be looked up. | |||||
An instance of the type would then be created using the default constructor and the | |||||
created object would be configured and then adder to object using adder.</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 --> | |||||
@@ -1,144 +0,0 @@ | |||||
<!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 - Differences to Ant 1</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">Project File</a> | |||||
</li> | |||||
<li> <a href="./vfs.html">Virtual File System</a> | |||||
</li> | |||||
<li> <a href="./ant1compat.html">Ant 1 Compatibility Layer</a> | |||||
</li> | |||||
<li> <a href="./differences.html">Differences to Ant 1</a> | |||||
</li> | |||||
<li> <a href="./task.html">My First Task</a> | |||||
</li> | |||||
</ul> | |||||
<p><strong>Extending Ant</strong></p> | |||||
<ul> | |||||
<li> <a href="./configuring.html">Configuration HOWTO</a> | |||||
</li> | |||||
<li> <a href="./converter.html">Converter HOWTO</a> | |||||
</li> | |||||
<li> <a href="./type.html">Type 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="Differences to Ant 1.x"><strong>Differences to Ant 1.x</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Some of the differences between Ant 1.x and Myrmidon:</p> | |||||
<ul> | |||||
<li> | |||||
Groups of tasks can be assembled into self-describing | |||||
<i>antlib</i> task libraries. This makes it very easy to | |||||
distribute and install tasks and data-types. | |||||
</li> | |||||
<li> A project can import other projects, and reference their targets. </li> | |||||
<li>Properties and data type references now share the same namespace.</li> | |||||
<li> | |||||
Changes to task and data-type API: | |||||
<ul> | |||||
<li>An interface based API, through which a task interacts with the | |||||
task engine, and the services it provides.</li> | |||||
<li>A well-defined object lifecycle.</li> | |||||
<li>Polymorphic types are supported when objects are configured.</li> | |||||
<li>Reference handling is handled automatically when objects are configured.</li> | |||||
<li>Aspects can be used to decorate tasks, to add facilities like logging, | |||||
error handling, or user preferences.</li> | |||||
</ul> | |||||
</li> | |||||
<li>A set of well-defined services and APIs have been introduced, to allow | |||||
tasks to do their work without depending on other tasks: | |||||
<ul> | |||||
<li>Execute external commands.</li> | |||||
<li>Execute other tasks.</li> | |||||
<li>Manage ClassLoaders and Class-paths.</li> | |||||
<li>Virtual file system (in progress).</li> | |||||
<li>Execute Java applications (in progress).</li> | |||||
<li>...</li> | |||||
</ul> | |||||
</li> | |||||
</ul> | |||||
<p>There are plenty more features planned. You can read about them | |||||
<a href="todo.html">here</a>. | |||||
</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 --> | |||||
@@ -1,121 +0,0 @@ | |||||
<!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">Project File</a> | |||||
</li> | |||||
<li> <a href="./vfs.html">Virtual File System</a> | |||||
</li> | |||||
<li> <a href="./ant1compat.html">Ant 1 Compatibility Layer</a> | |||||
</li> | |||||
<li> <a href="./differences.html">Differences to Ant 1</a> | |||||
</li> | |||||
<li> <a href="./task.html">My First Task</a> | |||||
</li> | |||||
</ul> | |||||
<p><strong>Extending Ant</strong></p> | |||||
<ul> | |||||
<li> <a href="./configuring.html">Configuration HOWTO</a> | |||||
</li> | |||||
<li> <a href="./converter.html">Converter HOWTO</a> | |||||
</li> | |||||
<li> <a href="./type.html">Type 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 | |||||
<a href="todo.html">Todo list </a> 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 --> | |||||
@@ -1,187 +0,0 @@ | |||||
<!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 - Myrmidon</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">Project File</a> | |||||
</li> | |||||
<li> <a href="./vfs.html">Virtual File System</a> | |||||
</li> | |||||
<li> <a href="./ant1compat.html">Ant 1 Compatibility Layer</a> | |||||
</li> | |||||
<li> <a href="./differences.html">Differences to Ant 1</a> | |||||
</li> | |||||
<li> <a href="./task.html">My First Task</a> | |||||
</li> | |||||
</ul> | |||||
<p><strong>Extending Ant</strong></p> | |||||
<ul> | |||||
<li> <a href="./configuring.html">Configuration HOWTO</a> | |||||
</li> | |||||
<li> <a href="./converter.html">Converter HOWTO</a> | |||||
</li> | |||||
<li> <a href="./type.html">Type 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="What is Ant?"><strong>What is Ant?</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Ant is a cross-platform build tool that features ease of | |||||
use and extensibility as it's primary goal.</p> | |||||
<p>Why another build tool when there is already make, gnumake, | |||||
nmake, jam, and others? Make-like tools are inherently shell-based; | |||||
they execute native commands and shell scripts to perform the work | |||||
associated with the build process. So to extend the the tool by | |||||
writing a program or script executable by the OS you are on. This | |||||
makes it difficult to achieve portability between platforms.</p> | |||||
<p>Ant is a different beast. Instead of using OS-specific commands | |||||
to extend the build process, you leverage the cross-platform features | |||||
of Java to write "tasks". This makes it much easier to achieve | |||||
a portal build process between platforms. Ant also differs in that it uses | |||||
XML to describe the build process.</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="What is Myrmidon?"><strong>What is Myrmidon?</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Myrmidon is a proposal for Ant 2. Ant 2 is the next evolution of the | |||||
Ant build tool aimed at removing many of the limitations of the Ant 1.x | |||||
product. In particular it aims to;</p> | |||||
<ul> | |||||
<li>Remove ambiguities and points of confusion for build file | |||||
writers.</li> | |||||
<li>Ease deployment and management of 3rd party tasks and | |||||
dependencies.</li> | |||||
<li>Simplify development of tasks by task-writers.</li> | |||||
<li>Enable ad-hoc "tasks" to be written inside build file, | |||||
probably using well known scripting languages such as python and | |||||
javascript. (Possible in Ant 1.x but prohibitively difficult).</li> | |||||
<li>Integrate templating technologies such as XSLT, velocity etc | |||||
to enable development of reusable build file elements.</li> | |||||
</ul> | |||||
<p> You can read more about the goals of Ant 2 | |||||
<a href="http://jakarta.apache.org/ant/ant2/">here</a>. | |||||
</p> | |||||
<p>Myrmidon was specifically designed as both a tool and as | |||||
an API library that can be reused in other products. It contains the | |||||
basic building blocks for assembling any sort of task-based tool. Ant 2 | |||||
is an example of such a tool, which could be assembled using the Myrmidon | |||||
task container, and a library of build related tasks. In the future expect | |||||
to see Testing frameworks, Job Schedulers (ie Cron managers), shells | |||||
and install tools based on the Myrmidon base.</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="A Rose by any other name ..."><strong>A Rose by any other name ...</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p> | |||||
The name Myrmidon is a derivation of a mythological name for some ants that were turned | |||||
into soldiers by the god Zeus. It came to mean "a subordinate who executes orders | |||||
unquestioningly" which seemed suitable for a task execution/build tool. A more complete | |||||
description stolen from | |||||
<a href="http://bondi-blue.parlez.com/previous_words/myrmidon.txt"> | |||||
http://bondi-blue.parlez.com/previous_words/myrmidon.txt</a>. | |||||
</p> | |||||
<quote> | |||||
<i>The appellation Myrmidon was derived from the Greek word "myrmex", | |||||
meaning ant. According to Greek mythology, the Myrmidons were | |||||
transformed into humans by the god Zeus as an act of kindness to his | |||||
son Aeacus. King Aeacus, captivated by a colony of ants, prayed | |||||
that he should receive an increase in population equal to the | |||||
number of ants before him. When he awoke the next day, the ants | |||||
were his human subjects. Thereafter, they were known as the | |||||
Myrmidons. See "The Iliad" for Homers' account of the Myrmidons | |||||
during the Trojan War.</i> | |||||
</quote> | |||||
</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 --> | |||||
@@ -1,356 +0,0 @@ | |||||
<!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 Libraries in Ant 2</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">Project File</a> | |||||
</li> | |||||
<li> <a href="./vfs.html">Virtual File System</a> | |||||
</li> | |||||
<li> <a href="./ant1compat.html">Ant 1 Compatibility Layer</a> | |||||
</li> | |||||
<li> <a href="./differences.html">Differences to Ant 1</a> | |||||
</li> | |||||
<li> <a href="./task.html">My First Task</a> | |||||
</li> | |||||
</ul> | |||||
<p><strong>Extending Ant</strong></p> | |||||
<ul> | |||||
<li> <a href="./configuring.html">Configuration HOWTO</a> | |||||
</li> | |||||
<li> <a href="./converter.html">Converter HOWTO</a> | |||||
</li> | |||||
<li> <a href="./type.html">Type 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 libraries 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 Ant 2. The libraries (also referred to as | |||||
deployments) will be termed antlibs.</p> | |||||
<p>Ant libraries 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 libraries 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>Ant 2 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 libraries 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 --> | |||||
@@ -1,242 +0,0 @@ | |||||
<!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 - My First Task</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">Project File</a> | |||||
</li> | |||||
<li> <a href="./vfs.html">Virtual File System</a> | |||||
</li> | |||||
<li> <a href="./ant1compat.html">Ant 1 Compatibility Layer</a> | |||||
</li> | |||||
<li> <a href="./differences.html">Differences to Ant 1</a> | |||||
</li> | |||||
<li> <a href="./task.html">My First Task</a> | |||||
</li> | |||||
</ul> | |||||
<p><strong>Extending Ant</strong></p> | |||||
<ul> | |||||
<li> <a href="./configuring.html">Configuration HOWTO</a> | |||||
</li> | |||||
<li> <a href="./converter.html">Converter HOWTO</a> | |||||
</li> | |||||
<li> <a href="./type.html">Type 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="My First Task"><strong>My First Task</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>In Ant 1 it was very easy to write your own task. In Ant 2 we plan | |||||
to make it even easier. To write a basic task simply follow the following | |||||
formula.</p> | |||||
<ol> | |||||
<li> | |||||
Create a Java class that extends | |||||
<code>org.apache.myrmidon.api.AbstractTask</code> | |||||
</li> | |||||
<li> | |||||
For each attribute, write a setter method. The setter method | |||||
must be a public void method that takes a single argument. The name | |||||
of the method must begin with "set", followed by the attribute name, with | |||||
the first character of the name in uppercase, and the rest in lowercase. | |||||
The type of the attribute can be: | |||||
<ul> | |||||
<li>String</li> | |||||
<li> | |||||
Any primitive type - they are converted for you from their | |||||
String-representation in the buildfile | |||||
</li> | |||||
<li> | |||||
File - the string representation will be interpreted relative to | |||||
the project's basedir. | |||||
</li> | |||||
</ul> | |||||
</li> | |||||
<li> | |||||
For each nested element create a public void method that takes a single | |||||
argument. The name of the method must begin with "add", followed by the | |||||
attribute name, with the first character of the name in uppercase, and | |||||
the rest in lowercase. The type of the parameter is an object with a | |||||
no-arguement constructor. It is configured in exactly the same was a | |||||
task is configured (via setters and adders) and then added to the task. | |||||
</li> | |||||
<li> | |||||
Write a public void method named "execute" with no arguments that | |||||
throws a TaskException. This is the method called to do the | |||||
actual work of the task. | |||||
</li> | |||||
</ol> | |||||
<table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||||
<tr><td bgcolor="#828DA6"> | |||||
<font color="#ffffff" face="arial,helvetica,sanserif"> | |||||
<a name="A Basic Example"><strong>A Basic Example</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>So a basic task that has one attribute named "message" and just prints | |||||
out this message is as simple as;</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> | |||||
package org.realityforge.tasks; | |||||
import org.apache.myrmidon.api.AbstractTask; | |||||
import org.apache.myrmidon.api.TaskException; | |||||
public class SystemOutPrinterTask | |||||
extends Task | |||||
{ | |||||
private String m_message; | |||||
// The setter for the "message" attribute | |||||
public void setMessage( final String message ) | |||||
{ | |||||
m_message = message; | |||||
} | |||||
// The method executing the task | |||||
public void execute() | |||||
throws TaskException | |||||
{ | |||||
System.out.println( m_message ); | |||||
} | |||||
} | |||||
</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 use this task you <em>could</em> create a library but instead we will | |||||
just use <taskdef> to define the task. An example usage would be;</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> | |||||
<?xml version="1.0"?> | |||||
<project version="2.0"> | |||||
<target name="main"> | |||||
<taskdef name="printer" | |||||
classname="org.realityforge.tasks.SystemOutPrinterTask" | |||||
classpath="build/classes"/> | |||||
<printer message="Hello World!"/> | |||||
</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> | |||||
</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 --> | |||||
@@ -1,897 +0,0 @@ | |||||
<!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"> | |||||
<meta name="author" value="Peter Donald"> | |||||
<meta name="email" value="peter@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">Project File</a> | |||||
</li> | |||||
<li> <a href="./vfs.html">Virtual File System</a> | |||||
</li> | |||||
<li> <a href="./ant1compat.html">Ant 1 Compatibility Layer</a> | |||||
</li> | |||||
<li> <a href="./differences.html">Differences to Ant 1</a> | |||||
</li> | |||||
<li> <a href="./task.html">My First Task</a> | |||||
</li> | |||||
</ul> | |||||
<p><strong>Extending Ant</strong></p> | |||||
<ul> | |||||
<li> <a href="./configuring.html">Configuration HOWTO</a> | |||||
</li> | |||||
<li> <a href="./converter.html">Converter HOWTO</a> | |||||
</li> | |||||
<li> <a href="./type.html">Type 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="Todo List"><strong>Todo List</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<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> | |||||
<table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||||
<tr><td bgcolor="#828DA6"> | |||||
<font color="#ffffff" face="arial,helvetica,sanserif"> | |||||
<a name="Integrate XDocs proposal"><strong>Integrate XDocs proposal</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Integrate with the XDocs proposal that generates XML documentation for | |||||
tasks. Rework that proposal so that it knows about the Myrmidon specific | |||||
patterns and features. Also rework it so that it can support reading | |||||
documentation and examples from side-by-side the task.</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="TaskInfo"><strong>TaskInfo</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Consider allowing task writers to write their own TaskInfo objects | |||||
(or at least have them generated from XDoclet directives). This would | |||||
encompass both documentation and perhaps introspection of the types.</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="XML Catalog to load XML Fragments"><strong>XML Catalog to load XML Fragments</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p> | |||||
When including fragments of XML we are currently forced to use relative paths. | |||||
However this is sometimes undesirable when a single fragment needs to be used | |||||
across several projects in several different locations. Instead we could use | |||||
a Catalog to name the fragment and then each developer would only need to install | |||||
the fragment once and it would be accessible from all the projects. | |||||
</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="Refactor Java Infrastructure into a Service"><strong>Refactor Java Infrastructure into a Service</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Much like Exec should be decoupled from Ant runtime, so should classes | |||||
to implement java task for the same benefits.</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="Structural Dependency Utils"><strong>Structural Dependency Utils</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p> | |||||
In the present ant, it is required that each task manage dependency separately. | |||||
This makes it a lot of work to implement even simple dependency checking. To this | |||||
day many of the core tasks do not implement it correctly. I am specifically | |||||
talking about "structural" dependency information. The main reason is that it is | |||||
painful to implement. | |||||
</p> | |||||
<p> | |||||
Some tasks do no dependency checking and will recompile/transform/etc everytime. | |||||
Others may perform a simple dependency checking (ie if source file is newer than | |||||
destination file then recompile). Ideally a dependency system would actually | |||||
calculate the dependencies correctly. So we need to have some mechanism to determine | |||||
that <code>foo.c</code> actually depends upon <code>foo.h</code>, <code>bar.h</code> | |||||
and <code>baz.h</code>. As this information is particular to each different task | |||||
we need to allow tasks to implement this behaviour. Possibly by supplying an interface | |||||
of the form; | |||||
</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> | |||||
public interface DependencyGenerator | |||||
{ | |||||
File[] generateDependencies( File file ); | |||||
} | |||||
</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> | |||||
Generating the dependency information is a costly operation and thus we do not want to | |||||
be doing it everytime you run ant. We want to generate it on the initial build and then | |||||
persist somewhere. Everytime a file is out of date, it's dependency information would | |||||
be regenerated and stored in the dependency cache. Ideally this cache would also store the | |||||
above mentioned coloring information. So the entry for <code>foo.c</code> may declare that | |||||
it is dependent upon <code>foo.h</code>, <code>bar.h</code> and <code>baz.h</code>, aswell | |||||
as being compiled with -O2 flag. If any of the dependencies have changed or are out of date | |||||
then foo.c would need to be recompiled. | |||||
</p> | |||||
<p> | |||||
A possible API would be | |||||
</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> | |||||
DependencyManager dm = ...; | |||||
dm.setFileSet( myFileSet ); | |||||
dm.setDependencyCache( myDependencyCacheFile ); | |||||
File[] files = cm.getOutOfDate(); | |||||
</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="Antlibs storing templates"><strong>Antlibs storing templates</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>After a templating system is formalized it would useful to define | |||||
a mechanism via which you can store templates in an antlib. These | |||||
templates could then be loaded and used by build files through a | |||||
"standard" mechanism. This may need to be merged with the XML catalog | |||||
system.</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="Antlibs Storing General Resources"><strong>Antlibs Storing General Resources</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Add a system via which ant libs can store general resources for | |||||
consumption by build users. This could be used to store the XML fragments | |||||
for the XML catalog, the template fragments for templates, images for | |||||
documentation system and so forth.</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="Coloring API"><strong>Coloring API</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p> | |||||
When you execute a task such as "javac" there is two types of dependency information | |||||
that is important to analyze before we determine if we need to recompile a file. Say | |||||
we are compiling <code>Foo.java</code>, it may depend on the <code>Bar.java</code> | |||||
file. We call this "structural" dependency information - the structure of the source file | |||||
determines what other files it depend upon. However there is also "environmental" | |||||
dependency information. For instance if the <code>Foo.java</code> file was compiled with | |||||
<code>debug="true"</code> last run and this time needs to be compiled with | |||||
<code>debug="false"</code> then it is out of date and needs to be recompiled. We call this | |||||
"environmental" dependency information "coloring". | |||||
</p> | |||||
<p> | |||||
So we need to create an infrastructure that allows tasks to manage "coloring". So a task | |||||
should be able to add coloring information for each resource processed. When the task | |||||
comes to process the resource again it will detect if the coloring has changed and if it | |||||
has will force a recompile. | |||||
</p> | |||||
<p> | |||||
An API for such a bean has yet to be established but an example API would be. | |||||
</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> | |||||
ColoringManager cm = ...; | |||||
cm.addColor( "debug", "true" ); | |||||
cm.addColor( "optimize", "false" ); | |||||
cm.setFileSet( myFileSet ); | |||||
File[] files = cm.getOutOfDate(); | |||||
</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="Create Task/Element/Attribute Naming guidelines"><strong>Create Task/Element/Attribute Naming guidelines</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p> Currently Ant has a mixture of tasks from various stages it's evolution, with different | |||||
authors and each utilizing different naming patterns. Some tasks use names such as | |||||
"src" and "dest" while others use "file" and "tofile". It would be preferrable if | |||||
consistent naming patterns were used. It is recomended that we come up with a "best | |||||
practices" document to document our recomended naming patterns.</p> | |||||
<p>Before we can come up with such a document we need to identify common patterns through | |||||
out the tasks. Several tasks have the notion of transforming input from a "source" | |||||
to a "destination". So we should have consistent naming schemes for these attributes and | |||||
elements. Analysis of existing tasks will likely bring out other similar patterns. Once | |||||
we have identified and documented these similarities then we can establish conventions.</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="Rethink Notification/Event scheme"><strong>Rethink Notification/Event scheme</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>We need to rethink the whole notificaiton scheme. Should tasks be able to | |||||
raise events? Probably as long as we have <em>ContainerTasks</em>. Should tasks | |||||
be able to query state of run? ie Can a task request "are we paused?" or "are we | |||||
stopped?" ? Probably as that way long running tasks are given the opportunity | |||||
to be gracefully halted by the end users (primarily aimed at IDE vendors here).</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="XPath-like Locators for tasks"><strong>XPath-like Locators for tasks</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Most tasks are grouped into some sort of task container. The task containers | |||||
can be things like workspaces, projects, targets or other tasks. Each of these | |||||
containers usually has a name. Thus we could refer to tasks via a path such as | |||||
"/avalon/compile/javac" would refer to the task "javac" in the target "compile" | |||||
in the project "avalon". In the past it has been requested that a task get access | |||||
to this path programatically - other people have also asked for access to things | |||||
like the currently running target. We need to assess this and decide whether we | |||||
wish to support it.</p> | |||||
<p>Another point to think about is that we could use XPath-like string to designate | |||||
to other tasks to execute. ie antcall would refer to a path rather than a target name</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="Embeddor HOWTO"><strong>Embeddor HOWTO</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Assigned To: Peter</p> | |||||
<p>Write a HOWTO describing how to embed Myrmidon into other | |||||
applications.</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="Optional Dependencies"><strong>Optional Dependencies</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Assigned To: Peter</p> | |||||
<p>Extend Myrmidons library management facilities so that optional | |||||
dependencies may be declared for a library. ie The library will still | |||||
operate in absence of such libraries but can provide further features | |||||
if these libraries are present. Most likely this will be done via a | |||||
new manifest entry "Optional-Extension-List:" that behaves similar | |||||
to "Extension-List:" except that the extensions are optional.</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="Facade task HOWTO"><strong>Facade task HOWTO</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Currently we have a few tasks that have multiple implementations. For instance | |||||
Javac task can actually call jikes, jvc, classic javac or modern javac. Similar things | |||||
will be seen with the jspc task and the cc task (if it ever gets written). We have a base | |||||
class that is meant to facilitate this sort of task and make it easy to develope. See | |||||
AbstractFacadeTask. However we need to write up a HOWTO so people can use it.</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="Mail tasks"><strong>Mail tasks</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Convert the Ant 1.x Mail tasks to Myrmidon.</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="Security Manager"><strong>Security Manager</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Add the ability to run java programs that call System.exit() by adding a | |||||
security manager. Should look something 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> | |||||
public class MyrmidonSecurityManager | |||||
extends SecurityManager | |||||
{ | |||||
public void checkExit( final int status ) | |||||
{ | |||||
throw new ExitException( status ); | |||||
} | |||||
public void checkPermission( final Permission permission ) | |||||
{ | |||||
} | |||||
} | |||||
</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="Self Hosting"><strong>Self Hosting</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<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> | |||||
</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="Validation Pass"><strong>Validation Pass</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Consider calling validate() on task prior to execute(). This would allow | |||||
us to have a "make -k" mode that actually did basic validation and would also | |||||
encourage task writers to do validation properly.</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="Paths"><strong>Paths</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Consider allowing the user to configure the ant system by setting the | |||||
following path types.</p> | |||||
<ul> | |||||
<li>ant.type.path: path that is used to search for the type libraries</li> | |||||
<li>ant.ext.path: path that is used to search for "Optional Packages" | |||||
or extensions.</li> | |||||
</ul> | |||||
<p> | |||||
The default search path will probably include a per-user path element, | |||||
a workspace path element and a system path elemtn that are searched in | |||||
that order. Some possible defaults; | |||||
</p> | |||||
<ul> | |||||
<li>Unix Per-user: ${user.home}/.ant/lib, ${user.home}/.ant/ext</li> | |||||
<li>Windows Per-user: ${user.home}/ant/lib, ${user.home}/ant/ext</li> | |||||
<li>MacOSX Per-user: ${user.home}/Library/Ant/lib, | |||||
${user.home}/Library/Ant/ext</li> | |||||
<li>Unix System-wide: /opt/ant/lib, /opt/ant/ext</li> | |||||
<li>Unix System-wide: /usr/local/ant/lib, /usr/local/ant/ext</li> | |||||
<li>Windows System-wide: %SYS_DRIVE%/Program Files/ant/lib, | |||||
%SYS_DRIVE%/Program Files/ant/ext</li> | |||||
<li>MacOSX System-wide: /Library/Ant/lib, /Library/Ant/ant/ext</li> | |||||
</ul> | |||||
</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="Ant 1.x Compatibility"><strong>Ant 1.x Compatibility</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>The Ant 1 Compatibility layer is still in early stages of development. | |||||
</p> | |||||
<ul> | |||||
<li>Get a version of <code><antcall></code> working.</li> | |||||
<li> | |||||
Provide hooks between Ant 1 references and Myrmidon properties. | |||||
May use converters for adapting Ant 2 objects (like Ant 2 | |||||
<code><path></code> or <code><fileset></code>) | |||||
as Ant 1 types. | |||||
</li> | |||||
<li> | |||||
Missing tests: | |||||
<ul> | |||||
<li>Make sure properties are shared between Ant 1 and Myrmidon tasks.</li> | |||||
</ul> | |||||
</li> | |||||
<li>Get GUMP runs going using Myrmidon.</li> | |||||
<li>Add protected accessors for get/set/list properties in | |||||
Ant 1 Project, to minimise the amount of code duplication in | |||||
Ant1CompatProject.</li> | |||||
</ul> | |||||
</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="Virtual File System"><strong>Virtual File System</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>The VFS needs plenty of work:</p> | |||||
<ul> | |||||
<li>Move files/folders.</li> | |||||
<li>Recursive folders copy.</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>Convert files/folders into local files, for handing off | |||||
to external commands, or legacy tasks.</li> | |||||
<li>Refactor the replication mechanism out of ZipFileSystemProvder, | |||||
and make more general pluggable.</li> | |||||
<li>Capabilities discovery.</li> | |||||
<li>Attributes and attribute schema.</li> | |||||
<li>Handle file canonicalisation better (for cases like case-insensitive | |||||
file systems, symbolic links, name encoding, etc).</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> | |||||
<table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||||
<tr><td bgcolor="#828DA6"> | |||||
<font color="#ffffff" face="arial,helvetica,sanserif"> | |||||
<a name="File Data-Types and Tasks"><strong>File Data-Types and Tasks</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<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> | |||||
<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 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 conditions: | |||||
<ul> | |||||
<li>Add more condition implementations that perform checks on files. | |||||
One that searches a path for a file would be useful.</li> | |||||
</ul> | |||||
</li> | |||||
<li>File Name Mappers: | |||||
<ul> | |||||
<li>Change FileNameMapper.mapFileName() to take vfs.FileName objects.</li> | |||||
<li>Move the current mapper implementations across to antlib.</li> | |||||
</ul> | |||||
</li> | |||||
<li>File Sets: | |||||
<ul> | |||||
<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 as 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>Port across the Ant 1 file filter proposal, once it is complete.</li> | |||||
<li>Copy task: | |||||
<ul> | |||||
<li>Implement 'preservelastmodified', 'overwrite', and 'includeemptydirs'.</li> | |||||
<li>Support a file name mapper.</li> | |||||
<li>Support file filters.</li> | |||||
<li>Detect and handle destination file name collisions.</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> | |||||
<table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||||
<tr><td bgcolor="#828DA6"> | |||||
<font color="#ffffff" face="arial,helvetica,sanserif"> | |||||
<a name="Command-line and Configuration Files"><strong>Command-line and Configuration Files</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<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> | |||||
<ul> | |||||
<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> | |||||
</ul> | |||||
</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="Scripting"><strong>Scripting</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p>Add the ability to extend Ant using languages other than | |||||
Java:</p> | |||||
<ul> | |||||
<li>Define a task using a scripting language such as Javascript.</li> | |||||
<li>Use Rhino's ability to implement Java interfaces, to | |||||
implement and define types, such as FileSelector, or | |||||
Condition.</li> | |||||
<li>Define a task using template.</li> | |||||
<li>Add some lightweight scripting tasks.</li> | |||||
</ul> | |||||
</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="Documentation"><strong>Documentation</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<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> | |||||
<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>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> | |||||
</ul> | |||||
</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="Miscellaneous"><strong>Miscellaneous</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<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>Allow service factories to be configured from the contents of the | |||||
<code>ant-services.xml</code> descriptor. | |||||
</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>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>Move the | |||||
<code><http></code> and | |||||
<code><socket></code> | |||||
conditions to an antlib. Need to resolve how these will be passed a logger. | |||||
</li> | |||||
<li>Add an else block to the | |||||
<code><if></code> task. | |||||
</li> | |||||
<li>Move | |||||
<code>crimson.jar</code> to | |||||
<code>bin/lib</code> in the distribution, | |||||
and make available to other jars via the extension mechanism. | |||||
</li> | |||||
<li>Change <code>DefaultPropertyResolver</code> to ignore '$${'.</li> | |||||
<li>Add a <code>--type</code> command-line option, to allow | |||||
the project builder to be manually selected. | |||||
</li> | |||||
<li>Change <code>ProjectBuilder</code> | |||||
and <code>Embeddor</code> to throw something more | |||||
specialised than Exception. | |||||
</li> | |||||
<li>Change <code>DefaultClassLoaderManager</code> to handle | |||||
directories as part of a library classpath. | |||||
</li> | |||||
<li><code><condition></code> should set the property | |||||
value to <code>false</code> when the condition is false.</li> | |||||
<li>Split the <code><uptodate></code> condition into | |||||
a condition that checks against a single target file, | |||||
and one which checks using a destdir/mapper.</li> | |||||
<li>Add condition implementations to: check JVM version, | |||||
check Ant version, check whether a particular antlib or extension is | |||||
available, match a string against a regular expression.</li> | |||||
<li>Add a task to unset a property.</li> | |||||
<li>Change the various def and import task to allow a classpath | |||||
to be provided.</li> | |||||
<li>Unit tests.</li> | |||||
</ul> | |||||
</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 --> | |||||
@@ -1,311 +0,0 @@ | |||||
<!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">Project File</a> | |||||
</li> | |||||
<li> <a href="./vfs.html">Virtual File System</a> | |||||
</li> | |||||
<li> <a href="./ant1compat.html">Ant 1 Compatibility Layer</a> | |||||
</li> | |||||
<li> <a href="./differences.html">Differences to Ant 1</a> | |||||
</li> | |||||
<li> <a href="./task.html">My First Task</a> | |||||
</li> | |||||
</ul> | |||||
<p><strong>Extending Ant</strong></p> | |||||
<ul> | |||||
<li> <a href="./configuring.html">Configuration HOWTO</a> | |||||
</li> | |||||
<li> <a href="./converter.html">Converter HOWTO</a> | |||||
</li> | |||||
<li> <a href="./type.html">Type 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="Building Myrmidon"><strong>Building Myrmidon</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p> | |||||
First, you will need to fetch the Myrmidon source from CVS. The source | |||||
can be found in the <code>proposal/myrmidon</code> directory of the | |||||
Ant source tree. You should check out the <code>jakarta-ant</code> CVS | |||||
module, as described | |||||
<a href="http://jakarta.apache.org/site/cvsindex.html">here</a>. | |||||
</p> | |||||
<p> | |||||
To build Myrmidon, use the <code>build.xml</code> build script. You will need | |||||
to use Ant 1.4.1 or later. The default target builds the Myrmidon distribution | |||||
into the <code>dist</code> directory. The distribution is a ready-to-run | |||||
installation of Myrmidon. | |||||
</p> | |||||
<p>There are a number features that are not built unless the appropriate optional Jar | |||||
files are found in the <code>lib</code> directory:</p> | |||||
<table> | |||||
<tr> | |||||
<td bgcolor="#039acc" colspan="" rowspan="" | |||||
valign="top" align="left"> | |||||
<font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||||
Feature | |||||
</font> | |||||
</td> | |||||
<td bgcolor="#039acc" colspan="" rowspan="" | |||||
valign="top" align="left"> | |||||
<font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||||
Jar File | |||||
</font> | |||||
</td> | |||||
<td bgcolor="#039acc" colspan="" rowspan="" | |||||
valign="top" align="left"> | |||||
<font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||||
Download From | |||||
</font> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td bgcolor="#a0ddf0" colspan="" rowspan="" | |||||
valign="top" align="left"> | |||||
<font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||||
SMB VFS support (Samba, Windows shares) | |||||
</font> | |||||
</td> | |||||
<td bgcolor="#a0ddf0" colspan="" rowspan="" | |||||
valign="top" align="left"> | |||||
<font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||||
jcifs.jar | |||||
</font> | |||||
</td> | |||||
<td bgcolor="#a0ddf0" colspan="" rowspan="" | |||||
valign="top" align="left"> | |||||
<font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||||
<a href="http://jcifs.samba.org">jcifs.samba.org</a>. | |||||
<p>Note: there are problems using the 0.6.1 release. Try 0.6.0 instead.</p> | |||||
</font> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td bgcolor="#a0ddf0" colspan="" rowspan="" | |||||
valign="top" align="left"> | |||||
<font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||||
FTP VFS support | |||||
</font> | |||||
</td> | |||||
<td bgcolor="#a0ddf0" colspan="" rowspan="" | |||||
valign="top" align="left"> | |||||
<font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||||
netcomponents.jar | |||||
</font> | |||||
</td> | |||||
<td bgcolor="#a0ddf0" colspan="" rowspan="" | |||||
valign="top" align="left"> | |||||
<font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||||
<a href="http://www.savarese.org/oro/software/NetComponents.html">www.savarese.org</a> | |||||
</font> | |||||
</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="Running Myrmidon"><strong>Running Myrmidon</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p> | |||||
To run Myrmidon, use one of the following methods: | |||||
</p> | |||||
<table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||||
<tr><td bgcolor="#828DA6"> | |||||
<font color="#ffffff" face="arial,helvetica,sanserif"> | |||||
<a name="Launcher Script"><strong>Launcher Script</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p> | |||||
On Windows and Unix platforms, you can use the <code>ant</code> script | |||||
in the distribution's <code>bin</code> directory. The following environment | |||||
variables can be used, but are not required (except on Windows 9x - see below). | |||||
</p> | |||||
<p> | |||||
</p> | |||||
<table> | |||||
<tr> | |||||
<td bgcolor="#039acc" colspan="" rowspan="" | |||||
valign="top" align="left"> | |||||
<font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||||
Variable | |||||
</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"> | |||||
JAVA_HOME | |||||
</font> | |||||
</td> | |||||
<td bgcolor="#a0ddf0" colspan="" rowspan="" | |||||
valign="top" align="left"> | |||||
<font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||||
The directory that the JDK is installed in. | |||||
</font> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td bgcolor="#a0ddf0" colspan="" rowspan="" | |||||
valign="top" align="left"> | |||||
<font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||||
JAVACMD | |||||
</font> | |||||
</td> | |||||
<td bgcolor="#a0ddf0" colspan="" rowspan="" | |||||
valign="top" align="left"> | |||||
<font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||||
The command to use to start the JVM. Defaults to <code>java</code>. | |||||
</font> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td bgcolor="#a0ddf0" colspan="" rowspan="" | |||||
valign="top" align="left"> | |||||
<font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||||
ANT_HOME | |||||
</font> | |||||
</td> | |||||
<td bgcolor="#a0ddf0" colspan="" rowspan="" | |||||
valign="top" align="left"> | |||||
<font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||||
The directory containing the Myrmidon distribution. This must be | |||||
set when running on Windows 95, 98 or Me. | |||||
</font> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</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="Executable Jar File"><strong>Executable Jar File</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
<p> | |||||
The Myrmidon distribution includes an executable Jar file, which can be used | |||||
to run Myrmidon. Use the following command: | |||||
</p> | |||||
<pre> | |||||
prompt> <i>java</i> -jar <i>ant-home</i>/bin/myrmidon-launcher.jar <i>options</i> | |||||
</pre> | |||||
</blockquote> | |||||
</td></tr> | |||||
</table> | |||||
<p>When started, Myrmidon looks for a project file called <code>build.ant</code> | |||||
in the current directory. A different project file can be specified using the | |||||
<code>-f</code> command-line option. Myrmidon executes the targets that are | |||||
listed on the command-line, or the default target if none is given. For | |||||
example, the following command executes targets <code>clean</code> and | |||||
<code>build</code> from project file <code>my-project.xml</code>:</p> | |||||
<pre> | |||||
prompt> ant -f my-project.xml clean build | |||||
</pre> | |||||
<p> | |||||
Run Myrmidon with the <code>-h</code> command-line option for a list of | |||||
the command-line options that are available. | |||||
</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 --> | |||||
@@ -1,432 +0,0 @@ | |||||
<!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">Project File</a> | |||||
</li> | |||||
<li> <a href="./vfs.html">Virtual File System</a> | |||||
</li> | |||||
<li> <a href="./ant1compat.html">Ant 1 Compatibility Layer</a> | |||||
</li> | |||||
<li> <a href="./differences.html">Differences to Ant 1</a> | |||||
</li> | |||||
<li> <a href="./task.html">My First Task</a> | |||||
</li> | |||||
</ul> | |||||
<p><strong>Extending Ant</strong></p> | |||||
<ul> | |||||
<li> <a href="./configuring.html">Configuration HOWTO</a> | |||||
</li> | |||||
<li> <a href="./converter.html">Converter HOWTO</a> | |||||
</li> | |||||
<li> <a href="./type.html">Type 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. | |||||
</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-uri</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>Both forward or backward slashes can be used to separate the elements of | |||||
a URL.</p> | |||||
<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> | |||||
<h3><code><mapped-fileset></code></h3> | |||||
<p>A fileset that applies a <a href="buildfile.html#File Name Mappers">file name mapper</a> | |||||
to a nested fileset. | |||||
</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="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><condition></code></h3> | |||||
<p>Takes a set of <a href="buildfile.html#Conditions">conditions</a>. If | |||||
the conditions evaluate to true, then select every file. Otherwise, | |||||
select no files.</p> | |||||
<h3><code><exists></code></h3> | |||||
<p>Selects files that exist.</p> | |||||
<h3><code><is-empty-folder></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 --> | |||||
@@ -1,112 +0,0 @@ | |||||
<document> | |||||
<properties> | |||||
<author email="darrell at apache dot org">Darrell DeBoer</author> | |||||
<title>Ant 1 Compatibitlity Layer</title> | |||||
</properties> | |||||
<body> | |||||
<section name="Overview"> | |||||
<p> | |||||
The Myrmidon-Ant1 Compatibility layer works by reusing most of the Ant 1 code, | |||||
with tasks and datatypes | |||||
being prefixed with "ant1." in build files. Almost all of the main Ant 1 tree | |||||
is included in the compatibility layer antlib. To insulate from changes in | |||||
the Ant 1 tree, Ant 1 class files are extracted from a jar, rather than | |||||
being compiled from scratch. | |||||
</p> | |||||
<p> | |||||
Here's how it works: The first time an Ant 1 task is encountered, an Ant 1 | |||||
project is created, and stored in the TaskContext under the name "ant1.project". | |||||
The Ant 1 versions of Task and Project have been extended, overriding core behaviour, | |||||
with Myrmidon-specific behaviour. | |||||
</p> | |||||
<p> | |||||
The updated version of Task implements Configurable, receiving it's | |||||
complete Task Model, and actually setting/adding/creating attributes | |||||
with the help of the IntrospectionHelper. This process is designed to | |||||
mimic the Ant 1 configuration policy, although not <i>all</i> of the | |||||
subtle variations of configuration present in Ant 1 are handled. | |||||
</p> | |||||
<p> | |||||
The updated version of Project will provide hooks into the Myrmidon TaskContext, | |||||
such as:</p> | |||||
<ul> | |||||
<li>logging (done)</li> | |||||
<li>properties (done)</li> | |||||
<li>references (not yet done)</li> | |||||
<li>Task defined by <taskdef> (done)</li> | |||||
</ul> | |||||
<p> | |||||
So at present, properties declared in Ant 2 tasks are available to all Ant 1 tasks, | |||||
and vice-versa. However, while a <code><ant1.path></code> reference works fine | |||||
in other <code><ant1.XXX></code> | |||||
tasks, it's not visible to Ant 2 tasks in the same build, and vice-versa. | |||||
</p> | |||||
<p> | |||||
The <code><taskdef></code> task works ok, registering the task with the TypeManager using the | |||||
"ant1." prefix. Only a couple of DataTypes (Path and Patternset) are working | |||||
as top-level types, but this should be just a matter of adding references to | |||||
the Ant 1 version of TypeInstanceTask in the descriptor. | |||||
</p> | |||||
<p> | |||||
The TransformingProjectBuilder (which is now the default builder for files | |||||
of type ".xml", applies a transformation stylesheet to the file, prefixing select | |||||
tasks (all at present) with "ant.". If a version attribute is encountered, the | |||||
file is not transformed | |||||
</p> | |||||
</section> | |||||
<section name="Using the compatibility layer"> | |||||
<subsection name="Using Ant 1 tasks in a Myrmidon build file"> | |||||
<p> | |||||
If you have a Myrmidon build file (eg with <code>version="2.0"</code> | |||||
on the project element, you can use Ant 1 tasks and datatypes by using | |||||
the "ant1." suffix on the regular element name. | |||||
Virtually <i>all</i> tasks and datatypes from Ant 1.4.1 are available | |||||
in this way. | |||||
</p> | |||||
<p> | |||||
When declaring a new task using the <code><ant1.taskdef></code> | |||||
task, <i>don't</i> prepend "ant1." to the taskname. This will be | |||||
done automatically by the taskdef task. However, you will need | |||||
to use the "ant1." prefix in all uses of that task. | |||||
</p> | |||||
</subsection> | |||||
<subsection name="Using an existing Ant 1 build file"> | |||||
<p> | |||||
Myrmidon will automatically handle Ant 1 build files using the | |||||
Ant 1 Compatibility layer. So, using an Ant 1 build | |||||
file with Myrmidon should be as simple as:</p> | |||||
<pre>[myrmidon-command] -f ant1-build-file.xml</pre> | |||||
<p> | |||||
This works as follows: When Myrmidon encounters a ".xml" build file which does not have a | |||||
<code>version</code> attribute on the top-level <code>project</code> | |||||
element, it assumes that it is an Ant 1 build file. So all tasks are | |||||
interpreted as though they are prefixed with the "ant." name prefix. | |||||
</p> | |||||
Myrmidon will automatically attempt to upgrade any ".xml" build file that | |||||
</subsection> | |||||
</section> | |||||
<section name="Building the compatibility layer"> | |||||
<p>Before building the Ant 1 Compatibility layer, you need to build | |||||
Myrmidon, running the <code>dist-lite</code> target of the main build. | |||||
See <a href="user.html#Building Myrmidon">the build instructions</a> | |||||
for more details.</p> | |||||
<p>To build the compatibility layer, simply execute:</p> | |||||
<pre>ant -f ant1compat.xml</pre> | |||||
<p>from within the root directory of the Myrmidon source tree.</p> | |||||
</section> | |||||
</body> | |||||
</document> | |||||
@@ -1,295 +0,0 @@ | |||||
<document> | |||||
<properties> | |||||
<author email="adammurdoch@apache.org">Adam Murdoch</author> | |||||
<title>User Guide</title> | |||||
</properties> | |||||
<body> | |||||
<section name="Project File"> | |||||
<p> | |||||
A project file is an XML file that describes which tasks to execute, and in | |||||
which order to execute them in. A project can be broken up into several steps, | |||||
or <i>targets</i>. A target is simply a list of the tasks that need to be | |||||
executed to perform the step. A target may also include some dependency | |||||
information. Myrmidon makes sure that targets are executed in the correct order, | |||||
so that a target is executed before the targets that depend on it.</p> | |||||
<p>The project file format is very similar to the format used in Ant 1. The | |||||
root element of a project file must be a <code><project></code> element. | |||||
It can take the following attributes: | |||||
</p> | |||||
<table> | |||||
<tr><th>Attribute</th><th>Description</th><th>Default Value</th></tr> | |||||
<tr> | |||||
<td>name</td> | |||||
<td>The project name.</td> | |||||
<td>The name of the project file, with the extension removed.</td> | |||||
</tr> | |||||
<tr> | |||||
<td>basedir</td> | |||||
<td>The base directory for the project. The base directory is used | |||||
to resolve all relative file names used in the project file. | |||||
</td> | |||||
<td>The directory containing the project file.</td> | |||||
</tr> | |||||
<tr> | |||||
<td>default</td> | |||||
<td>The name of the default target.</td> | |||||
<td><code>main</code></td> | |||||
</tr> | |||||
<tr> | |||||
<td>version</td> | |||||
<td>The project file format version that the project is written for.</td> | |||||
<td>None, must be <code>2.0</code></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-refs">Project references</a></li> | |||||
<li><a href="#antlib-imports">Library imports</a></li> | |||||
<li><a href="#init-tasks">Initialization tasks</a></li> | |||||
<li><a href="#targets">Targets</a></li> | |||||
</ul> | |||||
<subsection name="Project References" anchor="project-refs"> | |||||
<p>Project references allow the project to import, or reference, other projects. | |||||
A <code><projectref></code> element takes the following attributes:</p> | |||||
<table> | |||||
<tr><th>Attribute</th><th>Description</th><th>Default Value</th></tr> | |||||
<tr> | |||||
<td>name</td> | |||||
<td>The name to use to identify the referenced project.</td> | |||||
<td>Required</td> | |||||
</tr> | |||||
<tr> | |||||
<td>location</td> | |||||
<td>The path to the project file to reference.</td> | |||||
<td>Required</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 syntax | |||||
<code><i>project-name</i>-><i>target-name</i></code>. Here is a simple example:</p> | |||||
<source><![CDATA[ | |||||
<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> | |||||
]]></source> | |||||
</subsection> | |||||
<subsection name="Library Imports" anchor="antlib-imports"> | |||||
<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><th>Attribute</th><th>Description</th><th>Default Value</th></tr> | |||||
<tr> | |||||
<td>library</td> | |||||
<td>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.</td> | |||||
<td>Required</td> | |||||
</tr> | |||||
<tr> | |||||
<td>type</td> | |||||
<td>The type of definition to import. Values include <code>task</code>, | |||||
and <code>data-type</code>.</td> | |||||
<td>None</td> | |||||
</tr> | |||||
<tr> | |||||
<td>name</td> | |||||
<td>The name of the type to import.</td> | |||||
<td>None</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> | |||||
<source><![CDATA[ | |||||
<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> | |||||
]]></source> | |||||
</subsection> | |||||
<subsection name="Initialization Tasks" anchor="init-tasks"> | |||||
<p>Initialisation tasks are run before any of the project's targets are run, and | |||||
are used to initialise the project. Any task can be used as an initialization | |||||
task, including <code><property></code> and data-type instances. An example:</p> | |||||
<source><![CDATA[ | |||||
<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> | |||||
]]></source> | |||||
</subsection> | |||||
<subsection name="Targets" anchor="targets"> | |||||
<p>Targets have a similar format to targets in Ant 1.x, though some of the | |||||
behaviour is different. A <code><target></code> element takes the | |||||
following attributes:</p> | |||||
<table> | |||||
<tr><th>Attribute</th><th>Description</th><th>Default Value</th></tr> | |||||
<tr> | |||||
<td>name</td> | |||||
<td>The name of the target.</td> | |||||
<td>Required</td> | |||||
</tr> | |||||
<tr> | |||||
<td>depends</td> | |||||
<td>A comma-separated list of targets that this target depends on. | |||||
This list can contain targets from referenced projects.</td> | |||||
<td>None</td> | |||||
</tr> | |||||
</table> | |||||
</subsection> | |||||
</section> | |||||
<section name="Tasks"> | |||||
<p> | |||||
Listed below are 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> | |||||
<h3><code><condition></code></h3> | |||||
<p>Sets a property if a particular condition is true. See | |||||
<a href="#Conditions">Conditions</a> for a list of available conditions.</p> | |||||
<h3><code><fail></code></h3> | |||||
<p>Causes the build to fail.</p> | |||||
<h3><code><if></code></h3> | |||||
<p>Conditionally executes a set of tasks.</p> | |||||
<h3><code><load-properties></code></h3> | |||||
<p>Loads a set of properties from a file.</p> | |||||
<h3><code><log></code></h3> | |||||
<p>Writes a log message.</p> | |||||
<h3><code><property></code></h3> | |||||
<p>Sets a property.</p> | |||||
<h3><code><try-catch></code></h3> | |||||
<p>Runs a set of tasks, with a provided error and clean-up handler.</p> | |||||
<h3><code><converter-def></code></h3> | |||||
<p>Register a type converter. These are used when configuring a task | |||||
or data-type from attributes.</p> | |||||
<h3><code><type-def></code></h3> | |||||
<p>Register a task or data-type.</p> | |||||
<h3><code><import></code></h3> | |||||
<p>Register the contents of an antlib.</p> | |||||
</section> | |||||
<section name="Conditions"> | |||||
<p>The following conditions are available </p> | |||||
<h3><code><and></code></h3> | |||||
<p>Evaluates a set of nested conditions, and AND them together. Evaluation is | |||||
lazy. An empty <code><and></code> condition evaluates to true.</p> | |||||
<h3><code><available></code></h3> | |||||
<p>Tests if a particular class or resource is available.</p> | |||||
<h3><code><file-test></code></h3> | |||||
<p>Tests a file against a set of <a href="vfs.html#File Selectors">file selectors</a>.</p> | |||||
<h3><code><is-set></code></h3> | |||||
<p>Tests whether a proeprty is set, and not set to 'false'.</p> | |||||
<h3><code><or></code></h3> | |||||
<p>Evaluates a set of nested conditions, and OR them together. Evaluation is | |||||
lazy. An empty <code><or></code> evaluates to true.</p> | |||||
<h3><code><os></code></h3> | |||||
<p>Tests which operating system the build is running on.</p> | |||||
<h3><code><not></code></h3> | |||||
<p>Negates a nested condition.</p> | |||||
</section> | |||||
<section name="File Name Mappers"> | |||||
<p>The following file name mappers are available:</p> | |||||
<h3><code><chain></code></h3> | |||||
<p>Applies a set of nested file name mappers to file names.</p> | |||||
<h3><code><flatten></code></h3> | |||||
<p>Maps all file names to a single directory.</p> | |||||
<h3><code><prefix></code></h3> | |||||
<p>Adds a prefix to the front of each file name.</p> | |||||
<h3><code><map-extension></code></h3> | |||||
<p>Changes the extension of file names.</p> | |||||
</section> | |||||
</body> | |||||
</document> |
@@ -1,136 +0,0 @@ | |||||
<?xml version="1.0"?> | |||||
<document> | |||||
<properties> | |||||
<title>On ClassLoaders in Ant 2</title> | |||||
<author email="peter@apache.org">Peter Donald</author> | |||||
</properties> | |||||
<body> | |||||
<section name="ClassLoader Management"> | |||||
<p>In many ways Ant 2 needs to follow rules similar to a number of | |||||
different application servers with respect to ClassLoader management. | |||||
Ant 2 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 Ant 2 is as | |||||
follows:</p> | |||||
<source> | |||||
Bootstrap | |||||
| | |||||
System | |||||
| | |||||
Common | |||||
/ \ | |||||
Container Shared | |||||
/ \ | |||||
Antlib1 Antlib2 ... | |||||
</source> | |||||
<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 libraries. 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 Ant 2 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 libraries 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 libraries (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> | |||||
</section> | |||||
</body> | |||||
</document> |
@@ -1,205 +0,0 @@ | |||||
<?xml version="1.0"?> | |||||
<document> | |||||
<properties> | |||||
<title>On Task Configuring in Ant 2</title> | |||||
<author email="peter@apache.org">Peter Donald</author> | |||||
</properties> | |||||
<body> | |||||
<section name="Introduction"> | |||||
<p>This section will describe in detail the mechanism via which tasks are | |||||
configured. Configuration is the name given to the stage in tasks | |||||
lifecycle via which the XML representation is mapped onto the task | |||||
object.</p> | |||||
</section> | |||||
<section name="Names"> | |||||
<p>When mapping the XML representation on to the task object you | |||||
need to be able map the names as they appear in the XML to the | |||||
names as they appear in the Java code. The process is for generating | |||||
a java name from the xml name is as follows.</p> | |||||
<ol> | |||||
<li>Capitalize the first character of name.</li> | |||||
<li>Find any '-' characters in XML name and remove character and | |||||
capitalize the following letter. (And there must be a following | |||||
letter)</li> | |||||
</ol> | |||||
<p>Some example mappings;</p> | |||||
<source> | |||||
my-name ===> MyName | |||||
aString ===> AString | |||||
Basedir ===> Basedir | |||||
baseDir ===> BaseDir | |||||
url ===> Url</source> | |||||
<p>Note that the above transformation is lossy and as such the | |||||
following XML names all map to the same Java name. The ant1.x mapping | |||||
is similarly lossy and in practice this has not been an issue.</p> | |||||
<source> | |||||
base-dir ===> BaseDir | |||||
Base-dir ===> BaseDir | |||||
baseDir ===> BaseDir | |||||
BaseDir ===> BaseDir</source> | |||||
<p><i>NOTE: We should really resolve this and either disallow '-' characters | |||||
or disallow uppercase or something. (PD)</i></p> | |||||
</section> | |||||
<section name="Resolving Values"> | |||||
<p>The first stage of mapping the XML representation to the task | |||||
is resolving all text data. The text data that needs to be resolved | |||||
include the values of attributes and the content.</p> | |||||
<p>Resolution consists of expanding any property references in the text | |||||
data. Property references are identified as starting with the token | |||||
"${" and finishing with another "}" token. The text | |||||
in between is the name of a property. The value of the property replaces | |||||
the sequence of text starting with the "${" token and finishing | |||||
with the "}" token.</p> | |||||
<p>Note that the value of the property may not be a string. If the text data | |||||
contains text (or other property references) to either side of the property | |||||
reference then it must be <a href="converter.html">converted</a> to a | |||||
String.</p> | |||||
</section> | |||||
<section name="Modeller"> | |||||
<p>Currently the representation of object are stored in a hierarchial | |||||
tree of <code>org.apache.myrmidon.api.metadata.ModelElement</code> | |||||
objects. Each ModelElement has a number of attributes and can have | |||||
either content or sub-elements.</p> | |||||
<p>In most cases it is the responsibility of the runtime to map | |||||
the ModelElement onto an object. However in some cases it may be useful | |||||
for the object to get access to it's own model and for it to explicitly | |||||
manage it's own configuration. In this case the object should implement | |||||
the <code>org.apache.myrmidon.api.metadata.Modeller</code> interface | |||||
which will provide the mechanism for the object to receive its own | |||||
representation and configure itself.</p> | |||||
<p>Note that the Modeller mechanism should be avoided if possible | |||||
as it adds considerable complexity to the implementing object.</p> | |||||
</section> | |||||
<section name="Attributes"> | |||||
<p>To map an XML attribute on to a Java object, the name of the | |||||
attribute is mapped to a java name and prefixed with the string | |||||
"set". The resulting string is then used to look up a | |||||
method with a single parameter.</p> | |||||
<p>For example, for the attribute "world" would result | |||||
in a lookup of a method named "setWorld" with a single | |||||
parameter.</p> | |||||
<p>If multiple methods were matched during the lookup then an | |||||
exception is thrown indicating ambiguity. Theres is an exception | |||||
to this rule that allows 2 methods to be matched if one of the | |||||
methods takes a <code>java.lang.String</code> parameter. The method | |||||
that has the <code>java.lang.String</code> parameter is ignored and | |||||
the other method would be chosen. This exception is allowed as it is | |||||
common practice for a task to evolve from String parameters to more | |||||
strongly typed parameters.</p> | |||||
<p>The resolved text data of the attribute must be | |||||
<a href="converter.html">converted</a> to the type of the matched | |||||
methods parameter. For example, if the "setWorld" method | |||||
took a parameter of type <code>java.io.File</code> then the resolved | |||||
text data must be converted into a <code>java.io.File</code>. The | |||||
conversion is done by the Converter architecture that is more fully | |||||
described in the <a href="converter.html">Converter HOWTO</a>.</p> | |||||
<p>After the value is converted to the correct type the method is | |||||
invoked with the converted value.</p> | |||||
</section> | |||||
<section name="Content"> | |||||
<p>The XML representation of object can have either have nested | |||||
elements or nested text (content) but not both. To add the content | |||||
to an object a method named "content" with one parameter is looked | |||||
up. The resolved text data for content is then | |||||
<a href="converter.html">converted</a> to the type of the parameter | |||||
and passed in via the method.</p> | |||||
</section> | |||||
<section name="Element"> | |||||
<p>Mapping an ModelElement onto a java object is a series of steps. | |||||
If the ModelElement name ends with the string "-ref" then | |||||
it is treated as a reference element - see the <em>Referrenced | |||||
Elements</em> section. Otherwise, the element is first attempted to | |||||
be mapped as a <em>Named Element</em> and if no match is found via | |||||
that method it tries to treat the element as a <em>Typed Element</em>.</p> | |||||
<subsection name="Named Elements"> | |||||
<p>To map a named ModelElement on to a Java object, the name of | |||||
the element is mapped to a java name and prefixed with the string | |||||
"add". The resulting string is then used to look up a | |||||
method with a single parameter.</p> | |||||
<p>For example, for the attribute "geometry" would result | |||||
in a lookup of a method named "addGeometry" with a single | |||||
parameter. If multiple methods were matched during the lookup then an | |||||
exception is thrown indicating ambiguity. If no methods were found that | |||||
match name then skip down to configuring "typed" elements.</p> | |||||
<p>The type of the methods single parameter is then examined to determine | |||||
what happens next. There are two valid situations, if neither of these are | |||||
satisfied, then an exception is thrown.</p> | |||||
<ul> | |||||
<li>The parameters type is <code>org.apache.myrmidon.api.metadata.ModelElement</code></li> | |||||
<li>The parameters type is a concrete class</li> | |||||
</ul> | |||||
<p>1. If the parameter has a type of <code>org.apache.myrmidon.api.metadata.ModelElement</code> | |||||
then the un-modified model representation of element is passed to object by invoking | |||||
the adder method.</p> | |||||
<p>2. If the parameters type is concrete then an instance of the parameter is | |||||
instantiated using the default constructor. This created object is then configured | |||||
in the same manner as task using the elements representation as the model. After | |||||
the object is configured it is passed into object by invoking the adder method.</p> | |||||
</subsection> | |||||
<subsection name="Referrenced Elements"> | |||||
<p>A referenced element is one that has a name ending in | |||||
"-ref" and has a single attribute "name" | |||||
and no content or child elements.</p> | |||||
<p>The value of the "name" attribute is the name of a property. | |||||
The value of this property is retrieved from the TaskContext.</p> | |||||
<p>Like with <em>Named Elements</em> the name of the element (minus | |||||
the "-ref" part) is mapped to a java name and prefixed with the string | |||||
"add". The resulting string is then used to look up a | |||||
method with a single parameter. If multiple methods were matched during the lookup then an | |||||
exception is thrown indicating ambiguity.</p> | |||||
<p>The value retrieved from the TaskContext is then converted to the type | |||||
of the methods parameter and the add method is invoked with the converted value.</p> | |||||
<p>An example usage is the following;</p> | |||||
<source><![CDATA[ | |||||
<my-task ...> | |||||
<classpath-ref name="project.class.path"/> | |||||
</my-task> | |||||
]]></source> | |||||
</subsection> | |||||
<subsection name="Typed Elements"> | |||||
<p>"Typed" elements can also be added to an object. A typed element | |||||
is one in which the name of the element actually refers to a type rather than the | |||||
name of the adder to call.</p> | |||||
<p>For example, you may wish to allow a task to add arbitrary instances of the | |||||
Condition role to a task. So instead of adding methods such as | |||||
<code>addAnd(AndCondition)</code>, <code>addOr(OrCondition)</code> and | |||||
<code>addXor(XorCondition)</code> you can instead add a single method | |||||
<code>add(Condition)</code>. This vastly simplifies the amount of work required | |||||
to write tasks that take conditions. More importantly it allows end-users to | |||||
extend the number of elements selected by task. For instance if the user wanted | |||||
a "nand" condition they could write the Nand type use it in their build | |||||
file. For a discussion on roles and types see the <a href="types.html">Types | |||||
HOWTO</a>.</p> | |||||
<p>To use a Typed adder there must be a single method named "add" that | |||||
has a single parameter. The parameter <em>MUST</em> be an abstract interface and | |||||
must be registered as a role. The name of the element is then used to lookup the | |||||
a type in the TypeManager with a role matching the interface name.</p> | |||||
<p>For example if an element named "nand" was added to an object that had | |||||
an adder with the signature <code>void add( Condition condition )</code> then | |||||
the type named "nand" in the role "Condition" would be looked up. | |||||
An instance of the type would then be created using the default constructor and the | |||||
created object would be configured and then adder to object using adder.</p> | |||||
</subsection> | |||||
</section> | |||||
</body> | |||||
</document> |
@@ -1,49 +0,0 @@ | |||||
<document> | |||||
<properties> | |||||
<author email="adammurdoch@apache.org">Adam Murdoch</author> | |||||
<title>Differences to Ant 1</title> | |||||
</properties> | |||||
<body> | |||||
<section name="Differences to Ant 1.x"> | |||||
<p>Some of the differences between Ant 1.x and Myrmidon:</p> | |||||
<ul> | |||||
<li> | |||||
Groups of tasks can be assembled into self-describing | |||||
<i>antlib</i> task libraries. This makes it very easy to | |||||
distribute and install tasks and data-types. | |||||
</li> | |||||
<li> A project can import other projects, and reference their targets. </li> | |||||
<li>Properties and data type references now share the same namespace.</li> | |||||
<li> | |||||
Changes to task and data-type API: | |||||
<ul> | |||||
<li>An interface based API, through which a task interacts with the | |||||
task engine, and the services it provides.</li> | |||||
<li>A well-defined object lifecycle.</li> | |||||
<li>Polymorphic types are supported when objects are configured.</li> | |||||
<li>Reference handling is handled automatically when objects are configured.</li> | |||||
<li>Aspects can be used to decorate tasks, to add facilities like logging, | |||||
error handling, or user preferences.</li> | |||||
</ul> | |||||
</li> | |||||
<li>A set of well-defined services and APIs have been introduced, to allow | |||||
tasks to do their work without depending on other tasks: | |||||
<ul> | |||||
<li>Execute external commands.</li> | |||||
<li>Execute other tasks.</li> | |||||
<li>Manage ClassLoaders and Class-paths.</li> | |||||
<li>Virtual file system (in progress).</li> | |||||
<li>Execute Java applications (in progress).</li> | |||||
<li>...</li> | |||||
</ul> | |||||
</li> | |||||
</ul> | |||||
<p>There are plenty more features planned. You can read about them | |||||
<a href="todo.html">here</a>. | |||||
</p> | |||||
</section> | |||||
</body> | |||||
</document> |
@@ -1,30 +0,0 @@ | |||||
<document> | |||||
<properties> | |||||
<author email="adammurdoch@apache.org">Adam Murdoch</author> | |||||
<title>Get Involved</title> | |||||
</properties> | |||||
<body> | |||||
<section name="Get Involved"> | |||||
<p>There are plenty of things you can do to help out with Myrmidon. The | |||||
<a href="todo.html">Todo list </a> 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> | |||||
</section> | |||||
</body> | |||||
</document> |
@@ -1,85 +0,0 @@ | |||||
<document> | |||||
<properties> | |||||
<author email="peter@apache.org">Peter Donald</author> | |||||
<title>Myrmidon</title> | |||||
</properties> | |||||
<body> | |||||
<section name="What is Ant?"> | |||||
<p>Ant is a cross-platform build tool that features ease of | |||||
use and extensibility as it's primary goal.</p> | |||||
<p>Why another build tool when there is already make, gnumake, | |||||
nmake, jam, and others? Make-like tools are inherently shell-based; | |||||
they execute native commands and shell scripts to perform the work | |||||
associated with the build process. So to extend the the tool by | |||||
writing a program or script executable by the OS you are on. This | |||||
makes it difficult to achieve portability between platforms.</p> | |||||
<p>Ant is a different beast. Instead of using OS-specific commands | |||||
to extend the build process, you leverage the cross-platform features | |||||
of Java to write "tasks". This makes it much easier to achieve | |||||
a portal build process between platforms. Ant also differs in that it uses | |||||
XML to describe the build process.</p> | |||||
</section> | |||||
<section name="What is Myrmidon?"> | |||||
<p>Myrmidon is a proposal for Ant 2. Ant 2 is the next evolution of the | |||||
Ant build tool aimed at removing many of the limitations of the Ant 1.x | |||||
product. In particular it aims to;</p> | |||||
<ul> | |||||
<li>Remove ambiguities and points of confusion for build file | |||||
writers.</li> | |||||
<li>Ease deployment and management of 3rd party tasks and | |||||
dependencies.</li> | |||||
<li>Simplify development of tasks by task-writers.</li> | |||||
<li>Enable ad-hoc "tasks" to be written inside build file, | |||||
probably using well known scripting languages such as python and | |||||
javascript. (Possible in Ant 1.x but prohibitively difficult).</li> | |||||
<li>Integrate templating technologies such as XSLT, velocity etc | |||||
to enable development of reusable build file elements.</li> | |||||
</ul> | |||||
<p> You can read more about the goals of Ant 2 | |||||
<a href="http://jakarta.apache.org/ant/ant2/">here</a>. | |||||
</p> | |||||
<p>Myrmidon was specifically designed as both a tool and as | |||||
an API library that can be reused in other products. It contains the | |||||
basic building blocks for assembling any sort of task-based tool. Ant 2 | |||||
is an example of such a tool, which could be assembled using the Myrmidon | |||||
task container, and a library of build related tasks. In the future expect | |||||
to see Testing frameworks, Job Schedulers (ie Cron managers), shells | |||||
and install tools based on the Myrmidon base.</p> | |||||
</section> | |||||
<section name="A Rose by any other name ..."> | |||||
<p> | |||||
The name Myrmidon is a derivation of a mythological name for some ants that were turned | |||||
into soldiers by the god Zeus. It came to mean "a subordinate who executes orders | |||||
unquestioningly" which seemed suitable for a task execution/build tool. A more complete | |||||
description stolen from | |||||
<a href="http://bondi-blue.parlez.com/previous_words/myrmidon.txt"> | |||||
http://bondi-blue.parlez.com/previous_words/myrmidon.txt</a>. | |||||
</p> | |||||
<quote> | |||||
<i>The appellation Myrmidon was derived from the Greek word "myrmex", | |||||
meaning ant. According to Greek mythology, the Myrmidons were | |||||
transformed into humans by the god Zeus as an act of kindness to his | |||||
son Aeacus. King Aeacus, captivated by a colony of ants, prayed | |||||
that he should receive an increase in population equal to the | |||||
number of ants before him. When he awoke the next day, the ants | |||||
were his human subjects. Thereafter, they were known as the | |||||
Myrmidons. See "The Iliad" for Homers' account of the Myrmidons | |||||
during the Trojan War.</i> | |||||
</quote> | |||||
</section> | |||||
</body> | |||||
</document> |
@@ -1,187 +0,0 @@ | |||||
<?xml version="1.0"?> | |||||
<document> | |||||
<properties> | |||||
<title>On Libraries in Ant 2</title> | |||||
<author email="peter@apache.org">Peter Donald</author> | |||||
</properties> | |||||
<body> | |||||
<section name="Library Management"> | |||||
<p>Long ago there was identified the need for libraries 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 Ant 2. The libraries (also referred to as | |||||
deployments) will be termed antlibs.</p> | |||||
<p>Ant libraries 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 libraries 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> | |||||
<subsection name="Descriptors"> | |||||
<p>FIXME: Import this part from other doco</p> | |||||
</subsection> | |||||
<subsection name="Class and Resource Files"> | |||||
<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> | |||||
</subsection> | |||||
<subsection name="Dependencies"> | |||||
<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>Ant 2 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> | |||||
<source> | |||||
Extension-List: trax | |||||
trax-Extension-Name: Java API for XML Parsing | |||||
trax-Specification-Version: 1.1 | |||||
</source> | |||||
<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> | |||||
<source> | |||||
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 | |||||
</source> | |||||
<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> | |||||
<source> | |||||
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 | |||||
</source> | |||||
<p>To make other jars available to Ant libraries 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> | |||||
<source> | |||||
Extension-Name: org.realityforge.dve | |||||
Specification-Vendor: Peter Donald | |||||
Specification-Version: 1.0 | |||||
</source> | |||||
<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> | |||||
</subsection> | |||||
<subsection name="Implementation Notes"> | |||||
<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> | |||||
</subsection> | |||||
</section> | |||||
</body> | |||||
</document> |
@@ -1,91 +0,0 @@ | |||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |||||
<!-- Content Stylesheet for Site --> | |||||
## Defined variables | |||||
#set ($bodybg = "#ffffff") | |||||
#set ($bodyfg = "#000000") | |||||
#set ($bodylink = "#525D76") | |||||
#set ($bannerbg = "#525D76") | |||||
#set ($bannerfg = "#ffffff") | |||||
#set ($subbannerbg = "#828DA6") | |||||
#set ($subbannerfg = "#ffffff") | |||||
#set ($tablethbg = "#039acc") | |||||
#set ($tabletdbg = "#a0ddf0") | |||||
<!-- start the processing --> | |||||
#document() | |||||
<!-- end the processing --> | |||||
## This is where the common page macro's live | |||||
#macro ( subsection $subsection) | |||||
<table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||||
<tr><td bgcolor="$subbannerbg"> | |||||
<font color="$subbannerfg" face="arial,helvetica,sanserif"> | |||||
#if ( $subsection.getAttributeValue("anchor") ) | |||||
#set ($anchor = $subsection.getAttributeValue("anchor")) | |||||
#else | |||||
#set ($anchor = $subsection.getAttributeValue("name")) | |||||
#end | |||||
<a name="$anchor"><strong>$subsection.getAttributeValue("name")</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
#foreach ( $items in $subsection.getChildren() ) | |||||
#if ($items.getName().equals("img")) | |||||
#image ($items) | |||||
#elseif ($items.getName().equals("source")) | |||||
#source ($items) | |||||
#elseif ($items.getName().equals("table")) | |||||
#table ($items) | |||||
#else | |||||
$xmlout.outputString($items) | |||||
#end | |||||
#end | |||||
</blockquote> | |||||
</td></tr> | |||||
</table> | |||||
#end | |||||
#macro ( section $section) | |||||
<table border="0" cellspacing="0" cellpadding="2" width="100%"> | |||||
<tr><td bgcolor="$bannerbg"> | |||||
<font color="$bannerfg" face="arial,helvetica,sanserif"> | |||||
#if ( $section.getAttributeValue("anchor") ) | |||||
#set ($anchor = $section.getAttributeValue("anchor")) | |||||
#else | |||||
#set ($anchor = $section.getAttributeValue("name")) | |||||
#end | |||||
<a name="$anchor"><strong>$section.getAttributeValue("name")</strong></a> | |||||
</font> | |||||
</td></tr> | |||||
<tr><td> | |||||
<blockquote> | |||||
#foreach ( $items in $section.getChildren() ) | |||||
#if ($items.getName().equals("img")) | |||||
#image ($items) | |||||
#elseif ($items.getName().equals("source")) | |||||
#source ($items) | |||||
#elseif ($items.getName().equals("table")) | |||||
#table ($items) | |||||
#elseif ($items.getName().equals("subsection")) | |||||
#subsection ($items) | |||||
#else | |||||
$xmlout.outputString($items) | |||||
#end | |||||
#end | |||||
</blockquote> | |||||
</td></tr> | |||||
</table> | |||||
#end | |||||
#macro (document) | |||||
#header() | |||||
#set ($allSections = $root.getChild("body").getChildren("section")) | |||||
#foreach ( $section in $allSections ) | |||||
#section ($section) | |||||
#end | |||||
#footer() | |||||
#end |
@@ -1,34 +0,0 @@ | |||||
<project name="Apache Myrmidon" href="http://jakarta.apache.org/ant/myrmidon"> | |||||
<title>Apache Myrmidon</title> | |||||
<body> | |||||
<menu name="Myrmidon"> | |||||
<item name="Introduction" href="/index.html"/> | |||||
<item name="Get Involved" href="/getinvolved.html"/> | |||||
<item name="Building Myrmidon" href="/user.html"/> | |||||
<item name="Todo List" href="/todo.html"/> | |||||
</menu> | |||||
<menu name="User Guide"> | |||||
<item name="Project File" href="/buildfile.html"/> | |||||
<item name="Virtual File System" href="/vfs.html"/> | |||||
<item name="Ant 1 Compatibility Layer" href="/ant1compat.html"/> | |||||
<item name="Differences to Ant 1" href="/differences.html"/> | |||||
<item name="My First Task" href="/task.html"/> | |||||
</menu> | |||||
<menu name="Extending Ant"> | |||||
<item name="Configuration HOWTO" href="/configuring.html"/> | |||||
<item name="Converter HOWTO" href="/converter.html"/> | |||||
<item name="Type HOWTO" href="/type.html"/> | |||||
<item name="ClassLoader HOWTO" href="/classloader.html"/> | |||||
<item name="Library HOWTO" href="/librarys.html"/> | |||||
</menu> | |||||
<menu name="Container Design"> | |||||
</menu> | |||||
</body> | |||||
</project> |
@@ -1,197 +0,0 @@ | |||||
## This is where the common macro's live | |||||
#macro ( table $table) | |||||
<table> | |||||
#foreach ( $items in $table.getChildren() ) | |||||
#if ($items.getName().equals("tr")) | |||||
#tr ($items) | |||||
#end | |||||
#end | |||||
</table> | |||||
#end | |||||
#macro ( tr $tr) | |||||
<tr> | |||||
#foreach ( $items in $tr.getChildren() ) | |||||
#if ($items.getName().equals("td")) | |||||
#td ($items) | |||||
#elseif ($items.getName().equals("th")) | |||||
#th ($items) | |||||
#end | |||||
#end | |||||
</tr> | |||||
#end | |||||
#macro ( td $value) | |||||
#if ($value.getAttributeValue("colspan")) | |||||
#set ($colspan = $value.getAttributeValue("colspan")) | |||||
#end | |||||
#if ($value.getAttributeValue("rowspan")) | |||||
#set ($rowspan = $value.getAttributeValue("rowspan")) | |||||
#end | |||||
<td bgcolor="$tabletdbg" colspan="$!colspan" rowspan="$!rowspan" | |||||
valign="top" align="left"> | |||||
<font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||||
#if ($value.getText().length() != 0 || $value.hasChildren()) | |||||
$xmlout.outputString($value, true) | |||||
#else | |||||
| |||||
#end | |||||
</font> | |||||
</td> | |||||
#end | |||||
#macro ( th $value) | |||||
#if ($value.getAttributeValue("colspan")) | |||||
#set ($colspan = $value.getAttributeValue("colspan")) | |||||
#end | |||||
#if ($value.getAttributeValue("rowspan")) | |||||
#set ($rowspan = $value.getAttributeValue("rowspan")) | |||||
#end | |||||
<td bgcolor="$tablethbg" colspan="$!colspan" rowspan="$!rowspan" | |||||
valign="top" align="left"> | |||||
<font color="#000000" size="-1" face="arial,helvetica,sanserif"> | |||||
#if ($value.getText().length() != 0 || $value.hasChildren()) | |||||
$xmlout.outputString($value, true) | |||||
#else | |||||
| |||||
#end | |||||
</font> | |||||
</td> | |||||
#end | |||||
#macro ( projectanchor $name $value ) | |||||
#if ($value.startsWith("http://")) | |||||
<a href="$value">$name</a> | |||||
#elseif ($value.startsWith("/site")) | |||||
<a href="http://jakarta.apache.org$value">$name</a> | |||||
#else | |||||
<a href="$relativePath$value">$name</a> | |||||
#end | |||||
#end | |||||
#macro ( metaauthor $author $email ) | |||||
<meta name="author" value="$author"> | |||||
<meta name="email" value="$email"> | |||||
#end | |||||
#macro ( image $value ) | |||||
#if ($value.getAttributeValue("width")) | |||||
#set ($width=$value.getAttributeValue("width")) | |||||
#end | |||||
#if ($value.getAttributeValue("height")) | |||||
#set ($height=$value.getAttributeValue("height")) | |||||
#end | |||||
#if ($value.getAttributeValue("align")) | |||||
#set ($align=$value.getAttributeValue("align")) | |||||
#end | |||||
<img src="$relativePath$value.getAttributeValue("src")" | |||||
width="$!width" height="$!height" align="$!align"> | |||||
#end | |||||
#macro ( source $value) | |||||
<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>$escape.getText($value.getText())</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> | |||||
#end | |||||
#macro ( makeProject ) | |||||
#set ($menus = $project.getChild("body").getChildren("menu")) | |||||
#foreach ( $menu in $menus ) | |||||
<p><strong>$menu.getAttributeValue("name")</strong></p> | |||||
<ul> | |||||
#foreach ( $item in $menu.getChildren() ) | |||||
#set ($name = $item.getAttributeValue("name")) | |||||
<li>#projectanchor($name $item.getAttributeValue("href"))</li> | |||||
#end | |||||
</ul> | |||||
#end | |||||
#end | |||||
#macro (getProjectImage) | |||||
#if ($project.getChild("logo")) | |||||
<td align="left"> | |||||
<a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" border="0"/></a> | |||||
</td> | |||||
<td align="right"> | |||||
#set ( $logoString = $project.getChild("logo").getAttributeValue("href") ) | |||||
#if ( $logoString.startsWith("/") ) | |||||
<a href="$project.getAttributeValue("href")"><img src="$relativePath$logoString" alt="$project.getChild("logo").getText()" border="0"/></a> | |||||
#else | |||||
<a href="$project.getAttributeValue("href")"><img src="$relativePath/$logoString" alt="$project.getChild("logo").getText()" border="0"/></a> | |||||
#end | |||||
</td> | |||||
#else | |||||
<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> | |||||
#end | |||||
#end | |||||
#macro (header) | |||||
<html> | |||||
<head> | |||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> | |||||
#set ($authors = $root.getChild("properties").getChildren("author")) | |||||
#foreach ( $au in $authors ) | |||||
#metaauthor ( $au.getText() $au.getAttributeValue("email") ) | |||||
#end | |||||
<title>$project.getChild("title").getText() - $root.getChild("properties").getChild("title").getText()</title> | |||||
</head> | |||||
<body bgcolor="$bodybg" text="$bodyfg" link="$bodylink"> | |||||
<table border="0" width="100%" cellspacing="0"> | |||||
<!-- TOP IMAGE --> | |||||
<tr> | |||||
<td>#getProjectImage()</td> | |||||
<td valign="bottom"><div align="right"><b><font size="+3" color="$bannerbg">$project.getChild("title").getText()</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"> | |||||
#makeProject() | |||||
</td> | |||||
<td align="left" valign="top"> | |||||
#end | |||||
#macro (footer) | |||||
</td> | |||||
</tr> | |||||
<!-- FOOTER --> | |||||
<tr><td colspan="2"> | |||||
<hr noshade="" size="1"/> | |||||
</td></tr> | |||||
<tr><td colspan="2"> | |||||
<div align="center"><font color="$bodylink" size="-1"><em> | |||||
Copyright © 2000-2002, Apache Software Foundation | |||||
</em></font></div> | |||||
</td></tr> | |||||
</table> | |||||
</body> | |||||
</html> | |||||
#end |
@@ -1,112 +0,0 @@ | |||||
<document> | |||||
<properties> | |||||
<author email="peter@apache.org">Peter Donald</author> | |||||
<title>My First Task</title> | |||||
</properties> | |||||
<body> | |||||
<section name="My First Task"> | |||||
<p>In Ant 1 it was very easy to write your own task. In Ant 2 we plan | |||||
to make it even easier. To write a basic task simply follow the following | |||||
formula.</p> | |||||
<ol> | |||||
<li> | |||||
Create a Java class that extends | |||||
<code>org.apache.myrmidon.api.AbstractTask</code> | |||||
</li> | |||||
<li> | |||||
For each attribute, write a setter method. The setter method | |||||
must be a public void method that takes a single argument. The name | |||||
of the method must begin with "set", followed by the attribute name, with | |||||
the first character of the name in uppercase, and the rest in lowercase. | |||||
The type of the attribute can be: | |||||
<ul> | |||||
<li>String</li> | |||||
<li> | |||||
Any primitive type - they are converted for you from their | |||||
String-representation in the buildfile | |||||
</li> | |||||
<li> | |||||
File - the string representation will be interpreted relative to | |||||
the project's basedir. | |||||
</li> | |||||
</ul> | |||||
</li> | |||||
<li> | |||||
For each nested element create a public void method that takes a single | |||||
argument. The name of the method must begin with "add", followed by the | |||||
attribute name, with the first character of the name in uppercase, and | |||||
the rest in lowercase. The type of the parameter is an object with a | |||||
no-arguement constructor. It is configured in exactly the same was a | |||||
task is configured (via setters and adders) and then added to the task. | |||||
</li> | |||||
<li> | |||||
Write a public void method named "execute" with no arguments that | |||||
throws a TaskException. This is the method called to do the | |||||
actual work of the task. | |||||
</li> | |||||
</ol> | |||||
<subsection name="A Basic Example"> | |||||
<p>So a basic task that has one attribute named "message" and just prints | |||||
out this message is as simple as;</p> | |||||
<source> | |||||
package org.realityforge.tasks; | |||||
import org.apache.myrmidon.api.AbstractTask; | |||||
import org.apache.myrmidon.api.TaskException; | |||||
public class SystemOutPrinterTask | |||||
extends Task | |||||
{ | |||||
private String m_message; | |||||
// The setter for the "message" attribute | |||||
public void setMessage( final String message ) | |||||
{ | |||||
m_message = message; | |||||
} | |||||
// The method executing the task | |||||
public void execute() | |||||
throws TaskException | |||||
{ | |||||
System.out.println( m_message ); | |||||
} | |||||
} | |||||
</source> | |||||
<p>To use this task you <em>could</em> create a library but instead we will | |||||
just use <taskdef> to define the task. An example usage would be;</p> | |||||
<source> | |||||
<![CDATA[ | |||||
<?xml version="1.0"?> | |||||
<project version="2.0"> | |||||
<target name="main"> | |||||
<taskdef name="printer" | |||||
classname="org.realityforge.tasks.SystemOutPrinterTask" | |||||
classpath="build/classes"/> | |||||
<printer message="Hello World!"/> | |||||
</target> | |||||
</project> | |||||
]]> | |||||
</source> | |||||
</subsection> | |||||
</section> | |||||
</body> | |||||
</document> |
@@ -1,565 +0,0 @@ | |||||
<document> | |||||
<properties> | |||||
<author email="adammurdoch@apache.org">Adam Murdoch</author> | |||||
<author email="peter@apache.org">Peter Donald</author> | |||||
<title>Get Involved</title> | |||||
</properties> | |||||
<body> | |||||
<section name="Todo List"> | |||||
<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> | |||||
<!-- | |||||
<subsection name=""> | |||||
</subsection> | |||||
--> | |||||
<subsection name="Integrate XDocs proposal"> | |||||
<p>Integrate with the XDocs proposal that generates XML documentation for | |||||
tasks. Rework that proposal so that it knows about the Myrmidon specific | |||||
patterns and features. Also rework it so that it can support reading | |||||
documentation and examples from side-by-side the task.</p> | |||||
</subsection> | |||||
<subsection name="TaskInfo"> | |||||
<p>Consider allowing task writers to write their own TaskInfo objects | |||||
(or at least have them generated from XDoclet directives). This would | |||||
encompass both documentation and perhaps introspection of the types.</p> | |||||
</subsection> | |||||
<subsection name="XML Catalog to load XML Fragments"> | |||||
<p> | |||||
When including fragments of XML we are currently forced to use relative paths. | |||||
However this is sometimes undesirable when a single fragment needs to be used | |||||
across several projects in several different locations. Instead we could use | |||||
a Catalog to name the fragment and then each developer would only need to install | |||||
the fragment once and it would be accessible from all the projects. | |||||
</p> | |||||
</subsection> | |||||
<subsection name="Refactor Java Infrastructure into a Service"> | |||||
<p>Much like Exec should be decoupled from Ant runtime, so should classes | |||||
to implement java task for the same benefits.</p> | |||||
</subsection> | |||||
<subsection name="Structural Dependency Utils"> | |||||
<p> | |||||
In the present ant, it is required that each task manage dependency separately. | |||||
This makes it a lot of work to implement even simple dependency checking. To this | |||||
day many of the core tasks do not implement it correctly. I am specifically | |||||
talking about "structural" dependency information. The main reason is that it is | |||||
painful to implement. | |||||
</p> | |||||
<p> | |||||
Some tasks do no dependency checking and will recompile/transform/etc everytime. | |||||
Others may perform a simple dependency checking (ie if source file is newer than | |||||
destination file then recompile). Ideally a dependency system would actually | |||||
calculate the dependencies correctly. So we need to have some mechanism to determine | |||||
that <code>foo.c</code> actually depends upon <code>foo.h</code>, <code>bar.h</code> | |||||
and <code>baz.h</code>. As this information is particular to each different task | |||||
we need to allow tasks to implement this behaviour. Possibly by supplying an interface | |||||
of the form; | |||||
</p> | |||||
<source> | |||||
public interface DependencyGenerator | |||||
{ | |||||
File[] generateDependencies( File file ); | |||||
} | |||||
</source> | |||||
<p> | |||||
Generating the dependency information is a costly operation and thus we do not want to | |||||
be doing it everytime you run ant. We want to generate it on the initial build and then | |||||
persist somewhere. Everytime a file is out of date, it's dependency information would | |||||
be regenerated and stored in the dependency cache. Ideally this cache would also store the | |||||
above mentioned coloring information. So the entry for <code>foo.c</code> may declare that | |||||
it is dependent upon <code>foo.h</code>, <code>bar.h</code> and <code>baz.h</code>, aswell | |||||
as being compiled with -O2 flag. If any of the dependencies have changed or are out of date | |||||
then foo.c would need to be recompiled. | |||||
</p> | |||||
<p> | |||||
A possible API would be | |||||
</p> | |||||
<source> | |||||
DependencyManager dm = ...; | |||||
dm.setFileSet( myFileSet ); | |||||
dm.setDependencyCache( myDependencyCacheFile ); | |||||
File[] files = cm.getOutOfDate(); | |||||
</source> | |||||
</subsection> | |||||
<subsection name="Antlibs storing templates"> | |||||
<p>After a templating system is formalized it would useful to define | |||||
a mechanism via which you can store templates in an antlib. These | |||||
templates could then be loaded and used by build files through a | |||||
"standard" mechanism. This may need to be merged with the XML catalog | |||||
system.</p> | |||||
</subsection> | |||||
<subsection name="Antlibs Storing General Resources"> | |||||
<p>Add a system via which ant libs can store general resources for | |||||
consumption by build users. This could be used to store the XML fragments | |||||
for the XML catalog, the template fragments for templates, images for | |||||
documentation system and so forth.</p> | |||||
</subsection> | |||||
<subsection name="Coloring API"> | |||||
<p> | |||||
When you execute a task such as "javac" there is two types of dependency information | |||||
that is important to analyze before we determine if we need to recompile a file. Say | |||||
we are compiling <code>Foo.java</code>, it may depend on the <code>Bar.java</code> | |||||
file. We call this "structural" dependency information - the structure of the source file | |||||
determines what other files it depend upon. However there is also "environmental" | |||||
dependency information. For instance if the <code>Foo.java</code> file was compiled with | |||||
<code>debug="true"</code> last run and this time needs to be compiled with | |||||
<code>debug="false"</code> then it is out of date and needs to be recompiled. We call this | |||||
"environmental" dependency information "coloring". | |||||
</p> | |||||
<p> | |||||
So we need to create an infrastructure that allows tasks to manage "coloring". So a task | |||||
should be able to add coloring information for each resource processed. When the task | |||||
comes to process the resource again it will detect if the coloring has changed and if it | |||||
has will force a recompile. | |||||
</p> | |||||
<p> | |||||
An API for such a bean has yet to be established but an example API would be. | |||||
</p> | |||||
<source> | |||||
ColoringManager cm = ...; | |||||
cm.addColor( "debug", "true" ); | |||||
cm.addColor( "optimize", "false" ); | |||||
cm.setFileSet( myFileSet ); | |||||
File[] files = cm.getOutOfDate(); | |||||
</source> | |||||
</subsection> | |||||
<subsection name="Create Task/Element/Attribute Naming guidelines"> | |||||
<p> Currently Ant has a mixture of tasks from various stages it's evolution, with different | |||||
authors and each utilizing different naming patterns. Some tasks use names such as | |||||
"src" and "dest" while others use "file" and "tofile". It would be preferrable if | |||||
consistent naming patterns were used. It is recomended that we come up with a "best | |||||
practices" document to document our recomended naming patterns.</p> | |||||
<p>Before we can come up with such a document we need to identify common patterns through | |||||
out the tasks. Several tasks have the notion of transforming input from a "source" | |||||
to a "destination". So we should have consistent naming schemes for these attributes and | |||||
elements. Analysis of existing tasks will likely bring out other similar patterns. Once | |||||
we have identified and documented these similarities then we can establish conventions.</p> | |||||
</subsection> | |||||
<subsection name="Rethink Notification/Event scheme"> | |||||
<p>We need to rethink the whole notificaiton scheme. Should tasks be able to | |||||
raise events? Probably as long as we have <em>ContainerTasks</em>. Should tasks | |||||
be able to query state of run? ie Can a task request "are we paused?" or "are we | |||||
stopped?" ? Probably as that way long running tasks are given the opportunity | |||||
to be gracefully halted by the end users (primarily aimed at IDE vendors here).</p> | |||||
</subsection> | |||||
<subsection name="XPath-like Locators for tasks"> | |||||
<p>Most tasks are grouped into some sort of task container. The task containers | |||||
can be things like workspaces, projects, targets or other tasks. Each of these | |||||
containers usually has a name. Thus we could refer to tasks via a path such as | |||||
"/avalon/compile/javac" would refer to the task "javac" in the target "compile" | |||||
in the project "avalon". In the past it has been requested that a task get access | |||||
to this path programatically - other people have also asked for access to things | |||||
like the currently running target. We need to assess this and decide whether we | |||||
wish to support it.</p> | |||||
<p>Another point to think about is that we could use XPath-like string to designate | |||||
to other tasks to execute. ie antcall would refer to a path rather than a target name</p> | |||||
</subsection> | |||||
<subsection name="Embeddor HOWTO"> | |||||
<p>Assigned To: Peter</p> | |||||
<p>Write a HOWTO describing how to embed Myrmidon into other | |||||
applications.</p> | |||||
</subsection> | |||||
<subsection name="Optional Dependencies"> | |||||
<p>Assigned To: Peter</p> | |||||
<p>Extend Myrmidons library management facilities so that optional | |||||
dependencies may be declared for a library. ie The library will still | |||||
operate in absence of such libraries but can provide further features | |||||
if these libraries are present. Most likely this will be done via a | |||||
new manifest entry "Optional-Extension-List:" that behaves similar | |||||
to "Extension-List:" except that the extensions are optional.</p> | |||||
</subsection> | |||||
<subsection name="Facade task HOWTO"> | |||||
<p>Currently we have a few tasks that have multiple implementations. For instance | |||||
Javac task can actually call jikes, jvc, classic javac or modern javac. Similar things | |||||
will be seen with the jspc task and the cc task (if it ever gets written). We have a base | |||||
class that is meant to facilitate this sort of task and make it easy to develope. See | |||||
AbstractFacadeTask. However we need to write up a HOWTO so people can use it.</p> | |||||
</subsection> | |||||
<subsection name="Mail tasks"> | |||||
<p>Convert the Ant 1.x Mail tasks to Myrmidon.</p> | |||||
</subsection> | |||||
<subsection name="Security Manager"> | |||||
<p>Add the ability to run java programs that call System.exit() by adding a | |||||
security manager. Should look something like:</p> | |||||
<source> | |||||
public class MyrmidonSecurityManager | |||||
extends SecurityManager | |||||
{ | |||||
public void checkExit( final int status ) | |||||
{ | |||||
throw new ExitException( status ); | |||||
} | |||||
public void checkPermission( final Permission permission ) | |||||
{ | |||||
} | |||||
} | |||||
</source> | |||||
</subsection> | |||||
<subsection name="Self Hosting"> | |||||
<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> | |||||
</subsection> | |||||
<subsection name="Validation Pass"> | |||||
<p>Consider calling validate() on task prior to execute(). This would allow | |||||
us to have a "make -k" mode that actually did basic validation and would also | |||||
encourage task writers to do validation properly.</p> | |||||
</subsection> | |||||
<subsection name="Paths"> | |||||
<p>Consider allowing the user to configure the ant system by setting the | |||||
following path types.</p> | |||||
<ul> | |||||
<li>ant.type.path: path that is used to search for the type libraries</li> | |||||
<li>ant.ext.path: path that is used to search for "Optional Packages" | |||||
or extensions.</li> | |||||
</ul> | |||||
<p> | |||||
The default search path will probably include a per-user path element, | |||||
a workspace path element and a system path elemtn that are searched in | |||||
that order. Some possible defaults; | |||||
</p> | |||||
<ul> | |||||
<li>Unix Per-user: ${user.home}/.ant/lib, ${user.home}/.ant/ext</li> | |||||
<li>Windows Per-user: ${user.home}/ant/lib, ${user.home}/ant/ext</li> | |||||
<li>MacOSX Per-user: ${user.home}/Library/Ant/lib, | |||||
${user.home}/Library/Ant/ext</li> | |||||
<li>Unix System-wide: /opt/ant/lib, /opt/ant/ext</li> | |||||
<li>Unix System-wide: /usr/local/ant/lib, /usr/local/ant/ext</li> | |||||
<li>Windows System-wide: %SYS_DRIVE%/Program Files/ant/lib, | |||||
%SYS_DRIVE%/Program Files/ant/ext</li> | |||||
<li>MacOSX System-wide: /Library/Ant/lib, /Library/Ant/ant/ext</li> | |||||
</ul> | |||||
</subsection> | |||||
<subsection name="Ant 1.x Compatibility"> | |||||
<p>The Ant 1 Compatibility layer is still in early stages of development. | |||||
</p> | |||||
<ul> | |||||
<li>Get a version of <code><antcall></code> working.</li> | |||||
<li> | |||||
Provide hooks between Ant 1 references and Myrmidon properties. | |||||
May use converters for adapting Ant 2 objects (like Ant 2 | |||||
<code><path></code> or <code><fileset></code>) | |||||
as Ant 1 types. | |||||
</li> | |||||
<li> | |||||
Missing tests: | |||||
<ul> | |||||
<li>Make sure properties are shared between Ant 1 and Myrmidon tasks.</li> | |||||
</ul> | |||||
</li> | |||||
<li>Get GUMP runs going using Myrmidon.</li> | |||||
<li>Add protected accessors for get/set/list properties in | |||||
Ant 1 Project, to minimise the amount of code duplication in | |||||
Ant1CompatProject.</li> | |||||
</ul> | |||||
</subsection> | |||||
<subsection name="Virtual File System"> | |||||
<p>The VFS needs plenty of work:</p> | |||||
<ul> | |||||
<li>Move files/folders.</li> | |||||
<li>Recursive folders copy.</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>Convert files/folders into local files, for handing off | |||||
to external commands, or legacy tasks.</li> | |||||
<li>Refactor the replication mechanism out of ZipFileSystemProvder, | |||||
and make more general pluggable.</li> | |||||
<li>Capabilities discovery.</li> | |||||
<li>Attributes and attribute schema.</li> | |||||
<li>Handle file canonicalisation better (for cases like case-insensitive | |||||
file systems, symbolic links, name encoding, etc).</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> | |||||
</subsection> | |||||
<subsection name="File Data-Types and Tasks"> | |||||
<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> | |||||
<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 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 conditions: | |||||
<ul> | |||||
<li>Add more condition implementations that perform checks on files. | |||||
One that searches a path for a file would be useful.</li> | |||||
</ul> | |||||
</li> | |||||
<li>File Name Mappers: | |||||
<ul> | |||||
<li>Change FileNameMapper.mapFileName() to take vfs.FileName objects.</li> | |||||
<li>Move the current mapper implementations across to antlib.</li> | |||||
</ul> | |||||
</li> | |||||
<li>File Sets: | |||||
<ul> | |||||
<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 as 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>Port across the Ant 1 file filter proposal, once it is complete.</li> | |||||
<li>Copy task: | |||||
<ul> | |||||
<li>Implement 'preservelastmodified', 'overwrite', and 'includeemptydirs'.</li> | |||||
<li>Support a file name mapper.</li> | |||||
<li>Support file filters.</li> | |||||
<li>Detect and handle destination file name collisions.</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> | |||||
</subsection> | |||||
<subsection name="Command-line and Configuration Files"> | |||||
<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> | |||||
<ul> | |||||
<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> | |||||
</ul> | |||||
</subsection> | |||||
<subsection name="Scripting"> | |||||
<p>Add the ability to extend Ant using languages other than | |||||
Java:</p> | |||||
<ul> | |||||
<li>Define a task using a scripting language such as Javascript.</li> | |||||
<li>Use Rhino's ability to implement Java interfaces, to | |||||
implement and define types, such as FileSelector, or | |||||
Condition.</li> | |||||
<li>Define a task using template.</li> | |||||
<li>Add some lightweight scripting tasks.</li> | |||||
</ul> | |||||
</subsection> | |||||
<subsection name="Documentation"> | |||||
<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> | |||||
<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>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> | |||||
</ul> | |||||
</subsection> | |||||
<subsection name="Miscellaneous"> | |||||
<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>Allow service factories to be configured from the contents of the | |||||
<code>ant-services.xml</code> descriptor. | |||||
</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>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>Move the | |||||
<code><http></code> and | |||||
<code><socket></code> | |||||
conditions to an antlib. Need to resolve how these will be passed a logger. | |||||
</li> | |||||
<li>Add an else block to the | |||||
<code><if></code> task. | |||||
</li> | |||||
<li>Move | |||||
<code>crimson.jar</code> to | |||||
<code>bin/lib</code> in the distribution, | |||||
and make available to other jars via the extension mechanism. | |||||
</li> | |||||
<li>Change <code>DefaultPropertyResolver</code> to ignore '$${'.</li> | |||||
<li>Add a <code>--type</code> command-line option, to allow | |||||
the project builder to be manually selected. | |||||
</li> | |||||
<li>Change <code>ProjectBuilder</code> | |||||
and <code>Embeddor</code> to throw something more | |||||
specialised than Exception. | |||||
</li> | |||||
<li>Change <code>DefaultClassLoaderManager</code> to handle | |||||
directories as part of a library classpath. | |||||
</li> | |||||
<li><code><condition></code> should set the property | |||||
value to <code>false</code> when the condition is false.</li> | |||||
<li>Split the <code><uptodate></code> condition into | |||||
a condition that checks against a single target file, | |||||
and one which checks using a destdir/mapper.</li> | |||||
<li>Add condition implementations to: check JVM version, | |||||
check Ant version, check whether a particular antlib or extension is | |||||
available, match a string against a regular expression.</li> | |||||
<li>Add a task to unset a property.</li> | |||||
<li>Change the various def and import task to allow a classpath | |||||
to be provided.</li> | |||||
<li>Unit tests.</li> | |||||
</ul> | |||||
</subsection> | |||||
</section> | |||||
</body> | |||||
</document> |
@@ -1,118 +0,0 @@ | |||||
<document> | |||||
<properties> | |||||
<author email="adammurdoch@apache.org">Adam Murdoch</author> | |||||
<title>User Guide</title> | |||||
</properties> | |||||
<body> | |||||
<section name="Building Myrmidon"> | |||||
<p> | |||||
First, you will need to fetch the Myrmidon source from CVS. The source | |||||
can be found in the <code>proposal/myrmidon</code> directory of the | |||||
Ant source tree. You should check out the <code>jakarta-ant</code> CVS | |||||
module, as described | |||||
<a href="http://jakarta.apache.org/site/cvsindex.html">here</a>. | |||||
</p> | |||||
<p> | |||||
To build Myrmidon, use the <code>build.xml</code> build script. You will need | |||||
to use Ant 1.4.1 or later. The default target builds the Myrmidon distribution | |||||
into the <code>dist</code> directory. The distribution is a ready-to-run | |||||
installation of Myrmidon. | |||||
</p> | |||||
<p>There are a number features that are not built unless the appropriate optional Jar | |||||
files are found in the <code>lib</code> directory:</p> | |||||
<table> | |||||
<tr><th>Feature</th><th>Jar File</th><th>Download From</th></tr> | |||||
<tr> | |||||
<td>SMB VFS support (Samba, Windows shares)</td> | |||||
<td>jcifs.jar</td> | |||||
<td><a href="http://jcifs.samba.org">jcifs.samba.org</a>. | |||||
<p>Note: there are problems using the 0.6.1 release. Try 0.6.0 instead.</p></td> | |||||
</tr> | |||||
<tr> | |||||
<td>FTP VFS support</td> | |||||
<td>netcomponents.jar</td> | |||||
<td><a href="http://www.savarese.org/oro/software/NetComponents.html">www.savarese.org</a></td> | |||||
</tr> | |||||
</table> | |||||
</section> | |||||
<section name="Running Myrmidon"> | |||||
<p> | |||||
To run Myrmidon, use one of the following methods: | |||||
</p> | |||||
<subsection name="Launcher Script"> | |||||
<p> | |||||
On Windows and Unix platforms, you can use the <code>ant</code> script | |||||
in the distribution's <code>bin</code> directory. The following environment | |||||
variables can be used, but are not required (except on Windows 9x - see below). | |||||
</p> | |||||
<p> | |||||
</p> | |||||
<table> | |||||
<tr><th>Variable</th><th>Description</th></tr> | |||||
<tr> | |||||
<td>JAVA_HOME</td> | |||||
<td>The directory that the JDK is installed in.</td> | |||||
</tr> | |||||
<tr> | |||||
<td>JAVACMD</td> | |||||
<td>The command to use to start the JVM. Defaults to <code>java</code>.</td> | |||||
</tr> | |||||
<tr> | |||||
<td>ANT_HOME</td> | |||||
<td> | |||||
The directory containing the Myrmidon distribution. This must be | |||||
set when running on Windows 95, 98 or Me. | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</subsection> | |||||
<subsection name="Executable Jar File"> | |||||
<p> | |||||
The Myrmidon distribution includes an executable Jar file, which can be used | |||||
to run Myrmidon. Use the following command: | |||||
</p> | |||||
<pre> | |||||
prompt> <i>java</i> -jar <i>ant-home</i>/bin/myrmidon-launcher.jar <i>options</i> | |||||
</pre> | |||||
</subsection> | |||||
<p>When started, Myrmidon looks for a project file called <code>build.ant</code> | |||||
in the current directory. A different project file can be specified using the | |||||
<code>-f</code> command-line option. Myrmidon executes the targets that are | |||||
listed on the command-line, or the default target if none is given. For | |||||
example, the following command executes targets <code>clean</code> and | |||||
<code>build</code> from project file <code>my-project.xml</code>:</p> | |||||
<pre> | |||||
prompt> ant -f my-project.xml clean build | |||||
</pre> | |||||
<p> | |||||
Run Myrmidon with the <code>-h</code> command-line option for a list of | |||||
the command-line options that are available. | |||||
</p> | |||||
</section> | |||||
</body> | |||||
</document> |
@@ -1,2 +0,0 @@ | |||||
file.resource.loader.path=src/xdocs/stylesheets | |||||
velocimacro.library=templates.vm |
@@ -1,218 +0,0 @@ | |||||
<document> | |||||
<properties> | |||||
<author email="adammurdoch@apache.org">Adam Murdoch</author> | |||||
<title>VFS User Guide</title> | |||||
</properties> | |||||
<body> | |||||
<section name="Handling Files"> | |||||
<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><th>File System</th><th>Description</th><th>URL Format</th></tr> | |||||
<tr> | |||||
<td>Local Files</td> | |||||
<td>Files on the local file system.</td> | |||||
<td>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> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td>Zip Files</td> | |||||
<td>The contents of Zip files (and Jar, War, and Ear files). | |||||
Currently, the VFS supports read-only access to Zip file contents.</td> | |||||
<td><code>zip:</code> <i>zip-file-uri</i> [<code>!</code><i>absolute-path</i>]</td> | |||||
</tr> | |||||
<tr> | |||||
<td>FTP</td> | |||||
<td>Files on an FTP server.</td> | |||||
<td><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>]</td> | |||||
</tr> | |||||
<tr> | |||||
<td>SMB</td> | |||||
<td>Files on a CFIS server, such as Samba or Windows shares.</td> | |||||
<td><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>]</td> | |||||
</tr> | |||||
</table> | |||||
<p>Both forward or backward slashes can be used to separate the elements of | |||||
a URL.</p> | |||||
<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> | |||||
<subsection name="File Sets"> | |||||
<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><th>Attribute</th><th>Description</th><th>Default Value</th></tr> | |||||
<tr> | |||||
<td>dir</td> | |||||
<td>The base directory for the file set. This can be any URL that the | |||||
VFS supports.</td> | |||||
<td>Required</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> | |||||
<source><![CDATA[ | |||||
<v-fileset dir="src"> | |||||
<name pattern="org/apache/tools/ant/**"/> | |||||
<is-file/> | |||||
</v-fileset> | |||||
]]></source> | |||||
<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> | |||||
<source><![CDATA[ | |||||
<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> | |||||
]]></source> | |||||
<h3><code><mapped-fileset></code></h3> | |||||
<p>A fileset that applies a <a href="buildfile.html#File Name Mappers">file name mapper</a> | |||||
to a nested fileset. | |||||
</p> | |||||
</subsection> | |||||
<subsection name="Paths"> | |||||
<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> | |||||
</subsection> | |||||
<subsection name="File Selectors"> | |||||
<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><condition></code></h3> | |||||
<p>Takes a set of <a href="buildfile.html#Conditions">conditions</a>. If | |||||
the conditions evaluate to true, then select every file. Otherwise, | |||||
select no files.</p> | |||||
<h3><code><exists></code></h3> | |||||
<p>Selects files that exist.</p> | |||||
<h3><code><is-empty-folder></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> | |||||
</subsection> | |||||
</section> | |||||
</body> | |||||
</document> |