2016-05-12 12 views
11

'da readMavenPom kullanılamıyor Jenkins 2.0 ile çalışmak için bir Jenkinsfile üzerinde çalışıyorum. readMavenPom yöntemi tanınmadı. Bunu yapmak için eksik olduğum bazı yapılandırma var mı?Jenkinsfile

Benim Jenkinsfile:

node { 
    stage 'Checkout' 
    checkout scm 
    env.PATH = "${tool 'maven-3'}/bin:${env.PATH}" 
    stage 'Build' 
    def pom = readMavenPom file: 'pom.xml' 
    echo "${pom}" 
    sh "mvn -DskipTests=true verify" 
} 

çalıştırdığınızda, aşağıdaki hatayı alıyorum:

java.lang.NoSuchMethodError: No such DSL method 'readMavenPom' found among 
[AWSEBDeployment, archive, bat, build, catchError, checkout, deleteDir, dir, echo, 
emailext, error, fileExists, git, input, isUnix, load, mail, node, parallel, 
properties, pwd, readFile, retry, sh, slackSend, sleep, stage, stash, step, svn, 
timeout, tool, unarchive, unstash, waitUntil, withCredentials, withEnv, wrap, 
writeFile, ws] 

cevap

23

Ben pipeline-utility-steps eklentisini yüklemek için gerekli.