简体   繁体   English

如果我尝试使用相同的快照版本,构建可能会失败?

[英]Is it possible to fail a build if i try to use the same snapshot version?

Is it possible to fail a build if i try to use the same snapshot version.. Currently i have created ci/cd pipeline through Jenkins file and my requirement is, if there is already an existing snapshot version and if we are trying to build one more for the same snapshot version, then the build should fail. 如果我尝试使用相同的快照版本,可能会导致构建失败。.目前,我已经通过Jenkins文件创建了ci / cd管道,而我的要求是,如果已经存在快照版本,并且我们正在尝试构建一个快照版本如果快照版本相同,则构建将失败。 For example: if i have my 4.12, and if i try to create one more build for the same snapshot version it should fail. 例如:如果我有4.12,并且如果我尝试为相同的快照版本创建另一个版本,则它应该失败。 I am aware currently maven overwrites them for each build iteration. 我知道当前maven在每次构建迭代时都会覆盖它们。 Just trying to understand if we could fail. 只是想了解我们是否会失败。

You will probably find a way, but you should not do it. 您可能会找到一种方法,但是您不应该这样做。

If a version is "final" and should not be overwritten, use a release version. 如果版本是“最终版本”且不应被覆盖,请使用发行版本。 If you want to be able to overwrite a version, use snapshot. 如果您希望能够覆盖版本,请使用快照。 I see no reason why one would create a snapshot version and the forbid to overwrite it. 我认为没有理由为什么要创建快照版本并禁止覆盖它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我可以配置maven使用Snapshot版本的自定义内部版本号 - Can i configure maven to use custom build number for Snapshot version 是否可以使用revapi maven插件来检查SNAPSHOT版本? - Is it possible to use revapi maven plugin to do check against a SNAPSHOT version? 如果存储库中提供了用于相同快照版本的发布版本,那么如何停止Maven构建? - How to halt the maven build if a release build for the same snapshot version is available in the repository? 如何检查使用了哪个SNAPSHOT版本(唯一版本)? - How can I check what SNAPSHOT build (unique build version) maven used? Primefaces maven如何构建快照版本? - Primefaces maven how to build snapshot version? 更改 spring 启动快照/构建版本 - Change spring boot snapshot/build version 部署快照源-可以吗? 它增加内部编号 - Deploying snapshot sources - Is it possible ? It increments build number 如果从Nexus清除了本地缓存的快照,则强制Maven使构建失败 - Force Maven to fail the build if locally cached snapshot is purged from Nexus 具有相同发布版本的2个不同功能分支的SNAPSHOT版本是什么 - What would be the SNAPSHOT version of 2 different feature branches with same released version Hadoop 3.1构建失败于`protoc --version` - Hadoop 3.1 build fail at `protoc --version`
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM