Nexus Jenkins插件

时间:2017-07-03 21:01:26

标签: maven jenkins jenkins-plugins nexus

我一直在尝试配置 Nexus Jenkins 插件大约一周。只是发现该插件不能与我们的Nexus 3.x oss一起使用。

从那以后,我降低了我们的关系,并将所有内容配置为可行。除此之外,当我尝试将Maven工件文件路径添加到 jenkins.war 文件时,出现以下消息时出错:

Uploading Maven asset with groupId: com.riddlesvillage artifactId: core 
version: Version: 1.0.0-SNAPSHOT To repository: releases
Upload of /usr/share/jenkins/ failed
Failing build due to failure to upload file to Nexus Repository Manager 

Publisher
FATAL: Upload of /usr/share/jenkins/ failed
    ...

Caused: java.io.IOException: Failed to copy /usr/share/jenkins to 
/tmp/jenkins6954159502505207420tmp `$`

然而,当我移动文件路径并将其留空时,它会构建,但它仍然不会向nexus上传任何内容。

1 个答案:

答案 0 :(得分:0)

如果您确实按照“How do I configure the Nexus Jenkins Plugin ”进行了操作,但仍然无效,唯一的选择是使用mvn命令自行部署到Nexus。

mvn deploy:deploy-file -DgroupId=<group-id> \
  -DartifactId=<artifact-id> \
  -Dversion=<version> \
  -Dpackaging=<type-of-packaging> \
  -Dfile=<path-to-file> \
  -DrepositoryId=<id-to-map-on-server-section-of-settings.xml> \
  -Durl=<url-of-the-repository-to-deploy>

请参阅“Guide to deploying 3rd party JARs to remote repository”:这就是我一直在使用的......,它适用于Nexus 2.x和Nexus 3.x