Wednesday, March 24, 2010

Check latest dependencies and plugins with Maven

You can check the latest version of each dependency and plugin in your pom. See Versions Maven Plugin.
No additional settings are required. Just run built in goals like this.

$ mvn versions:display-dependency-updates
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'versions'.
[INFO] ------------------------------------------------------------------------
[INFO] Building test
[INFO] task-segment: [versions:display-dependency-updates]
[INFO] ------------------------------------------------------------------------
[INFO] [versions:display-dependency-updates {execution: default-cli}]
[INFO] artifact junit:junit: checking for updates from central
[INFO] No dependencies in Dependencies are using the newest version.
[INFO]
[INFO] The following dependencies in Dependencies have newer versions:
[INFO] junit:junit ........................................... 3.8.1 -> 4.8.1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Wed Mar 24 20:19:29 KST 2010
[INFO] Final Memory: 25M/255M
[INFO] ------------------------------------------------------------------------

$ mvn versions:display-plugin-updates
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'versions'.
[INFO] ------------------------------------------------------------------------
[INFO] Building test
[INFO] task-segment: [versions:display-plugin-updates]
[INFO] ------------------------------------------------------------------------
[INFO] [versions:display-plugin-updates {execution: default-cli}]
[INFO]
[INFO] The following plugin updates are available:
[INFO] maven-clean-plugin ....................................... 2.2 -> 2.4
[INFO] maven-compiler-plugin .................................. 2.0.2 -> 2.1
[INFO] maven-deploy-plugin ...................................... 2.4 -> 2.5
[INFO] maven-install-plugin ..................................... 2.2 -> 2.3
[INFO] maven-jar-plugin ......................................... 2.2 -> 2.3
[INFO] maven-resources-plugin ................................. 2.3 -> 2.4.2
[INFO] maven-surefire-plugin .................................. 2.4.3 -> 2.5
[INFO]
[WARNING] The following plugins do not have their version specified:
[WARNING] maven-clean-plugin .......................... (from super-pom) 2.4
[WARNING] maven-deploy-plugin ......................... (from super-pom) 2.5
[WARNING] maven-install-plugin ........................ (from super-pom) 2.3
[WARNING] maven-jar-plugin ............................ (from super-pom) 2.3
[WARNING] maven-resources-plugin .................... (from super-pom) 2.4.2
[WARNING] maven-surefire-plugin ....................... (from super-pom) 2.5
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Wed Mar 24 19:35:48 KST 2010
[INFO] Final Memory: 25M/255M
[INFO] ------------------------------------------------------------------------

No comments:

Post a Comment