尽管我发现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
我该如何工作?