找不到与文件模式Jenkins2匹配的工件

时间:2019-10-28 09:16:35

标签: jenkins

尽管我发现this这个问题与我所面临的问题最接近,但我无法让Archive the artifacts在詹金斯上工作。

我的Spring Boot Git项目在系统上的位置:D:/MyProjects/sample-project

Jenkins工作区文件夹位于C:/Users/myname/.jenkins/workspace/sample-project

运行目标mvn package时,jar文件将在D:/MyProjects/sample-project/target文件夹中生成。

根据詹金斯(Jenkins),它在C:/Users/myname/.jenkins/workspace/sample-project下查找文件。显然,由于目标文件夹不存在,因此出现以下错误

Archiving artifacts
‘target/*.jar’ doesn’t match anything: ‘target’ exists but not ‘target/*.jar’
ERROR: Step ‘Archive the artifacts’ failed: No artifacts found that match the file pattern "target/*.jar". Configuration error?
Finished: FAILURE

我该如何工作?

0 个答案:

没有答案