尝试将快照上传到Nexus Snapshot存储库时Nexus问题

时间:2014-11-13 15:18:01

标签: maven nexus

尝试上传快照时,我在Nexus Snapshot存储库中收到以下错误。

Downloading: http://maven.teamccp.com/content/repositories/snaphot/apps/home/home-parent/2.1-SNAPSHOT/maven-metadata.xml
Uploading: http://maven.teamccp.com/content/repositories/snaphot/apps/home/home-parent/2.1-SNAPSHOT/home-parent-2.1-20141113.150651-1.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Home Parent ............................... FAILURE [  0.742 s]
[INFO] Home Commons .............................. SKIPPED
[INFO] Home app .................................. SKIPPED
[INFO] Distribution ...................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.860 s
[INFO] Finished at: 2014-11-13T10:06:51-05:00
[INFO] Final Memory: 4M/121M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project home-parent: Failed to deploy artifacts: Could not find artifact apps.home:home-parent:pom:2.1-20141113.150651-1 in snapshot (http://maven.teamccp.com/content/repositories

我能够成功上传版本。 Plz的帮助。提前谢谢。

2 个答案:

答案 0 :(得分:0)

nexus管理器具有默认快照存储库,您的组织将在其中发布内部快照。您的部署找不到snapshotRepository的distributionManagement,因此错误将像您的问题一样发生。因此,您应该设置snapshotRepository以部署快照工件。示例如下所示。

的pom.xml

<distributionManagement>
    <repository>
        <id>releases</id>
        <url>http://your-hostname:port/nexus/content/repositories/releases</url>
    </repository>
    <snapshotRepository>
        <id>snapshots</id>
        <url>http://your-hostname:port/nexus/content/repositories/snapshots</url>
    </snapshotRepository>
</distributionManagement>

的settings.xml

<server>
    <id>releases</id>
    <username>your-server-username</username>
    <password>your-server-password</password>
</server>

<server>
    <id>snapshots</id>
    <username>your-server-username</username>
    <password>your-server-password</password>
</server>

答案 1 :(得分:0)

每个Uploading:行后面都应跟有相应的Uploaded:行,由于缺少该行,我的猜测是您的上传由于某种原因失败了。我检查您的Nexus日志,看看是否有任何迹象。

当我的远程存储库空间不足时(我通过登录到服务器找到),我遇到了同样的问题;我在Artifactory日志中没有看到任何内容。