org.apache.maven.release
Class AbstractPomTransformer
java.lang.Object
org.apache.maven.release.AbstractPomTransformer
- All Implemented Interfaces:
- PomTransformer
- Direct Known Subclasses:
- SnapshotResolver, SnapshotVersionTransformer, VersionTransformer
- public abstract class AbstractPomTransformer
- extends Object
- implements PomTransformer
This is the base class for any tool that attempts to transform fields
in the POM. Currently we are using the XML form of the POM and using Jaxen
but eventually we will be able to perform the same transformations on
POM beans. Jaxen needs to be modified and some serious cleanup needs to
go on in Maven internally, but this will serve as a start. An attempt is
made to make this tool GUI friendly.
- Version:
- $Id: AbstractPomTransformer.java 356373 2005-12-12 21:02:38Z fgiust $
- Author:
- Jason van Zyl
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractPomTransformer
public AbstractPomTransformer()
getVariables
public Map getVariables()
- Returns:
setVariables
public void setVariables(Map variables)
- Parameters:
variables
-
setProject
public void setProject(File project)
- Parameters:
project
-
getProject
public File getProject()
- Returns:
getDocument
public org.dom4j.Document getDocument()
- Returns:
setDocument
public void setDocument(org.dom4j.Document document)
- Parameters:
document
-
getOutputFile
public File getOutputFile()
- Returns:
setOutputFile
public void setOutputFile(File outputFile)
- Parameters:
outputFile
-
getSelectedNodes
public List getSelectedNodes()
- Returns:
setSelectedNodes
public void setSelectedNodes(List selectedNodes)
- Parameters:
selectedNodes
-
getSelectedNodeCount
public int getSelectedNodeCount()
- Returns:
getTransformations
public List getTransformations()
- Returns:
createTransformations
public void createTransformations()
transformNodes
public void transformNodes()
throws Exception
- This is the automated way of transforming the nodes if there is
no user interaction involved.
- Throws:
Exception
- If an error occurs while transforming the nodes.
selectNodesXPathExpression
public abstract String selectNodesXPathExpression()
- Returns:
transformNode
public abstract void transformNode(org.dom4j.Node node)
throws Exception
- Specified by:
transformNode
in interface PomTransformer
- Parameters:
node
-
- Throws:
Exception
selectNodes
public void selectNodes()
throws Exception
- Update the snapshot version identifiers with actual timestamp versions
and write out the POM in its updated form.
- Throws:
Exception
write
public void write()
throws Exception
- Throws:
Exception
write
public void write(String encoding)
throws Exception
- Throws:
Exception
Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.