mikera
mikera

Reputation: 106351

Update Maven dependencies automatically

I have a significant number of Maven projects in Eclipse, with quite a lot of dependencies.

Some of the dependencies are frequently being updated in repositories as new versions are released. Currently I have to look out for these manually, and manually edit the respective pom.xmls to use the new version.

Is there an automatic way to do the following in Eclipse:

Upvotes: 11

Views: 8048

Answers (2)

Léon Tebbens
Léon Tebbens

Reputation: 91

When using Github you could use the Dependabot GitHub plugin, it generates a pull-request for each dependency needing an update.

Upvotes: 0

Abhinav Sarkar
Abhinav Sarkar

Reputation: 23802

You are looking for maven versions plugin:

versions:display-dependency-updates Displays all dependencies that have newer versions available.

This will show a list of all updated dependencies. There is a similar command to show a list of all the updated plugins.

There doesn't seem to be a command to update the dependencies to their latest versions automatically. From the docs it looks like you can use the versions:display-property-updates to update the dependency versions if they are specified as properties in the pom file.

Upvotes: 13

Related Questions