无法部署工件

时间:2014-01-22 11:13:47

标签: maven jenkins artifactory

当我尝试部署我的应用程序时,出现了这个错误:

[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

1 个答案:

答案 0 :(得分:2)

您必须在MAVEN_HOME / conf / settings.xml部分服务器

中验证您的凭据
<server>
  <id>nexus</id>
  <username>deploy</username>
  <password>123456</password>
</server>

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

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