为什么 .settings 文件丢失

Why .settings file is missing

我无法在 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被另一个程序员误从项目中删除了。添加它解决了问题