Friday, July 25, 2014

Maven - Checking for dependency updates

If you're using Maven with your Java or Android projects you can leverage its ability to check for new library versions using versions:display-dependency-updates goal, instead of doing that manually through search.maven.org or using services like changedetection.com.

Withing Eclipse, you can create an internal Run Configuration (Run > Run Configurations... > Maven Build):


[INFO] Scanning for projects...
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building MyApplication 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- versions-maven-plugin:2.1:display-dependency-updates (default-cli) @ myapplication ---
[INFO] The following dependencies in Dependencies have newer versions:
[INFO]   com.squareup.okhttp:okhttp ........................ 2.0.0-RC1 -> 2.0.0
[INFO]   com.squareup.okhttp:okhttp-urlconnection .......... 2.0.0-RC2 -> 2.0.0
[INFO]   com.squareup.picasso:picasso .......................... 2.3.2 -> 2.3.3
[INFO]   commons-io:commons-io ..................................... 2.2 -> 2.4
[INFO]   org.apache.commons:commons-lang3 ........................ 3.1 -> 3.3.2
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.555 s
[INFO] Finished at: 2014-07-25T21:57:33+00:00
[INFO] Final Memory: 10M/166M
[INFO] ------------------------------------------------------------------------


Resources: