Package org.codehaus.mojo.versions
Class DisplayParentUpdatesMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
org.codehaus.mojo.versions.AbstractVersionsDisplayMojo
org.codehaus.mojo.versions.DisplayParentUpdatesMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="display-parent-updates",
threadSafe=true)
public class DisplayParentUpdatesMojo
extends AbstractVersionsDisplayMojo
Displays any updates of the project's parent project
- Since:
- 2.2
- Author:
- Stephen Connolly
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanWhether to downgrade a snapshot dependency ifallowSnapshotsisfalseand there exists a 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.protected booleanto update parent version by force when it is RELEASE or LATESTstatic final intprotected StringIfskipResolutionis not set, specifies the bottom version considered for target version resolution.protected booleanSkips version resolution, only valid ifparentVersionis set.Fields inherited from class org.codehaus.mojo.versions.AbstractVersionsDisplayMojo
logOutput, outputEncoding, outputFile, outputLineWidthFields 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
ConstructorsConstructorDescriptionDisplayParentUpdatesMojo(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 TypeMethodDescriptionvoidexecute()protected org.apache.maven.artifact.versioning.ArtifactVersionresolveTargetVersion(String initialVersion) protected voidUpdates the pom.Methods inherited from class org.codehaus.mojo.versions.AbstractVersionsDisplayMojo
getOutputLineWidthOffset, logInit, logLineMethods inherited from class org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
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
-
MESSAGE_LENGTH
public static final int MESSAGE_LENGTH- See Also:
-
parentVersion
If
skipResolutionis not set, specifies the bottom version considered for target version resolution. If it is a version range, the resolved version will be restricted by that range.If
skipResolutionistrue, will specify the target version to which the parent artifact will be updated.- Since:
- 2.16.2
-
forceUpdate
@Parameter(property="forceUpdate", defaultValue="false") protected boolean forceUpdateto update parent version by force when it is RELEASE or LATEST- Since:
- 2.16.2
-
skipResolution
@Parameter(property="skipResolution", defaultValue="false") protected boolean skipResolutionSkips version resolution, only valid ifparentVersionis set. Will effectively set the new parent version to the one fromparentVersion- Since:
- 2.16.2
-
allowDowngrade
@Parameter(property="allowDowngrade", defaultValue="false") protected boolean allowDowngradeWhether to downgrade a snapshot dependency if
allowSnapshotsisfalseand there exists a version within the range fulfilling the criteria.Default
false- Since:
- 2.16.2
-
allowMajorUpdates
@Parameter(property="allowMajorUpdates", defaultValue="true") protected boolean allowMajorUpdatesWhether to allow the major version number to be changed.- Since:
- 2.16.2
-
allowMinorUpdates
@Parameter(property="allowMinorUpdates", defaultValue="true") protected boolean allowMinorUpdatesWhether to allow the minor version number to be changed.
Note:
falsealso implies allowMajorUpdatesfalse- Since:
- 2.16.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:
- 2.16.2
-
-
Constructor Details
-
DisplayParentUpdatesMojo
@Inject public DisplayParentUpdatesMojo(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
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionDescription copied from class:AbstractVersionsUpdaterMojo- Specified by:
executein interfaceorg.apache.maven.plugin.Mojo- Overrides:
executein classAbstractVersionsUpdaterMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
resolveTargetVersion
protected org.apache.maven.artifact.versioning.ArtifactVersion resolveTargetVersion(String initialVersion) throws org.apache.maven.plugin.MojoExecutionException, VersionRetrievalException, org.apache.maven.artifact.versioning.InvalidVersionSpecificationException, InvalidSegmentException - Throws:
org.apache.maven.plugin.MojoExecutionExceptionVersionRetrievalExceptionorg.apache.maven.artifact.versioning.InvalidVersionSpecificationExceptionInvalidSegmentException
-
update
Description copied from class:AbstractVersionsUpdaterMojoUpdates the pom.- Specified by:
updatein classAbstractVersionsUpdaterMojo- Parameters:
pom- The pom to update.
-