在 Nexus 中部署工件时出错 [英] Error when deploying an artifact in Nexus

查看:50
本文介绍了在 Nexus 中部署工件时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Nexus 服务器的我自己的存储库中部署工件时出现错误:无法部署工件:无法传输工件"无法传输文件 http:///my_artifact.返回代码为:400"

Im' getting an error when deploying an artifact in my own repository in a Nexus server: "Failed to deploy artifacts: Could not transfer artifact" "Failed to transfer file http:///my_artifact. Return code is: 400"

我让 Nexus 使用一个自定义存储库 my_repo 和下一个 Maven 本地配置运行:

I have Nexus running with one custom repository my_repo with the next maven local configuration:

settings.xml

settings.xml

<server>
    <id>my_repo</id>
    <username>user</username>
    <password>pass</password>
 </server>
 ...
 <mirror>
    <id>my_repo</id>
    <name>Repo Mirror</name>
    <url><my_url_to_my_repo></url>
    <mirrorOf>*</mirrorOf>
  </mirror>

  • 用户有权创建/读取/写入 my_repo -
  • pom.xml

    <distributionManagement>
            <repository>
                <id>my_repo</id>
                <name>my_repo</name>
                <url><my_url_to_my_repo></url>
                <layout>default</layout>
            </repository>
            <snapshotRepository>
                <id>snapshots</id>
                <name>Snapshots</name>
                <url><my_url_to_my_snapshot_repo></url>
            </snapshotRepository>
        </distributionManagement>
    

    然后我执行

    mvn deploy
    

    并得到错误.有什么想法吗?

    and get the error. Any idea?

    推荐答案

    我能想到的几点:

    • 用户凭据错误
    • 服务器的网址错误
    • 用户无权访问部署存储库
    • 用户无权访问特定的存储库目标
    • artifact 已经与该版本一起部署,如果它是一个发行版(不是 -SNAPSHOT 版本)
    • 存储库不适合部署相应的工件(例如,快照版本的发布存储库、代理存储库或组而不是托管存储库)

    检查这些,如果您仍然遇到问题,请在此处提供更多详细信息.

    Check those and if you still run into trouble provide more details here.

    这篇关于在 Nexus 中部署工件时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆