org.codehaus.mojo.versions
Class UnlockSnapshotsMojo

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.UnlockSnapshotsMojo
All Implemented Interfaces:
ContextEnabled, Mojo

public class UnlockSnapshotsMojo
extends AbstractVersionsDependencyUpdaterMojo

Attempts to resolve unlocked snapshot dependency versions to the locked timestamp versions used in the build. For example, an unlocked snapshot version like "1.0-SNAPSHOT" could be resolved to "1.0-20090128.202731-1". If a timestamped snapshot is not available, then the version will remained unchanged. This would be the case if the dependency is only available in the local repository and not in a remote snapshot repository.

Since:
1.0-alpha-3
Author:
Paul Gier
Is defined by the goal name:
unlock-snapshots
Requires a direct invocation by the user:
true
Requires a Maven project to run:
true

Field Summary
 Pattern matchSnapshotRegex
          Pattern to match a timestamped snapshot version.
 
Fields inherited from class org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
allowSnapshots, artifactFactory, artifactMetadataSource, comparisonMethod, localRepository, pathTranslator, projectBuilder, reactorProjects, remoteArtifactRepositories, remotePluginRepositories, resolver, session
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
UnlockSnapshotsMojo()
           
 
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, toArtifact, toString
 
Methods inherited from class org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
execute, findLatestVersion, getExpressionEvaluator, getHelper, getProject, getPropertyValue, getVersionComparator, newModifiedPomXER, process, readFile, 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

matchSnapshotRegex

public final Pattern matchSnapshotRegex
Pattern to match a timestamped snapshot version. For example 1.0-20090128.202731-1

Constructor Detail

UnlockSnapshotsMojo

public UnlockSnapshotsMojo()
Method Detail

update

protected void update(ModifiedPomXMLEventReader pom)
               throws MojoExecutionException,
                      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:
MojoExecutionException - when things go wrong
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(ModifiedPomXMLEventReader)


Copyright © 2008-2009 Codehaus. All Rights Reserved.