Fork me on GitHub

Programming, Internet & more

How to check for updated dependencies with maven

Regularly updating your dependencies in a project is important because it ensures that you will get all the nice bugfixes that were done in the meantime in some of the libraries you use. However this can be a time-consuming and annoying task.

Good news if you’re using maven because there is a nice command which exactly does this for you, checking if a new version is available for one of your project dependencies. The following maven command can be used:

mvn versions:display-dependency-updates

And the output looks like this:

[INFO] --- versions-maven-plugin:2.2:display-dependency-updates (default-cli) @ openkeepass ---
[INFO] The following dependencies in Dependencies have newer versions:
[INFO]   org.bouncycastle:bcprov-jdk15on ......................... 1.53 -> 1.54

Just be careful while updating because of eventually breaking changes.

Category: programming

Post a Comment

Your email is kept private. Required fields are marked *