From 31907e5bce77ec503026f76904f1ca313f739a37 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Fri, 20 May 2022 14:02:39 +0200 Subject: [PATCH] use-dep-version mojo: add a description include in in the goal list in index.apt also remove deprecated/unused requiresDirectInvocation parameter --- .../java/org/codehaus/mojo/versions/UseDepVersionMojo.java | 7 ++----- src/site/apt/index.apt | 2 ++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/codehaus/mojo/versions/UseDepVersionMojo.java b/src/main/java/org/codehaus/mojo/versions/UseDepVersionMojo.java index 494b649be4..df965e464c 100644 --- a/src/main/java/org/codehaus/mojo/versions/UseDepVersionMojo.java +++ b/src/main/java/org/codehaus/mojo/versions/UseDepVersionMojo.java @@ -34,16 +34,14 @@ import org.codehaus.mojo.versions.api.PomHelper; import org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader; -import javax.xml.stream.XMLStreamException; -import java.util.Collection; - /** + * Updates a dependency to a specific version. + * This can be useful if you have to manage versions for a very large (100+ module) projects where you can’t always use the most up-to-date version of a particular third party component. * @author Dan Arcari * @since 2.3 */ @Mojo( name = "use-dep-version", requiresProject = true, - requiresDirectInvocation = true, threadSafe = true ) public class UseDepVersionMojo extends AbstractVersionsDependencyUpdaterMojo { @@ -63,7 +61,6 @@ public class UseDepVersionMojo extends AbstractVersionsDependencyUpdaterMojo defaultValue = "false" ) protected boolean forceVersion; - @SuppressWarnings( "unchecked" ) @Override protected void update( ModifiedPomXMLEventReader pom ) throws MojoExecutionException, MojoFailureException, XMLStreamException, ArtifactMetadataRetrievalException { diff --git a/src/site/apt/index.apt b/src/site/apt/index.apt index 6b2499ff17..66d643fe39 100644 --- a/src/site/apt/index.apt +++ b/src/site/apt/index.apt @@ -95,6 +95,8 @@ Versions Maven Plugin * {{{./use-latest-versions-mojo.html}versions:use-latest-versions}} searches the pom for all versions which have been a newer version and replaces them with the latest version. + * {{{./use-dep-version-mojo.html}versions:use-dep-version}} updates a dependency to a specific version. + * {{{./commit-mojo.html}versions:commit}} removes the <<>> files. Forms one half of the built-in "Poor Man's SCM".