org.sandev.sandbuild
Class RequiredProject

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byorg.sandev.sandbuild.SandTask
              extended byorg.sandev.sandbuild.RequiredProject

public class RequiredProject
extends SandTask

A required project is a project which the current project needs in order to function. We're avoiding calling any project "dependent" because it's not always clear what direction of the dependency people are talking about. A project may require another project due to structs, nodes, environment files, other classes, or even just aggregation. You do not have to have a linkage dependency to require another project.

The "project dependency graph" is formed by the SandBuildDriver which is called from here to register the required project.


Field Summary
protected  boolean last
          Flag indicating that this required project is a postrequisite rather than a prerequisite.
protected  java.lang.String sandDir
          This is the directory specification of the required project based off of SAND_HOME.
 
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
RequiredProject()
           
 
Method Summary
 void execute()
          See class comments.
 void setLast(boolean isLast)
           
 void setSandDir(java.lang.String dir)
           
 
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, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sandDir

protected java.lang.String sandDir
This is the directory specification of the required project based off of SAND_HOME. Use forward slashes as separators and don't put any slashes ahead of the specification. So for example, the basics project would be specified as "apps/basics".


last

protected boolean last
Flag indicating that this required project is a postrequisite rather than a prerequisite. This will cause the specified project to be appended to the required projects tree, rather than inserted at its appropriate location in front of the current project. The typical use is to build the platform, which must always be done last (in order to support all the code for all the projects in the dependency graph).

Having the deployment explicitely require the platform allows the component applications to remain platform independent.

If there are multiple required project calls with last=true, then they will be appended to the dependency graph in the order they were declared. Whenever possible, required projects should be set up using the prerequisite mechanism (last=false, or is left unspecified), since it allows for true dependency checking.

Constructor Detail

RequiredProject

public RequiredProject()
Method Detail

setSandDir

public void setSandDir(java.lang.String dir)

setLast

public void setLast(boolean isLast)

execute

public void execute()
             throws org.apache.tools.ant.BuildException
See class comments.

Throws:
org.apache.tools.ant.BuildException