简体   繁体   中英

Maven doesn't update library references

I have a pretty big project that uses a local Maven repository to update libraries. 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.

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. 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.

EDIT: The references in the pom.xml file are already updated through version control (SVN). It's the references in the Eclipse project which aren't updated. Sorry for not being clear.

If you want to use latest version of your dependencies use mvn versions:use-latest-releases command. This will update dependency versions in 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM