在Nexus存储库中部署工件的问题

时间:2016-02-02 08:39:56

标签: java git maven jenkins nexus

我们正在将工件部署到nexus存储库并面临问题。

问题

我们正面临Nexus集成的问题。我们在项目pom.xml中包含了<distributionManagement>标记,它包含快照存储库和存储库详细信息。以下是我们包含的标记。

<groupId>Test</groupId>
<artifactId>testSP</artifactId>
<version>2.0</version>
<packaging>war</packaging>
<distributionManagement>
<snapshotRepository>
 <id>deployment</id>
 <name>Internal Releases</name>
 <url>http://localhost:8081/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
 <id>deployment</id>
 <name>Internal Releases</name>
 <url>http://localhost:8081/nexus/content/repositories/releases/</url>
</repository> 
</distributionManagement>
<repositories>
<repository>
   <!-- DO NOT set id to "local" because it is reserved by Maven -->
   <id>lib</id>
   <url>file://${project.basedir}/lib</url>
</repository>
</repositories>

当我们尝试构建Jenkins作业时,我们遇到了构建失败错误。有了以下消息。

    [INFO] ------------------------------------------------------------------------
     [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-    plugin:2.7:
deploy (default-deploy) on project testSP: Failed to deploy artifacts: Cou
ld not find artifact Test:testSP:war:2.0 in deployment (http://localhost:8081/nexus/content/repositories/releases/) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception

如果删除了分发管理标记,则构建工作正常。由于某些原因,工件不会在nexus中上传。

分析完成

以下是我们所做的分析。

  • 在settings.xml
  • 中添加了nexus服务器作为非代理主机
  • 检查用户凭据以访问nexus服务器&amp;还检查了访问权限
  • 服务器的网址也是正确的
  • 我们正在尝试将其部署在nexus的发布存储库中,并且还检查/更新了pom.xml中的版本

非常感谢您解决上述问题的任何帮助。

0 个答案:

没有答案