How exactly does Maven find the LATEST version of an artifact?

半世苍凉 提交于 2019-12-13 04:45:05

问题


In our project, we have multiple branches for our main features. As we develop, we want our repository to contain snapshots of the APIs in each branch, so that if a branch depends on another, it can easily get its APIs from the repository. However, we want it to hold multiple snapshot versions, so that if one snapshot breaks something, they can refer to an older snapshot. Our potential naming scheme goes like this

example-1.0-SNAPSHOT-01.jar

example-1.0-SNAPSHOT-02.jar

etc...

Most POM files will use LATEST for the version reference of these snapshot jars.

Anyways, my question is, how exactly does maven determine the LATEST version? Does it go off just the version number (which I think would just be 1.0 for both SNAPSHOT-01 and SNAPSHOT-02) or does it also incorporate a time-stamp?


回答1:


repository management system (for example nexus) manages snapshots the latest is named as -SNAPSHOT.jar generally and rest of them have timestamp in the file name



来源:https://stackoverflow.com/questions/18625479/how-exactly-does-maven-find-the-latest-version-of-an-artifact

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