gpt4 book ai didi

maven-2 - 如何自定义 Maven 唯一版本字符串?

转载 作者:行者123 更新时间:2023-12-04 14:06:24 24 4
gpt4 key购买 nike

我想知道存在哪些选项可以自定义在 Maven 工件部署中使用的时间戳字符串<uniqueVersion>true</uniqueVersion>设置。理想情况下,我们希望包含源代码管理中的更改列表编号而不是时间戳,因为它是确定给定构建中的功能和错误修复的更可靠方法。

最佳答案

I'd like to know what options exist to customize the timestamp string used in Maven artifact deploys when true is set.



您无法自定义它,带时间戳的字符串是一个定义明确的内部事物,应该按原样使用或不按原样使用(如果您在 uniqueVersion 元素中将 false 设置为 distributionManagement)。

来自 Maven 书(对于感兴趣的读者,它不会真正帮助您):

3.3.1.2. SNAPSHOT Versions

Maven versions can contain a string literal to signify that a project is currently under active development. If a version contains the string “SNAPSHOT,” then Maven will expand this token to a date and time value converted to UTC (Coordinated Universal Time) when you install or release this component. For example, if your project has a version of “1.0-SNAPSHOT” and you deploy this project’s artifacts to a Maven repository, Maven would expand this version to “1.0-20080207-230803-1” if you were to deploy a release at 11:08 PM on February 7th, 2008 UTC. In other words, when you deploy a snapshot, you are not making a release of a software component; you are releasing a snapshot of a component at a specific time.

关于maven-2 - 如何自定义 Maven 唯一版本字符串?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3935932/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com