gpt4 book ai didi

java - 为什么 .settings 文件丢失

转载 作者:行者123 更新时间:2023-12-02 00:11:18 24 4
gpt4 key购买 nike

我无法在 Maven 中构建存储。设置文件丢失。 jenkinsfile中有这样的代码。如果它不在存储库本身中,它如何引用?帮助我理解


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']]
])
}
}
}
}
}
}
}

最佳答案

jenkinsfile 与此无关。原来,settings.xml被另一个程序员错误地从项目中删除了。添加它解决了问题

关于java - 为什么 .settings 文件丢失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58119459/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com