简体   繁体   English

为什么 Maven 无法从 Azure 工件存储库下载“SNAPSHOT”工件? (快照到时间戳的转换出现故障)

[英]Why maven is not able to download "SNAPSHOT" artifacts from azure artifacts repository? (Snapshot translation to timestamp is malfunctioning)

Maven is not able to download artifact when referred by version such as 'XXX-SNAPSHOT' but it is able to download every other dependency from it. Maven 无法下载由诸如“XXX-SNAPSHOT”之类的版本引用的工件,但它可以从中下载所有其他依赖项。 It even download the SNAPSHOT if & only if I replace 'SNAPSHOT' by the real timestamp, for example, replace 155-SNAPSHOT by 155-20220224.175558-1.当且仅当我将“SNAPSHOT”替换为真实时间戳时,它甚至会下载 SNAPSHOT,例如,将 155-SNAPSHOT 替换为 155-20220224.175558-1。

We are hosting SNAPSHOTS and releases both under the same azur artifact feed.我们在同一个 azur artifact feed 下托管 SNAPSHOTS 和 releases。 Any advice on how to approach/fix this missing snapshot translation to timestamp?关于如何处理/修复此丢失的快照转换为时间戳的任何建议?

I wasn't able find the detailed documentation on how this snapshot translation mechanism works on client or server side, can anyone please point it to me?我找不到有关此快照翻译机制如何在客户端或服务器端工作的详细文档,有人可以指点我吗?

 <dependency>
   <groupId>com.st.services.clients</groupId>
   <artifactId>st-ccs-web-service</artifactId>
   <!-- <version>155-SNAPSHOT</version> --><!-- not works -->
   <version>155-20220224.175558-1</version>
 </dependency>


 <repositories>
     <repository>
         <name>My Hosted Maven Repo Group</name>
         <id>maven-feed</id>
         <url>https://pkgs.dev.azure.com/my-org/my-project/_packaging/maven-feed/maven/v1
         </url>
         <releases>
             <enabled>true</enabled>
         </releases>
         <snapshots>
             <enabled>true</enabled>
             <updatePolicy>always</updatePolicy>
         </snapshots>
     </repository>
 </repositories>

Not the outcome you were after, but,不是你想要的结果,而是,
Having also tried this myself, I think Azure DevOps simply does not support this.我自己也试过这个,我认为 Azure DevOps 根本支持这个。

There are a few aspects of Azure DevOps's Artifacts feature that doesn't entirely align with Maven/how Maven does things. Azure DevOps 的工件功能有几个方面并不完全符合 Maven/Maven 的工作方式。 Unfortunately, this appears to be one of them.不幸的是,这似乎是其中之一。

(An example of another is the management of timestamped snapshots of the same version as individual versions, which Sonatype Nexus can do but DevOps Artifacts cannot). (另一个例子是管理与单个版本相同版本的带时间戳的快照,Sonatype Nexus 可以做到,但 DevOps Artifacts 不能)。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM