org.scijava.maven.plugin.util
Class PomEditor

java.lang.Object
  extended by org.scijava.maven.plugin.util.PomEditor

public class PomEditor
extends Object

An editor to modify pom.xml files.

Author:
Johannes Schindelin

Constructor Summary
PomEditor(InputStream inputStream, org.apache.maven.plugin.logging.Log log)
          Parses the specified pom.xml file.
 
Method Summary
 int visitVersions(VersionVisitor visitor)
          Inspect all referenced groupId/artifactId/version triplets, allowing to re-set the version.
 void write(Writer writer)
          Writes out the modified pom.xml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PomEditor

public PomEditor(InputStream inputStream,
                 org.apache.maven.plugin.logging.Log log)
          throws ParserConfigurationException,
                 SAXException,
                 IOException
Parses the specified pom.xml file.

Parameters:
file - the pom.xml file
Throws:
ParserConfigurationException
SAXException
IOException
Method Detail

write

public void write(Writer writer)
           throws DOMException,
                  IOException
Writes out the modified pom.xml

Parameters:
file - the pom.xml file
Throws:
DOMException
IOException

visitVersions

public int visitVersions(VersionVisitor visitor)
                  throws XPathExpressionException,
                         org.apache.maven.plugin.MojoExecutionException
Inspect all referenced groupId/artifactId/version triplets, allowing to re-set the version.

Returns:
the number of modifications
Throws:
XPathExpressionException
org.apache.maven.plugin.MojoExecutionException


Copyright © 2014 SciJava. All rights reserved.