<document>

    <properties>
        <author email="adammurdoch@apache.org">Adam Murdoch</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="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 Ant1 Compatibility layer is still in early stages of development.
                </p>
                <ul>
                    <li>Get a version of <code>&lt;ant&gt;</code> and
                    <code>&lt;antcall&gt;</code> working.</li>
                    <li>
                    Provide hooks between Ant1 references and Myrmidon properties.
                    May use converters for adapting Ant2 objects (like Ant2
                    <code>&lt;path&gt;</code> or <code>&lt;fileset&gt;</code>)
                    as Ant1 types.
                    </li>
                    <li>Handle differences between Ant1 if/unless on targets,
                    and Myrmidon &lt;if&gt; task.</li>
                    <li>
                    Write tests for the various bits that rely on Myrmidon
                    functionality:
                    <ul>
                        <li>Simple sanity test</li>
                        <li>if/unless on targets: check that behaviour complies with Ant1</li>
                        <li>Make sure properties are shared between Ant1 and Myrmidon tasks.</li>
                        <li>Make sure that &lt;ant1.property&gt; behaves as per Ant1</li>
                    </ul>
                    </li>
                    <li>Get GUMP runs going using Myrmidon.</li>
                    <li>i18n messages</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>&lt;fileset&gt;</code> and

                    <code>&lt;path&gt;</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>&lt;move&gt;</code>,
                        <code>&lt;delete&gt;</code>,

                        <code>&lt;touch&gt;</code> and
                        <code>&lt;mkdir&gt;</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>&lt;http&gt;</code> and
                        <code>&lt;socket&gt;</code>
                    conditions to an antlib.  Need to resolve how these will be passed a logger.
                    </li>
                    <li>Make the
                        <code>&lt;uptodate&gt;</code> task a condition, and move to
                    an antlib.
                    </li>
                    <li>Split up
                        <code>&lt;is-set&gt;</code> condition into is-set and is-true conditions.
                    </li>
                    <li>Allow the
                        <code>&lt;if&gt;</code> task to take any condition implementation.
                    </li>
                    <li>Add an else block to the
                        <code>&lt;if&gt;</code> task.
                    </li>
                    <li>Split the
                        <code>&lt;available&gt;</code> condition into separate conditions
                    that test for the availability of a class, or a resource.
                    </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>Unit tests.</li>
                </ul>

            </subsection>

        </section>

    </body>
</document>
