org.codehaus.mojo.versions
Class ResolveRangesMojo

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.ResolveRangesMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class ResolveRangesMojo
extends AbstractVersionsDependencyUpdaterMojo

Attempts to resolve dependency version ranges to the specific version being used in the build. For example a version range of "[1.0, 1.2)" would be resolved to the specific version currently in use "1.1".

Since:
1.0-alpha-3
Author:
Paul Gier

Field Summary
 Pattern matchRangeRegex
          Pattern to match a version range.
 
Fields inherited from class org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
allowSnapshots, artifactFactory, artifactMetadataSource, artifactResolver, localRepository, pathTranslator, projectBuilder, reactorProjects, remoteArtifactRepositories, remotePluginRepositories, resolver, session, settings
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ResolveRangesMojo()
           
 
Method Summary
 boolean isProcessingProperties()
          Should the project/properties section of the pom be processed.
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, updatePropertyToNewestVersion, 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

matchRangeRegex

public final Pattern matchRangeRegex
Pattern to match a version range. For example 1.0-20090128.202731-1

Constructor Detail

ResolveRangesMojo

public ResolveRangesMojo()
Method Detail

isProcessingProperties

public boolean isProcessingProperties()
Should the project/properties section of the pom be processed.

Returns:
returns true if the project/properties section of the pom should be processed.
Since:
1.3

update

protected void update(ModifiedPomXMLEventReader pom)
               throws org.apache.maven.plugin.MojoExecutionException,
                      org.apache.maven.plugin.MojoFailureException,
                      javax.xml.stream.XMLStreamException,
                      org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException
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
org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException
See Also:
AbstractVersionsUpdaterMojo.update(ModifiedPomXMLEventReader)


Copyright © 2008-2012 Codehaus. All Rights Reserved.