尝试将工件上传到Nexus时出错

时间:2017-03-28 09:00:53

标签: maven nexus

我尝试上传的是这个jar: https://mvnrepository.com/artifact/org.apache.maven.plugin-tools/maven-plugin-annotations/3.4

从这里获取GAV参数(见下面的屏幕):

<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.4</version>

目前我的第三方没有此版本:

enter image description here

我得到的是这个错误:

enter image description here

错误说:

Artifact upload failed.
Could not store item to repository "3rd party" [id=thirdparty], path ResourceStoreRequest{requestPath='/org/apache/maven/plugin-tools/maven-plugin-annotations/3.4/maven-plugin-annotations-3.4.pom', requestContext=RequestContext{this=org.sonatype.nexus.proxy.RequestContext@101f160e, parent=RequestContext{this=org.sonatype.nexus.proxy.RequestContext@68e0f966, parent=null}}, pathStack=[], processedRepositories=[thirdparty], appliedMappings={}}(GAVCE=org.apache.maven.plugin-tools:maven-plugin-annotations:3.4:c=null:e=pom, for "3rd party" [id=thirdparty])

Nexus配置:

Repository PolicyRelease

Deployment PolicyAllow Redeploy

在我使用我的帐户成功添加许多工件之前。

Log档案: http://wklej.org/id/3074345/

如何成功上传此工件?

1 个答案:

答案 0 :(得分:0)

诊断日志文件后:wklej.org/id/3074345 我发现/opt/nexus/sonatype-work/nexus/storage/thirdparty/中添加了root中的某些文件 所以我用命令将它们改为用户nexuschown -R nexus:nexus maven