目 录CONTENT

文章目录

maven安装报错 501 HTTPS Required

大T
2021-11-28 / 0 评论 / 0 点赞 / 30 阅读 / 0 字

maven安装报错 501 HTTPS Required

maven安装报错 501 HTTPS Required

1、报错

maven命令报错:

Could not transfer artifact org.apache.felix:maven-bundle-plugin:pom:3.5.0 from/to repo1 (http://repo1.maven.org/maven2/): transfer failed for http://repo1.maven.org/maven2/org/apache/felix/maven-bundle-plugin/3.5.0/maven-bundle-plugin-3.5.0.pom, status: 501 HTTPS Required

image

2、原因

官方原来是http,现在变成了https,maven的setting.xml文件中配置的mirros是http的地址。

3、解决

修改本地maven 的setting.xml文件:

<mirror>
          <id>aliyunmaven</id>
          <mirrorOf>central</mirrorOf>
          <name>阿里云公共仓库</name>
          <url>https://maven.aliyun.com/repository/public</url>
        </mirror>

        <!-- 中央仓库1 -->
        <mirror>
            <id>repo1</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>https://repo1.maven.org/maven2/</url>
        </mirror>

        <!-- 中央仓库2 -->
        <mirror>
            <id>repo2</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>https://repo2.maven.org/maven2/</url>
        </mirror>
0

评论区