2016-12-23 6 views
1

로컬/디버그 테스트에서 xml 단계를 생성했습니다. 나는 Plugin Plugin Plugin을 추가하지는 않겠지 만 어떤 종속성인지 알 수 없다.젠킨스 DSL 파이프 라인 플러그인 groovy.lang.MissingMethodException : 메소드의 서명이 없습니다. script.pipelineJob()

내 코드

import javaposse.jobdsl.dsl.DslFactory 
import javaposse.jobdsl.dsl.jobs.WorkflowJob 

pipeline = dslFactory.pipelineJob(name) 

원인, 나는 DSL의 잘못된 버전의 문제가 있었다

Caused by: groovy.lang.MissingMethodException: No signature of method: script.pipelineJob() is applicable for argument types: (java.lang.String) values: [ps-landing-pipeline] 

내 dependecies이 (build.gradle가)

dependencies { 
    compile 'org.codehaus.groovy:groovy:2.1.3' 
    compile 'org.jenkins-ci.plugins:job-dsl-core:1.45' 
    compile 'org.jenkins-ci.plugins.workflow:workflow-aggregator:2.4' 
    testCompile('org.spockframework:spock-core:0.7-groovy-2.0') { 
     exclude module: 'groovy-all' 
    } 
    // for the RestApiScriptRunner and XmlOutputRunner 
    compile('ant:ant:1.7.0') 
} 

답변