【发布时间】:2017-12-20 03:52:53
【问题描述】:
我在 Jenkinsfile 中使用 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/repository
我想重现我在迁移到管道之前的行为并为每个作业提供自己的本地存储库。
我没有找到任何设置... 我应该如何进行?
【问题讨论】:
标签: maven jenkins-pipeline artifactory