我使用artifactory的插件在Jenkinsfile开我的Maven构建:如何使用artifactory插件指定maven本地存储库路径?
def goals = "clean install"
def artifactory = Artifactory.server 'artifactory'
configFileProvider([configFile(fileId: 'simple-maven-settings', variable: 'MAVEN_USER_SETTINGS')]) {
def mavenRuntime = Artifactory.newMavenBuild()
mavenRuntime.tool = 'maven350'
mavenRuntime.resolver server: artifactory, releaseRepo: '…', snapshotRepo: '…'
mavenRuntime.deployer server: artifactory, releaseRepo: '…', snapshotRepo: '…'
def buildInfo = mavenRuntime.run pom: 'pom.xml', goals: "-B -s ${MAVEN_USER_SETTINGS} ${goals}".toString()
这工作得很好,但Maven使用默认的共享位置〜/ .m2目录/库
我想重现在转移到管道并为每个作业分配自己的本地存储库之前的行为。
我没有找到任何设置... 我该如何继续?