错误内容
Jenkins Artifactory Plugin version: 3.10.0
ERROR: Couldn't find Maven executable.
环境
node {
stage('Pull source code') {
git credentialsId: 'git-1024web-cn-rowger', url: 'http://git.1024web.cn:3000/gameokr/gameokr_server.git'
}
dir('gameokr_server') {
//Maven 构建,制品上传到 Artifactory
stage('Maven build'){
def server = Artifactory.newServer url: "http://8.129.40.3:8082/artifactory", credentialsId: 'art-oss-cred'
def rtMaven = Artifactory.newMavenBuild()
rtMaven.tool = 'maven' // Tool name from Jenkins configuration
rtMaven.deployer releaseRepo: 'maven-libs-release-local', snapshotRepo: 'libs-snapshot-local', server: server
//收集构建信息
def buildInfo = Artifactory.newBuildInfo()
// server.publishBuildInfo buildInfo
rtMaven.run pom: 'pom.xml', goals: 'deploy -Dmaven.test.skip=true', buildInfo: buildInfo
server.publishBuildInfo buildInfo
}
}
}
- Artifactory和Jenkins都是docker pull拉取的最新版,Jenkins里面Artifactory插件版本为 3.10.
- 测试本地可以正常mvn deploy到远程Artifactory仓库,在Jenkins中配置Artifactory链接,Test connect返回成功。