我们正在将工件部署到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中上传。
分析完成
以下是我们所做的分析。
非常感谢您解决上述问题的任何帮助。