net.dpml.transit.tools
Class MainTask

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended bynet.dpml.transit.tools.TransitTask
              extended bynet.dpml.transit.tools.MainTask

public class MainTask
extends net.dpml.transit.tools.TransitTask

Task that initializes the Transit sub-system during which a transit is assigned to the current project. In addition the initization procedures establishes a set of ant properties enabling convenient script based access to DPML dirctories.

  <project name="example"
      xmlns:transit="antlib:net.dpml.transit">
    <transit:init/>
    <echo message="Home: ${dpml.home}"/>
    <echo message="Cache: ${dpml.cache}"/>
    <echo message="Templates: ${dpml.templates}"/>
    <echo message="Docs: ${dpml.docs}"/>
    <echo message="Docs: ${dpml.dist}"/>
  </project>

Output from the above example is shown below:

     [echo] Home: C:\system\dpml
     [echo] Cache: C:\system\dpml\main
     [echo] Templates: C:\system\dpml\templates
     [echo] Docs: C:\system\dpml\docs
     [echo] Docs: C:\system\dpml\dist
 

Version:
1.0.0
Author:
The Digital Product Meta Library

Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
MainTask()
          Creation of a new Main task.
 
Method Summary
 MapDataType createMap()
          Create and return a new plugin definition.
 void execute()
          Updates properties on the current project and install any plugins declared as children of the transit init tag.
static void initialize(Task task)
          Initialize the supplied task.
 void setProject(Project project)
          Set the project.
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MainTask

public MainTask()
Creation of a new Main task.

Method Detail

createMap

public MapDataType createMap()
Create and return a new plugin definition.

Returns:
the plugin definition

setProject

public void setProject(Project project)
Set the project.

Parameters:
project - the current project

execute

public void execute()
             throws BuildException
Updates properties on the current project and install any plugins declared as children of the transit init tag.

Throws:
BuildException - if an execution error occurs

initialize

public static void initialize(Task task)
                       throws BuildException
Initialize the supplied task.

Parameters:
task - the task to initialize
Throws:
BuildException - if an initialization error occurs