Package org.codehaus.mojo.versions
Class UseReleasesMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
org.codehaus.mojo.versions.AbstractVersionsDependencyUpdaterMojo
org.codehaus.mojo.versions.UseReleasesMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="use-releases",
threadSafe=true)
public class UseReleasesMojo
extends AbstractVersionsDependencyUpdaterMojo
Replaces any -SNAPSHOT versions with the corresponding release version (if it has been released).
- Since:
- 1.0-alpha-3
- Author:
- Stephen Connolly
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanWhether to fail if a SNAPSHOT could not be replacedFields inherited from class org.codehaus.mojo.versions.AbstractVersionsDependencyUpdaterMojo
SNAPSHOT_REGEXFields inherited from class org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
allowSnapshots, artifactHandlerManager, generateBackupPoms, ignoredVersions, project, reactorProjects, repositorySystem, ruleSet, session, wagonMapFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
ConstructorsConstructorDescriptionUseReleasesMojo(org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager, org.eclipse.aether.RepositorySystem repositorySystem, Map<String, org.apache.maven.wagon.Wagon> wagonMap, Map<String, ChangeRecorder> changeRecorders) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidUpdates the pom.Methods inherited from class org.codehaus.mojo.versions.AbstractVersionsDependencyUpdaterMojo
findArtifact, getParentDependency, hasIncludes, isExcludeReactor, isHandledByProperty, isIncluded, isProcessingDependencies, isProcessingDependencyManagement, isProcessingParent, isProducedByReactor, separatePatterns, toArtifact, toArtifact, toString, toString, updateDependencyVersionMethods inherited from class org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
execute, findLatestVersion, getChangeRecorder, getHelper, getProject, getVersion, process, saveChangeRecorderResults, setProject, shouldApplyUpdate, shouldApplyUpdate, updatePropertyToNewestVersion, validateInputMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
failIfNotReplaced
@Parameter(property="failIfNotReplaced", defaultValue="false") protected boolean failIfNotReplacedWhether to fail if a SNAPSHOT could not be replaced- Since:
- 2.3
-
-
Constructor Details
-
UseReleasesMojo
@Inject public UseReleasesMojo(org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager, org.eclipse.aether.RepositorySystem repositorySystem, Map<String, org.apache.maven.wagon.Wagon> wagonMap, Map<String, ChangeRecorder> changeRecorders)
-
-
Method Details
-
update
protected void update(MutableXMLStreamReader pom) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException, XMLStreamException, VersionRetrievalException Description copied from class:AbstractVersionsUpdaterMojoUpdates the pom.- Specified by:
updatein classAbstractVersionsUpdaterMojo- Parameters:
pom- the pom to update.- Throws:
org.apache.maven.plugin.MojoExecutionException- when things go wrongorg.apache.maven.plugin.MojoFailureException- when things go wrong in a very bad wayXMLStreamException- when things go wrong with XML streamingVersionRetrievalException- if version retrieval goes wrong- See Also:
-