错误说明

运行mvn clean install输出:
'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.springframework.boot:spring-boot-maven-plugin @ line 99, column 21

Could not transfer artifact com.pcitc:pcitc:pom:1.0 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [N0******** (http://**********************-Release/, default, releases), AuthPublic (http://******************, default, releases), Public1 (http://******************, default, snapshots), Public2 (http://*********************/, default, releases)]

重新构建maven有报错:
 

maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories

官方说明:

发行说明 [–] Maven 3.8.1 – Maven

目录

发行说明 [–] Maven 3.8.1 – Maven

当我被阻止 HTTP 存储库时如何修复?

详细问题列表


当我被阻止 HTTP 存储库时如何修复?

如果存储库是在 中定义的,请在源代码中修复它。pom.xml

如果存储库是在您的依赖项 POM 之一中定义的,您将收到一条消息,如下所示:

[ERROR] Failed to execute goal on project test: Could not resolve dependencies for project xxx: Failed to collect dependencies at my.test:dependency:version -> my.test.transitive:transitive:version: Failed to read artifact descriptor for my.test.transitive:transitive:jar:version: Could not transfer artifact my.test.transitive:transitive:pom:version from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [blocked-repository-id (http://blocked.repository.org, default, releases+snapshots)]

要修复的选项包括:

  • 将依赖项版本升级到较新的版本,该版本将过时的 HTTP 存储库 URL 替换为 HTTPS URL,

  • 保留依赖项版本,但在设置中定义镜像

详细问题列表

错误

    [MNG-7128] - improve error message when blocked repository defined in build POM

新功能

    [MNG-7116] - Add support for mirror selector on external:http:*
    [MNG-7117] - Add support for blocking mirrors
    [MNG-7118] - Block external HTTP repositories by default

依赖升级

    [MNG-7119] - Upgrade Maven Wagon to 3.4.3
    [MNG-7123] - Upgrade Maven Resolver to 1.6.2

完整的更改列表可以在我们的问题管理系统中找到。

我的解决办法:

解决一:按照idea提示回退maven版本(idea提示的3.8.1的版本仍然过高,相同报错),降低Maven 版本到3.8.1 以下。eg.3.6.3:https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.zip

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐