远程回购的人工力量更新

artifactory force update of remote repos

我有一个可以工作的神器已经一年多了。我已经设置了一个虚拟仓库,其中包含我的本地(公司)工件,以及 Maven 仓库(https://repo1.maven.org/maven2)和其他一些仓库。

我有一个可用的 spring 引导应用程序,我只是更新到新的 2x 版本(当前为 2.0.0.M6),我的 POM 父级如下所示:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.0.M6</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>  

当我尝试执行 mvn install -U 时出现错误:

[FATAL] Non-resolvable parent POM for org.springframework.boot:myProject:[unknown-version]: 
Could not find artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.0.M6 in central (http://xxx/artifactory/myVirtualRepo/) and 'parent.relativePath' points at no local POM @ line 9, column 12

现在,当我将它改回我的原始版本 (1.5.7.RELEASE) 时,它工作正常。

如果我手动去检查我的工件,我在那里看不到 2.0.0.M6 版本。所以这个错误是有道理的,但是我如何让我的 Artifactory 达到 "update" 或其他什么,maven central 上列出的较新版本?

好吧,我在 Maven 中心没有看到你要找的工件 :-) 根据https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-parent/,神器的最新版本是1.5.9

如果你查看https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent,你会发现 2.0.0-MX 版本仅在 springio-milestone 镜像上可用。

您可能需要添加另一个依赖于 http://repo.spring.io/milestone/ 的远程存储库,并将其添加到您的虚拟存储库。

这应该可以解决问题。