简体   繁体   English

Maven不会更新库引用

[英]Maven doesn't update library references

I have a pretty big project that uses a local Maven repository to update libraries. 我有一个相当大的项目,它使用本地Maven存储库来更新库。 Whenever I have to update the project I sync it with an SVN repo, then I launch a "maven clean -U install" through m2e on Eclipse to update and compile the project. 每当我必须更新项目时,我都会将其与SVN存储库同步,然后在Eclipse上通过m2e启动“ maven clean -U安装”以更新和编译项目。

The problem is that while the newer versions of the libraries are downloaded by Maven, the library references aren't updated and I have to change them manually. 问题是,尽管Maven下载了较新版本的库,但库引用没有更新,我必须手动更改它们。 Since this project uses a lot of such libraries it's not really the best solution. 由于该项目使用了大量此类库,因此它并不是最佳解决方案。

None of my friends or colleagues have or ever had this problem, and even a Google search doesn't find much. 我的朋友或同事都没有或从未遇到过这个问题,甚至Google搜索都找不到很多问题。

EDIT: The references in the pom.xml file are already updated through version control (SVN). 编辑:pom.xml文件中的引用已通过版本控制(SVN)更新。 It's the references in the Eclipse project which aren't updated. Eclipse项目中的引用未更新。 Sorry for not being clear. 抱歉,不清楚。

If you want to use latest version of your dependencies use mvn versions:use-latest-releases command. 如果要使用依赖关系的最新版本,请使用mvn versions:use-latest-releases命令。 This will update dependency versions in pom.xml. 这将更新pom.xml中的依赖项版本。 If your pom.xml is under version control you have to check it out(make it writable) before executing this command, because it will modify the file content. 如果pom.xml受版本控制,则必须在执行此命令之前将其检出(使其可写),因为它会修改文件内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Eclipse Maven不会更新构建路径 - eclipse maven doesn't update the build path Maven不会更新Github存储库 - Maven doesn't update Github repository 对一对多关系对象的引用不会更新 - References to one to many relationship objects doesn't update IntelliJ不会使用Maven自动更新已编译库的列表 - IntelliJ doesn't automatically update list of compiled libraries with maven 错误 - 容器“Maven Dependencies”引用了不存在的库 - Error - The container 'Maven Dependencies' references non existing library 缺少工件错误和容​​器“Maven 依赖项”引用不存在的库 - Missing artifact error and The container 'Maven Dependencies' references non existing library 容器“Maven Dependencies”引用了不存在的库 - STS - The container 'Maven Dependencies' references non existing library - STS Maven不会将下载的jar放在Eclipse的JRE系统库“文件夹”中 - Maven doesn't put downloaded jars in eclipse's JRE System Library “folder” Maven不会安装pom文件中的所有内容,从而导致“缺少所需的库” x 124 - Maven doesn't install everything from the pom file resulting in “Missing Required Library” x 124 更新Gradle引用以包含Maven本地jar(libGDX和Tween引擎) - Update Gradle references to include maven local jars (libGDX & Tween Engine)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM