Maven deploy 报错: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:deploy (default-deploy) on project Failed to retrieve remote metadata /maven-metadata.xml

Maven deploy 报错:

Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:deploy (default-deploy) on project Failed to retrieve remote metadata /maven-metadata.xml:
Could not transfer metadata /maven-metadata.xml from/to snapshots.Transfer failed for /maven-metadata.xml

解决方法:

查看 pom.xml 中的 distributionManagement属性, 找项目负责人、Maven私服的管理员, 提供正确的 maven url, 并修正。

    <distributionManagement>
        <repository>
            <id>central</id>
            <name>artifactory-releases</name>
            <!-- 在以下的url中填写正确的maven仓库的地址-->
            <url>https://artifactory.xxx.com/artifactory/maven-releases</url>
        </repository>
        <snapshotRepository>
            <id>snapshots</id>
            <name>artifactory-snapshots</name>
            <!-- 在以下的url中填写正确的maven仓库的地址-->
            <url>https://artifactory.xxx.com/artifactory/maven-snapshots</url>
        </snapshotRepository>
    </distributionManagement>

posted on 2022-07-22 16:21  乐之者v  阅读(1177)  评论(0编辑  收藏  举报

导航