部署工件失败 [英] Failed to deploy artifacts

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

问题描述

当我尝试部署应用程序时,出现此错误:

When I try to deploy my application, I got this error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project acme-db: Failed to deploy artifacts: Could not transfer artifact com.acme:acme-db:jar:0.8.1 from/to artifactory.acme.com (http://artifactory.acme.com/libs-release-local): Access denied to: http://artifactory.acme.com/libs-release-local/com/acme/acme-db/0.8.1/acme-db-0.8.1.jar, ReasonPhrase:Forbidden. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE

推荐答案

您必须在MAVEN_HOME/conf/settings.xml节服务器中验证凭据

You have to verify your credentials in MAVEN_HOME/conf/settings.xml section servers

<server>
  <id>nexus</id>
  <username>deploy</username>
  <password>123456</password>
</server>

id必须与pom.xml中分发管理中的id匹配

Id must match with id in distribution management in your pom.xml

<distributionManagement>
    <repository>
        <id>nexus</id>
        <url>...</url>
    </repository>
</distributionManagement>

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

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