Maven如何才能找到工件的最新版本? [英] How exactly does Maven find the LATEST version of an artifact?

查看:110
本文介绍了Maven如何才能找到工件的最新版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的项目中,我们的主要功能有多个分支.在开发过程中,我们希望我们的存储库在每个分支中都包含API的快照,这样,如果一个分支依赖于另一个分支,则可以轻松地从存储库中获取其API.但是,我们希望它包含多个快照版本,以便如果一个快照损坏了某些内容,则它们可以引用较旧的快照.我们潜在的命名方案就是这样

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

example-1.0-SNAPSHOT-02.jar

example-1.0-SNAPSHOT-02.jar

等...

大多数POM文件将使用LATEST作为这些快照jar的版本参考.

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

无论如何,我的问题是,maven如何确定最新版本?它是否仅包含版本号(我认为SNAPSHOT-01和SNAPSHOT-02均为1.0)还是包含时间戳?

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?

推荐答案

存储库管理系统(例如nexus)管理快照,最新快照通常被命名为-SNAPSHOT.jar,其余快照的文件名中都带有时间戳记

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

这篇关于Maven如何才能找到工件的最新版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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