Package org.codehaus.mojo.versions
Class ForceReleasesMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
org.codehaus.mojo.versions.AbstractVersionsDependencyUpdaterMojo
org.codehaus.mojo.versions.ForceReleasesMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="force-releases",
threadSafe=true)
public class ForceReleasesMojo
extends AbstractVersionsDependencyUpdaterMojo
Replaces any -SNAPSHOT versions with a release version, older if necessary (if there has been a release).
- Since:
- 2.2
- Author:
- Stephen Connolly
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
Whether to fail if a SNAPSHOT could not be replacedFields inherited from class org.codehaus.mojo.versions.AbstractVersionsDependencyUpdaterMojo
SNAPSHOT_REGEX
Fields inherited from class org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
allowSnapshots, artifactHandlerManager, generateBackupPoms, ignoredVersions, project, reactorProjects, repositorySystem, ruleSet, session, wagonMap
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
ConstructorsConstructorDescriptionForceReleasesMojo
(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 void
Updates 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, updateDependencyVersion
Methods inherited from class org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
execute, findLatestVersion, getChangeRecorder, getHelper, getProject, getVersion, process, saveChangeRecorderResults, setProject, shouldApplyUpdate, shouldApplyUpdate, updatePropertyToNewestVersion, validateInput
Methods 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.14.0
-
-
Constructor Details
-
ForceReleasesMojo
@Inject public ForceReleasesMojo(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:AbstractVersionsUpdaterMojo
Updates the pom.- Specified by:
update
in 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:
-