org.codehaus.mojo.versions
Class UseLatestSnapshotsMojo

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

public class UseLatestSnapshotsMojo
extends AbstractVersionsDependencyUpdaterMojo

Replaces any release versions with the latest snapshot version (if it has been deployed).

Since:
1.0-beta-1
Author:
Stephen Connolly

Field Summary
protected  Boolean allowIncrementalUpdates
          Whether to allow the incremental version number to be changed.
protected  Boolean allowMajorUpdates
          Whether to allow the major version number to be changed.
protected  Boolean allowMinorUpdates
          Whether to allow the minor version number to be changed.
 Pattern matchSnapshotRegex
          Pattern to match a snapshot version.
 
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
UseLatestSnapshotsMojo()
           
 
Method Summary
protected  void update(ModifiedPomXMLEventReader pom)
          Updates the pom.
 
Methods inherited from class org.codehaus.mojo.versions.AbstractVersionsDependencyUpdaterMojo
findArtifact, isExcludeReactor, isIncluded, isProcessingDependencies, isProcessingDependencyManagement, isProducedByReactor, separatePatterns, toArtifact, toString
 
Methods inherited from class org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
determineUnchangedSegment, execute, 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
 

Field Detail

allowMajorUpdates

protected Boolean allowMajorUpdates
Whether to allow the major version number to be changed.

Since:
1.0-beta-1

allowMinorUpdates

protected Boolean allowMinorUpdates
Whether to allow the minor version number to be changed.

Since:
1.0-beta-1

allowIncrementalUpdates

protected Boolean allowIncrementalUpdates
Whether to allow the incremental version number to be changed.

Since:
1.0-beta-1

matchSnapshotRegex

public final Pattern matchSnapshotRegex
Pattern to match a snapshot version.

Constructor Detail

UseLatestSnapshotsMojo

public UseLatestSnapshotsMojo()
Method Detail

update

protected void update(ModifiedPomXMLEventReader pom)
               throws org.apache.maven.plugin.MojoExecutionException,
                      org.apache.maven.plugin.MojoFailureException,
                      javax.xml.stream.XMLStreamException
Description copied from class: AbstractVersionsUpdaterMojo
Updates the pom.

Specified by:
update in class AbstractVersionsUpdaterMojo
Parameters:
pom - the pom to update.
Throws:
org.apache.maven.plugin.MojoExecutionException - when things go wrong
org.apache.maven.plugin.MojoFailureException - when things go wrong in a very bad way
javax.xml.stream.XMLStreamException - when things go wrong with XML streaming
See Also:
AbstractVersionsUpdaterMojo.update(org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader)


Copyright © 2008-2011 Codehaus. All Rights Reserved.