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

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

问题描述

在Nexus服务器的自己的存储库中部署工件时,我会收到错误:无法部署工件:无法传输工件无法传输文件http:/// my_artifact。返回代码为:400



我有一个自定义存储库my_repo与下一个maven本地配置运行的Nexus:



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 - li>


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>快照< / id>
< name> Snapshots< / name>
< url>< my_url_to_my_snapshot_repo>< / url>
< / snapshotRepository>
< / distributionManagement>

然后我执行

  mvn deploy 

并获取错误。任何想法?

解决方案

可以想到的几件事:




  • 用户凭据错误

  • URL到服务器错误

  • 用户无权访问部署存储库

  • 用户无法访问特定的存储库目标

  • 如果它是一个发行版(而不是-SNAPSHOT版本),则该工具已经部署到该版本中li>
  • 存储库不适合部署相应的工件(例如,快照版本的代理版本,代理代理或组而不是托管存储库)



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


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"

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

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>

  • user has permissions to create/read/write into 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>

and then I execute

mvn deploy

and get the error. Any idea?

解决方案

A couple things I can think of:

  • user credentials are wrong
  • url to server is wrong
  • user does not have access to the deployment repository
  • user does not have access to the specific repository target
  • artifact is already deployed with that version if it is a release (not -SNAPSHOT version)
  • the repository is not suitable for deployment of the respective artifact (e.g. release repo for snapshot version, proxy repo or group instead of a hosted repository)

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

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

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