Maven检查存储库中的更新依赖关系 [英] Maven check for updated dependencies in repository

查看:164
本文介绍了Maven检查存储库中的更新依赖关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



有没有一个Maven插件可以让你检查存储库中是否有更新版本的依赖关系? 。现在,X版本与1.3版本一起发布。我想知道,根据我的项目中使用的依赖关系,哪些依赖有更新的版本可用。

解决方案

一个href =http://www.mojohaus.org/versions-maven-plugin/ =noreferrer> Maven版本插件及其 display-dependency-updates mojo是你的重新寻找:



mvn版本:显示依赖更新



这是输出如下:

  [INFO] ---------- -------------------------------------------------- ------------ 
[INFO]构建助手Maven插件
[INFO]任务段:[versions:display-dependency-updates]
[INFO ] ------------------------------------------------- -----------------------
[INFO] [versions:display-dependency-updates]
[INFO]
[INFO]以下依赖关系更新可用:
[INFO] org.apache.maven:maven-artifact ........................ 2.0 - > 2.0.9
[INFO] org.apache.maven:maven-plugin-api ...................... 2.0 - > 2.0.9
[INFO] org.apache.maven:maven-project ....................... 2.0.2 - > 2.0.9
[INFO] org.codehaus.plexus:plexus-utils ....................... 1.1 - > 1.5.6
[INFO]
[INFO] --------------------------------- ---------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] --------------------------------------------- ---------------------------
[INFO]总时间:17秒
[INFO]完成时间:Fri 8月15日10:46:03 IST 2008
[INFO] Final Memory:10M / 167M
[INFO] --------------------- -------------------------------------------------- -


Is there a Maven plugin that allows you to check if there are newer versions of dependencies available in the repository?

Say, you are using dependency X with version 1.2. Now a new version of X is released with version 1.3. I'd like to know, based on the dependencies used in my project, which dependencies have newer versions available.

解决方案

The Maven Versions plugin and its display-dependency-updates mojo are what you're looking for:

mvn versions:display-dependency-updates

Here is what the output looks like:

[INFO] ------------------------------------------------------------------------
[INFO] Building Build Helper Maven Plugin
[INFO]    task-segment: [versions:display-dependency-updates]
[INFO] ------------------------------------------------------------------------
[INFO] [versions:display-dependency-updates]
[INFO]
[INFO] The following dependency updates are available:
[INFO]   org.apache.maven:maven-artifact ........................ 2.0 -> 2.0.9
[INFO]   org.apache.maven:maven-plugin-api ...................... 2.0 -> 2.0.9
[INFO]   org.apache.maven:maven-project ....................... 2.0.2 -> 2.0.9
[INFO]   org.codehaus.plexus:plexus-utils ....................... 1.1 -> 1.5.6
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17 seconds
[INFO] Finished at: Fri Aug 15 10:46:03 IST 2008
[INFO] Final Memory: 10M/167M
[INFO] ------------------------------------------------------------------------

这篇关于Maven检查存储库中的更新依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆