0

I am using below command to identify versions-maven-plugin source, since the specified plugin has not been directly defined in the project. But it doesn't show any details related to the said plugin.

mvn dependency:tree

However below command gives the plugin info

mvn -Dplugin=org.codehaus.mojo:versions-maven-plugin help:describe

Results:

Name: Versions Maven Plugin
Description: The Versions Maven Plugin is used when you want to manage the
  versions of artifacts in a project's POM.
Group Id: org.codehaus.mojo
Artifact Id: versions-maven-plugin
Version: 2.14.1
Goal Prefix: versions

Further I was trying to override the version by adding below into the project main pom. However same previous version (i.e. 2.14.1) shows plugin describe results.

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.13.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
...
Shabar
  • 2,617
  • 11
  • 57
  • 98
  • The `dependency:tree`only shows the dependencies of your project is not related to the plugins version... and what do you mean by: `doesn't give versions-maven-plugin source`? – khmarbaise Dec 23 '22 at 11:42
  • @khmarbaise As described in the question the plugin has not been defined in the project. So my requirement is to check where it is coming from. Because override it with lower version also not accepted. – Shabar Dec 23 '22 at 11:44
  • Without a full pom file it's impossible to even guess... – khmarbaise Dec 23 '22 at 12:23
  • What says `mvn -Dplugin=org.codehaus.mojo:versions-maven-plugin:2.13.0 help:describe` (setting the version explicitly) ? The [doc](https://maven.apache.org/plugins/maven-help-plugin/describe-mojo.html#plugin) is very clear regarding "input"(parameters) but not regarding "output" (/version used) – xerx593 Dec 23 '22 at 12:33

0 Answers0