Java 为什么.设置文件丢失
我无法在Maven中构建存储。缺少设置文件。Jenkins文件中有这样的代码。如果它不在存储库中,它是如何引用的?帮我理解Java 为什么.设置文件丢失,java,jenkins,groovy,jenkins-plugins,Java,Jenkins,Groovy,Jenkins Plugins,我无法在Maven中构建存储。缺少设置文件。Jenkins文件中有这样的代码。如果它不在存储库中,它是如何引用的?帮我理解 stages { stage("Copying credentials files") { steps { withCredentials([file(credentialsId: 'settings.xml', variable: 'SETTINGS'), file(credentials
stages {
stage("Copying credentials files") {
steps {
withCredentials([file(credentialsId: 'settings.xml', variable: 'SETTINGS'), file(credentialsId: 'settings-security.xml', variable: 'SETTINGS_SECURITY')]) {
bat '''COPY %SETTINGS% %WORKSPACE%'''
bat '''COPY %SETTINGS_SECURITY% %WORKSPACE%'''
}
}
}
stage("Test") {
steps {
script {
try {
bat "mvn clean install -s settings.xml -Dsettings.security=settings-security.xml -DTagConfigFile=${configFile} -DTAGS=${tags}"
} catch (err) {
currentBuild.result = 'FAILURE'
throw err
} finally {
stage("Allure report") {
allure([
commandline : '2.8.0',
includeProperties: false,
jdk : '',
properties : [],
reportBuildPolicy: 'ALWAYS',
report : 'target/allure-report',
results : [[path: 'target/allure-results']]
])
}
}
}
}
}
}
}
詹金斯档案与此无关。事实证明,settings.xml是由另一个程序员错误地从项目中删除的。添加它解决了问题