Jenkins Artifactory Plugin Jenkins Artifactory Plugin kubernetes kubernetes

Jenkins Artifactory Plugin


I've had the same problem and been trying various variations on configuring the connection to the maven installation.

The final configuration that seems to be working in picking up the maven installation that I have in my docker image is as follows:

stage("build") {   def server=Artifactory.server('My art')   def rtMaven=Artifactory.newMavenBuild()   rtMaven.resolver server: server, releaseRepo: 'libs-release', snapshotRepo: 'libs-snapshot'   rtMaven.deployer server: server, releaseRepo: 'libs-release-local', snapshotRepo: 'libs-snapshot-local'   env.MAVEN_HOME="/usr/share/maven"   def buildInfo = rtMaven.run pom: 'sub-dir/pom.xml', goals: 'clean install'   server.publishBuildInfo buildInfo         }

Using env.MAVEN_HOME instead of relying on a tool configuration seems to work. Rembember to place it before rtMave.run.