node{ def SERVER_ID = 'Artifactory1' def MAVEN_TOOL = 'maven' server = Artifactory.server SERVER_ID def buildInfo rtMaven = Artifactory.newMavenBuild() rtMaven.tool = MAVEN_TOOL // Obtain an Artifactory server instance, defined in Jenkins --> Manage: rtMaven.resolver server: server, releaseRepo: 'pom-local', snapshotRepo: 'pom-local' rtMaven.deployer server: server, releaseRepo: 'libs-release-local', snapshotRepo: 'libs-snapshot-local' rtMaven.deployer.artifactDeploymentPatterns.addInclude("**/**") rtMaven.run pom: 'pom.xml', goals: 'clean install -e -DskipTests -U -X', buildInfo: buildInfo buildInfo = Artifactory.newBuildInfo() server.publishBuildInfo buildInfo }