Maven versions plugin: updating plugins
Asked Answered
F

2

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?

Fujio answered 1/12, 2015 at 23:32 Comment(0)
E
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.

Enate answered 1/12, 2015 at 23:44 Comment(2)
Was just making sure as I found weird that the plugin report on it but doesn't act on it.Fujio
To back that up: There's an old, unmerged PR to add support for this: 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: github.com/mojohaus/versions-maven-plugin/issues/8Fireplug
S
1

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

Sass answered 26/8, 2021 at 9:30 Comment(3)
I have plugin versions as properties and it does not update them.Hearten
working for me. kinda silly this is necessary but I'll take the workaroundZaidazailer
@Hearten 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.Charley

© 2022 - 2024 — McMap. All rights reserved.