org.codehaus.mojo.versions
Class SetMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
          extended by org.codehaus.mojo.versions.SetMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class SetMojo
extends AbstractVersionsUpdaterMojo

Sets the current projects version, updating the details of any child modules as necessary.

Since:
1.0-beta-1
Author:
Stephen Connolly

Field Summary
 
Fields inherited from class org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
allowSnapshots, artifactFactory, artifactMetadataSource, localRepository, pathTranslator, projectBuilder, reactorProjects, remoteArtifactRepositories, remotePluginRepositories, resolver, session
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
SetMojo()
           
 
Method Summary
 void execute()
          Called when this mojo is executed.
protected  void update(ModifiedPomXMLEventReader pom)
          Updates the pom file.
 
Methods inherited from class org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
determineUnchangedSegment, findLatestVersion, getHelper, getProject, getPropertyValue, newModifiedPomXER, process, setProject, shouldApplyUpdate, writeFile
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetMojo

public SetMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Called when this mojo is executed.

Specified by:
execute in interface org.apache.maven.plugin.Mojo
Overrides:
execute in class AbstractVersionsUpdaterMojo
Throws:
org.apache.maven.plugin.MojoExecutionException - when things go wrong.
org.apache.maven.plugin.MojoFailureException - when things go wrong.

update

protected void update(ModifiedPomXMLEventReader pom)
               throws org.apache.maven.plugin.MojoExecutionException,
                      org.apache.maven.plugin.MojoFailureException,
                      javax.xml.stream.XMLStreamException
Updates the pom file.

Specified by:
update in class AbstractVersionsUpdaterMojo
Parameters:
pom - The pom file to update.
Throws:
org.apache.maven.plugin.MojoExecutionException - when things go wrong.
org.apache.maven.plugin.MojoFailureException - when things go wrong.
javax.xml.stream.XMLStreamException - when things go wrong.


Copyright © 2008-2011 Codehaus. All Rights Reserved.