com.werken.werkz.jelly
Class UseGoalsTag

java.lang.Object
  extended byorg.apache.commons.jelly.TagSupport
      extended bycom.werken.werkz.jelly.WerkzTagSupport
          extended bycom.werken.werkz.jelly.UseGoalsTag
All Implemented Interfaces:
org.apache.commons.jelly.Tag

public class UseGoalsTag
extends WerkzTagSupport

This tag outputs a sorted Map of Maps all of the goals, indexed by their prefix and their goal name. This is output to a variable. This map of maps makes it easy to navigate the available Goals.

So if the goals is output to a variable called 'g' then you can access a specific goal via a Jexl expression ${g.java.compile} or to find all the 'java' goals you can use ${g.java} which returns a sorted Map.

Version:
$Revision: 1.2 $
Author:
James Strachan

Field Summary
private  org.apache.commons.logging.Log log
          The Log to which logging calls will be made.
private  java.lang.String var
          the name of the variable to export
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
UseGoalsTag()
           
 
Method Summary
protected  java.util.Map createMap()
          Factory method to create a new sorted map
 void doTag(org.apache.commons.jelly.XMLOutput output)
          Evaluate the body to register all the various goals and pre/post conditions then run all the current targets
 void setVar(java.lang.String var)
          Sets the variable for which the Map of Map of goals will be exported
 
Methods inherited from class com.werken.werkz.jelly.WerkzTagSupport
getGoal, getProject
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private org.apache.commons.logging.Log log
The Log to which logging calls will be made.


var

private java.lang.String var
the name of the variable to export

Constructor Detail

UseGoalsTag

public UseGoalsTag()
Method Detail

doTag

public void doTag(org.apache.commons.jelly.XMLOutput output)
           throws org.apache.commons.jelly.JellyTagException
Evaluate the body to register all the various goals and pre/post conditions then run all the current targets

Throws:
org.apache.commons.jelly.JellyTagException

setVar

public void setVar(java.lang.String var)
Sets the variable for which the Map of Map of goals will be exported


createMap

protected java.util.Map createMap()
Factory method to create a new sorted map