Browse Source

Initial cut of a very basic intro to Myrmidon.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271284 13f79535-47bb-0310-9956-ffa450edef68
master
adammurdoch 23 years ago
parent
commit
ec9816997d
6 changed files with 1184 additions and 1 deletions
  1. +0
    -1
      proposal/myrmidon/.cvsignore
  2. +13
    -0
      proposal/myrmidon/docs.xml
  3. +746
    -0
      proposal/myrmidon/docs/index.html
  4. +333
    -0
      proposal/myrmidon/src/xdocs/index.xml
  5. +81
    -0
      proposal/myrmidon/src/xdocs/stylesheets/docs.vsl
  6. +11
    -0
      proposal/myrmidon/src/xdocs/stylesheets/project.xml

+ 0
- 1
proposal/myrmidon/.cvsignore View File

@@ -1,6 +1,5 @@
design*
.ant.properties
docs
prj.el
test
emacs-jprj.el


+ 13
- 0
proposal/myrmidon/docs.xml View File

@@ -0,0 +1,13 @@
<project name="docs" default="main">
<target name="main">
<taskdef name="anakia" classname="org.apache.velocity.anakia.AnakiaTask"/>
<anakia basedir="src/xdocs"
destdir="docs"
style="docs.vsl"
projectfile="stylesheets/project.xml"
includes="**/*.xml"
excludes="stylesheets/**"
velocitypropertiesfile="src/xdocs/velocity.properties"
/>
</target>
</project>

+ 746
- 0
proposal/myrmidon/docs/index.html View File

@@ -0,0 +1,746 @@
<!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 - Myrmidon</title>
</head>
<body bgcolor="#ffffff" text="#000000" link="#525D76">
<table border="0" width="100%" cellspacing="0">
<!-- TOP IMAGE -->
<tr>
<td colspan="2">
<a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" align="left" border="0"/></a>
</td>
</tr>
</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>
</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 Myrmidon?"><strong>What is Myrmidon?</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
Myrmidon is one of the Ant 2 proposals currently in development. You can
read more about the goals of Ant 2
<a href="http://jakarta.apache.org/ant/ant2/">here</a>.
</p>
<p>
Myrmidon is a general-purpose <i>task engine</i>. 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
engine, and a library of build related tasks.
</p>
<p>
Currently, Myrmidon is a prototype of what a task engine might look. It
includes a small set of tasks and data types. We are currently porting
many of the Ant 1.x tasks to the Myrmidon task engine.
</p>
<p>
</p>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<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>
Changes to the property model:
<ul>
<li>Properties and data type references now share the same namespace.</li>
<li>Properties are mutable.</li>
<li>Properties are scoped into global, local, and parent contexts.</li>
</ul>
</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>
</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 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 source 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>
</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&gt; <i>java</i> -jar <i>ant-home</i>/bin/myrmidon-launcher.jar <i>options</i>
</pre>
</blockquote>
</td></tr>
</table>
<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>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="Project File"><strong>Project File</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
The project file format is very similar to that of Ant 1. The root element of
the project file must be a <code>&lt;project&gt;</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">
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.
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
The directory containing the project file.
</font>
</td>
</tr>
<tr>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
default
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
The name of the default target.
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
<code>main</code>
</font>
</td>
</tr>
<tr>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
version
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
The project file version that the project is written for.
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
None, must be <code>2.0</code>
</font>
</td>
</tr>
</table>
<p>
A <code>&lt;project&gt;</code> element can contain the following elements,
in the order given below:
</p>
<ul>
<li><a href="#Project References"><code>&lt;projectref&gt;</code></a></li>
<li><a href="#Library Imports"><code>&lt;import&gt;</code></a></li>
<li><a href="#Implicit Tasks">Implicit tasks</a></li>
<li><a href="#Targets"><code>&lt;target&gt;</code></a></li>
</ul>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="Project References"><strong>Project References</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>Project references allow the project to import, or reference, other projects.
A <code>&lt;projectref&gt;</code> element takes the following attributes:</p>
<table>
<tr>
<td bgcolor="#039acc" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Attribute
</font>
</td>
<td bgcolor="#039acc" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Description
</font>
</td>
<td bgcolor="#039acc" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Default Value
</font>
</td>
</tr>
<tr>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
name
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
The name to use to identify the referenced project.
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Required
</font>
</td>
</tr>
<tr>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
location
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
The path to the project file to reference.
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Required
</font>
</td>
</tr>
</table>
<p>
The targets of a referenced project can be used in the <code>depends</code> list
of a target in the referencing project, using the following syntax:
<code><i>project-name</i>-&gt;<i>target-name</i></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="Library Imports"><strong>Library Imports</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>Library imports allow the project to import the tasks and data-types from an
antlib. An <code>&lt;import&gt;</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>
</blockquote>
</td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="Implicit Tasks"><strong>Implicit Tasks</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>Implicit tasks are run before any of the project's targets are run.</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="Targets"><strong>Targets</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>Targets are the same as Ant 1.x.</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="Tasks"><strong>Tasks</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
The following table lists the current set of tasks. You can find example
usages of these tasks in the sample project file <code>src/make/sample.ant</code>.
</p>
<table>
<tr>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
fail
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Causes the build to fail.
</font>
</td>
</tr>
<tr>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
if
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Conditionally executes a set of tasks.
</font>
</td>
</tr>
<tr>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
load-properties
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Loads a set of properties from a file.
</font>
</td>
</tr>
<tr>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
log
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Writes a log message.
</font>
</td>
</tr>
<tr>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
property
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Sets a property.
</font>
</td>
</tr>
<tr>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
try-catch
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Runs a set of tasks, with a provided error and clean-up handler.
</font>
</td>
</tr>
<tr>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
converter-def
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Register a type converter. These are used when configuring a task
or data-type from attributes.
</font>
</td>
</tr>
<tr>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
type-def
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Register a task or data-type.
</font>
</td>
</tr>
<tr>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
import
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Register the contents of an antlib.
</font>
</td>
</tr>
</table>
</blockquote>
</td></tr>
</table>
</td>
</tr>

<!-- FOOTER -->
<tr><td colspan="2">
<hr noshade="" size="1"/>
</td></tr>
<tr><td colspan="2">
<div align="center"><font color="#525D76" size="-1"><em>
Copyright &#169; 2000-2002, Apache Software Foundation
</em></font></div>
</td></tr>
</table>
</body>
</html>
<!-- end the processing -->





+ 333
- 0
proposal/myrmidon/src/xdocs/index.xml View File

@@ -0,0 +1,333 @@
<document>

<properties>
<author email="adammurdoch@apache.org">Adam Murdoch</author>
<title>Myrmidon</title>
</properties>

<body>

<section name="What is Myrmidon?">

<p>
Myrmidon is one of the Ant 2 proposals currently in development. You can
read more about the goals of Ant 2
<a href="http://jakarta.apache.org/ant/ant2/">here</a>.
</p>

<p>
Myrmidon is a general-purpose <i>task engine</i>. 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
engine, and a library of build related tasks.
</p>

<p>
Currently, Myrmidon is a prototype of what a task engine might look. It
includes a small set of tasks and data types. We are currently porting
many of the Ant 1.x tasks to the Myrmidon task engine.
</p>

<p>
</p>

<subsection 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>
Changes to the property model:
<ul>
<li>Properties and data type references now share the same namespace.</li>
<li>Properties are mutable.</li>
<li>Properties are scoped into global, local, and parent contexts.</li>
</ul>
</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>

</subsection>

</section>

<section name="Building Myrmidon">

<p>
First, you will need to fetch the Myrmidon source from CVS. The source
can be source 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>

</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>
Run Myrmidon with the <code>-h</code> command-line option for a list of
the command-line options that are available.
</p>

</section>

<section name="Project File">

<p>
The project file format is very similar to that of Ant 1. The root element of
the project file must be a <code>&lt;project&gt;</code> element. It can
take the following attributes:
</p>

<table>
<tr><th>Attribute</th><th>Description</th><th>Default Value</th></tr>
<tr>
<td>basedir</td>
<td>The base directory for the project.</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 version that the project is written for.</td>
<td>None, must be <code>2.0</code></td>
</tr>
</table>

<p>
A <code>&lt;project&gt;</code> element can contain the following elements,
in the order given below:
</p>

<ul>
<li><a href="#Project References"><code>&lt;projectref&gt;</code></a></li>
<li><a href="#Library Imports"><code>&lt;import&gt;</code></a></li>
<li><a href="#Implicit Tasks">Implicit tasks</a></li>
<li><a href="#Targets"><code>&lt;target&gt;</code></a></li>
</ul>

<subsection name="Project References">

<p>Project references allow the project to import, or reference, other projects.
A <code>&lt;projectref&gt;</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 following syntax:
<code><i>project-name</i>-><i>target-name</i></code>.
</p>

</subsection>

<subsection name="Library Imports">

<p>Library imports allow the project to import the tasks and data-types from an
antlib. An <code>&lt;import&gt;</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>

</subsection>

<subsection name="Implicit Tasks">

<p>Implicit tasks are run before any of the project's targets are run.</p>

</subsection>

<subsection name="Targets">

<p>Targets are the same as Ant 1.x.</p>

</subsection>


</section>

<section name="Tasks">

<p>
The following table lists the current set of tasks. You can find example
usages of these tasks in the sample project file <code>src/make/sample.ant</code>.
</p>

<table>
<td><th>Task</th><th>Description</th></td>
<tr>
<td>fail</td>
<td>Causes the build to fail.</td>
</tr>
<tr>
<td>if</td>
<td>Conditionally executes a set of tasks.</td>
</tr>
<tr>
<td>load-properties</td>
<td>Loads a set of properties from a file.</td>
</tr>
<tr>
<td>log</td>
<td>Writes a log message.</td>
</tr>
<tr>
<td>property</td>
<td>Sets a property.</td>
</tr>
<tr>
<td>try-catch</td>
<td>Runs a set of tasks, with a provided error and clean-up handler.</td>
</tr>
<tr>
<td>converter-def</td>
<td>Register a type converter. These are used when configuring a task
or data-type from attributes.</td>
</tr>
<tr>
<td>type-def</td>
<td>Register a task or data-type.</td>
</tr>
<tr>
<td>import</td>
<td>Register the contents of an antlib.</td>
</tr>
</table>

</section>
</body>

</document>

+ 81
- 0
proposal/myrmidon/src/xdocs/stylesheets/docs.vsl View File

@@ -0,0 +1,81 @@
<!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">
<a name="$subsection.getAttributeValue("name")"><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">
<a name="$section.getAttributeValue("name")"><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

+ 11
- 0
proposal/myrmidon/src/xdocs/stylesheets/project.xml View File

@@ -0,0 +1,11 @@
<project name="Apache Myrmidon" href="http://jakarta.apache.org">

<title>Apache Myrmidon</title>

<body>
<menu name="Myrmidon">
<item name="Introduction" href="/index.html"/>
</menu>
</body>

</project>

Loading…
Cancel
Save