3

Is there a way to use mvn help:evaluate -Dexpression to get the version number of a specific plugin? The compiler plugin for example?

Oliver
  • 3,815
  • 8
  • 35
  • 63
  • 1
    The first question which comes into my mind reading this is: Why do you need the version of a plugin? Furthermore it is possible something like this: `mvn help:evaluate -Dexpression=project.build.pluginManagement.plugins[0].version -DforceStdout=true -q` but this requires to know that it is defined like this?... – khmarbaise Sep 10 '18 at 20:28
  • I have serveral projects where I have to update a specific plugin on a regular basis. Therefore I would like to write a shell script which updates the plugin and generates the correct commit message with the previous and the new version number of the plugin. – Oliver Sep 10 '18 at 20:49
  • That's what I expected. Currently I'm working on a way to do that automatically as well...What about (in the first step) to parse the output of versions-maven-plugin......? – khmarbaise Sep 11 '18 at 05:16
  • I can support you in doing so? I already had a look at the source code. – Oliver Sep 11 '18 at 16:08

0 Answers0