我正在尝试使用Jenkins中的resository连接器插件从nexus中检索maven工件。
我使用Jenkins版本2.60.1和nexus 3.2.0
War文件是从nexus中提取的,但它是0字节,如果我的配置有任何问题,你可以告诉我。
我完成了以下配置:
在神器解析器配置中:
1。)出错时失败,检查启用存储库日志记录 2.)发布更新策略和快照更新策略永远不会 3.)定义了maven坐标的Artifacts和Extension是战争。
在系统配置中:
神器解析器 检查了Repo管理器并指定了nexus的URL。
Jenkins控制台日志:
[EnvInject] - Loading node environment variables.
Building in workspace /home/jenkins/workspace/CORE-DEPLOY-DEV
INFO: define repo: [Repository id=central, type=default, url=https://company.nexus.com/repository/maven-public/, isRepositoryManager=true]
Resolving artifact com.company.esb.NexusTest.source.out:NexusTest:pom:0.0.1
Resolved artifact com.company.esb.NexusTest.source.out:NexusTest:pom:0.0.1 from central (https://company.nexus.com/repository/maven-public/, releases+snapshots, managed)
Invalid artifact descriptor for com.company.esb.NexusTest.source.out:NexusTest:war:0.0.1: 1 problem was encountered while building the effective model
[FATAL] Non-readable POM /tmp/repositoryconnector-repo/com/company/esb/NexusTest/source/out/NexusTest/0.0.1/NexusTest-0.0.1.pom: input contained no data @
Resolving artifact com.company.esb.NexusTest.source.out:NexusTest:war:0.0.1
Resolved artifact com.company.esb.NexusTest.source.out:NexusTest:war:0.0.1 from central (https://company.nexus.com/repository/maven-public/, releases+snapshots, managed)
deleted file:/home/jenkins/workspace/CORE-DEPLOY-DEV/NexusTest-0.0.1.war
copy /tmp/repositoryconnector-repo/com/company/esb/NexusTest/source/out/NexusTest/0.0.1/NexusTest-0.0.1.war to file:/home/jenkins/workspace/CORE-DEPLOY-DEV/NexusTest-0.0.1.war
Finished: SUCCESS