org.apache.maven.jelly.tags.maven
Class RootRelativePathTag
java.lang.Object
org.apache.commons.jelly.TagSupport
org.apache.maven.jelly.tags.BaseTagSupport
org.apache.maven.jelly.tags.maven.RootRelativePathTag
- All Implemented Interfaces:
- Tag
- public class RootRelativePathTag
- extends BaseTagSupport
Converts an absolute path into a path relative to a root dir. For
example, if the root dir is "c:/apps/myproject" and the absolute
path is "c:/apps/myproject/path/subproject2" then the computed
relative path is "../..".
- Version:
- $Id: RootRelativePathTag.java 517014 2007-03-11 21:15:50Z ltheussl $
- Author:
- Vincent Massol
Method Summary |
java.lang.String |
computePath()
|
void |
doTag(XMLOutput output)
|
void |
setPath(java.lang.String path)
Set the path. |
void |
setRootdir(java.io.File rootdir)
Set the root directory. |
void |
setVar(java.lang.String var)
Set the result variable. |
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 |
RootRelativePathTag
public RootRelativePathTag()
setRootdir
public void setRootdir(java.io.File rootdir)
- Set the root directory.
- Parameters:
rootdir
- the root directory
setPath
public void setPath(java.lang.String path)
- Set the path.
- Parameters:
path
- the path.
setVar
public void setVar(java.lang.String var)
- Set the result variable.
- Parameters:
var
- the result variable name.
doTag
public void doTag(XMLOutput output)
throws MissingAttributeException,
JellyTagException
- Throws:
MissingAttributeException
JellyTagException
- See Also:
Tag.doTag(XMLOutput)
computePath
public java.lang.String computePath()
throws java.io.IOException
- Returns:
- the compute relative path to the root dir
- Throws:
java.io.IOException
- on error
Copyright © 2001-2008 Apache Software Foundation. All Rights Reserved.