14

I'm seeing some updates when I run the versions:display-plugin-updates but I found no way for the plugin to fix those. Am I just missing something?

Here's the output:

The following plugin updates are available:
  maven-checkstyle-plugin ................................ 2.16 -> 2.17
  maven-release-plugin ................................. 2.5.2 -> 2.5.3
  maven-surefire-report-plugin ......................... 2.18.1 -> 2.19
  org.codehaus.mojo:findbugs-maven-plugin .............. 3.0.2 -> 3.0.3

The following plugins do not have their version specified:
  maven-clean-plugin ........................ (from super-pom) 3.0.0
  maven-deploy-plugin ....................... (from super-pom) 2.8.2
  maven-install-plugin ...................... (from super-pom) 2.5.2

Project defines minimum Maven version as: 3.0.4
Plugins require minimum Maven version of: 3.0.4
Note: the super-pom from Maven 3.0.5 defines some of the plugin
      versions and may be influencing the plugins required minimum Maven
      version.

No plugins require a newer version of Maven than specified by the pom.

Require Maven 3.1 to use the following plugin updates:
  org.bsc.maven:maven-processor-plugin .................... 3.1.0-beta1

Is there a goal to update those plugins and/or add the ones not defined?

javydreamercsw
  • 5,363
  • 13
  • 61
  • 106

2 Answers2

2

The short answer is that you need to update the versions in your pom.xml by hand.

It's not particularly onerous as it is not something that needs to be done frequently.

Steve C
  • 18,876
  • 5
  • 34
  • 37
  • Was just making sure as I found weird that the plugin report on it but doesn't act on it. – javydreamercsw Dec 02 '15 at 15:06
  • To back that up: There's an old, unmerged PR to add support for this: https://github.com/mojohaus/versions-maven-plugin/pull/292. It refers to an even older feature request that was closed this year, I guess to indicate that it's unlikely to be implemented: https://github.com/mojohaus/versions-maven-plugin/issues/8 – Chris Povirk Oct 22 '20 at 18:20
1

There is a workaround: Define plugin versions as properties, then the goal update-properties updates these versions as well.

pithu
  • 59
  • 3
  • I have plugin versions as properties and it does not update them. – user482745 Nov 16 '21 at 13:20
  • working for me. kinda silly this is necessary but I'll take the workaround – Dave B Mar 13 '23 at 06:24
  • @user482745 I used the artifactId as the version variable in the properties section of the pom file, and the mvn versions:update-properties does in fact update the dependency versions. Though if you also have a version variable in there for JavaFX and you don't want that being updated, you have to add an exclusion like this -DexcludeProperties=javafx.version. – Michael Sims May 21 '23 at 05:04