Maven: How to ensure timestamped versions of snapshots are used in classpath?

 ̄綄美尐妖づ 提交于 2019-12-04 09:21:00
Will Iverson

Here is the short answer: don't use SNAPSHOT dependencies between projects on your CI build. They are fine on your local machine, but CI environments tend to not work well**. There is a published algo for how SNAPSHOTs are resolved, but it's a mess. Instead, just use normal dependencies, and have a release job in your CI that produces releases.

Put another way, SNAPSHOTs should be considered essentially non-deterministic (at least from the point of view of a CI build agent).

The Versions plugin may be helpful for tracking dependencies.

** The only way I've seen it work consistently is if you set up a different repository for each build agent, and then wipe it out between each run. Drastic, horrible, inefficient and unneeded.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!