Package org.codehaus.mojo.versions
Class UseLatestReleasesMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
org.codehaus.mojo.versions.AbstractVersionsDependencyUpdaterMojo
org.codehaus.mojo.versions.UseLatestVersionsMojoBase
org.codehaus.mojo.versions.UseLatestReleasesMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="use-latest-releases",
threadSafe=true)
public class UseLatestReleasesMojo
extends UseLatestVersionsMojoBase
Replaces any release versions (i.e. versions that are not snapshots and do not
have a year-month-day suffix) with the latest release version. This goal
will not replace versions of dependencies which use snapshots
or versions with a year-month-day suffix.
- Since:
- 1.0-alpha-3
- Author:
- Stephen Connolly
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanWhether to downgrade a snapshot dependency ifallowSnapshotsisfalseand there exists a non-snapshot version within the range fulfilling the criteria.protected booleanWhether to allow the incremental version number to be changed.protected booleanWhether to allow the major version number to be changed.protected booleanWhether to allow the minor version number to be changed.Fields 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
ConstructorsConstructorDescriptionUseLatestReleasesMojo(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.UseLatestVersionsMojoBase
useLatestVersionsMethods 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
-
allowMajorUpdates
@Parameter(property="allowMajorUpdates", defaultValue="true") protected boolean allowMajorUpdatesWhether to allow the major version number to be changed.- Since:
- 1.2
-
allowMinorUpdates
@Parameter(property="allowMinorUpdates", defaultValue="true") protected boolean allowMinorUpdatesWhether to allow the minor version number to be changed.
Note:
falsealso implies allowMajorUpdatesfalse- Since:
- 1.2
-
allowIncrementalUpdates
@Parameter(property="allowIncrementalUpdates", defaultValue="true") protected boolean allowIncrementalUpdatesWhether to allow the incremental version number to be changed.
Note:
falsealso implies allowMajorUpdates and allowMinorUpdatesfalse- Since:
- 1.2
-
allowDowngrade
@Parameter(property="allowDowngrade", defaultValue="false") protected boolean allowDowngradeWhether to downgrade a snapshot dependency if
allowSnapshotsisfalseand there exists a non-snapshot version within the range fulfilling the criteria.Only valid if
allowSnapshotsisfalse.- Since:
- 2.15.0
-
-
Constructor Details
-
UseLatestReleasesMojo
@Inject public UseLatestReleasesMojo(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:
-