Maven 更新 POM 中的依赖项 [英] Maven update dependencies in POM

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

问题描述

是否有任何预先存在的 Maven 插件或命令来更新 POM 中的依赖项?示例:(如果这是在我的 POM 中)

Are there any preexisting Maven plugins or commands to update the dependencies in the POM? Example: (if this was in my POM)

<dependency>
    <groupId>commons-lang</groupId>
    <artifactId>commons-lang</artifactId>
    <version>2.3</version>
</dependency> 

是否有我可以运行的命令或插件将依赖项更新为:

Is there a command or plugin I can run to get it to update the dependency to:

<dependency>
    <groupId>commons-lang</groupId>
    <artifactId>commons-lang</artifactId>
    <version>2.4</version>
</dependency> 

推荐答案

试试 maven-versions-plugin,特别是 版本:使用最新版本 目标.

Try the maven-versions-plugin, in particular, the versions:use-latest-versions goal.

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

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