는 내가 "Gradle을 빌드"나는 다음과 같은 오류를 실행하면 다음과 같은 build.gradle어디에서 gradle을 가진 org.jenkinsci.plugins.workflow.steps.FlowInterruptedException을 찾을 수 있습니까?
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'java'
repositories {
mavenCentral()
maven {
url 'https://repo.jenkins-ci.org/releases'
}
maven {
url 'https://repo.jenkins-ci.org/public'
}
}
sourceSets {
main {
groovy {
srcDirs = ['src']
}
}
test {
groovy {
srcDirs = ['test']
}
}
}
dependencies {
compile group: 'org.jenkins-ci.main', name: 'jenkins-core', version: '2.76'
compile group: 'org.jenkins-ci.plugins.workflow', name: 'workflow-step-api', version: '2.13'
compile 'com.cloudbees:groovy-cps:1.14'
compile 'org.connectbot.jbcrypt:jbcrypt:1.0.0'
compileOnly 'javax.servlet:javax.servlet-api:3.1.0'
compile 'org.codehaus.groovy:groovy-all:2.4.12'
testCompile 'junit:junit:4.12'
}
이 : 그것은 "org.jenkinsci.plugins이 표시되지 않는 것처럼
> Task :compileGroovy FAILED
startup failed:
/home/user/myproject/SomeClass.groovy: 26: unable to resolve class org.jenkinsci.plugins.workflow.steps.FlowInterruptedException
@ line 26, column 11.
} catch (org.jenkinsci.plugins.workflow.steps.FlowInterruptedException flowInterruptedException) {
^
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileGroovy'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
1 actionable task: 1 executed
그것입니다. workflow.steps.FlowInterruptedException "하지만 workflow-step-api를 추가하고 찾아야합니다.
내가 뭘 잘못하고 있니? 어떻게 고치는 지?
감사합니다
'org.jenkins-ci.plugins.workflow:workflow-step-api:2.13'
의존성은이가있는 POM은 (
here에서 촬영) 한
고마워요! 내가 추천하는대로 내 gradle 파일을 변경하려고했는데 여기에 무엇을 얻을 수 있습니까 https://paste.fedoraproject.org/paste/u9t0z5DWFGZvxwZSOCSL6w 두 번째 옵션은 기본적으로 Gradle에서 Maven으로 전환하고 프로젝트를 빌드해야합니다. 메이븐 프로젝트 맞지? – ddreian
여기에 그라데이션 파일이 있습니다. https://paste.fedoraproject.org/paste/deePstR7apizJ1maj5bZFQ – ddreian
Maven으로 전환 할 필요가 없습니다. Gradle은 Maven보다 훨씬 뛰어난 도구이지만 Jenkins 에코 시스템은 Maven 위에 구축됩니다. Gradle (이)와 관련된 모든 문제는 Gradle (아직) 주위에 대형 Jenkins 커뮤니티가 없기 때문에 스스로 알아야합니다. 오늘 제 발췌 문장을 다시 한 번 살펴보고 올바른 구문을 제공했는지 확인하겠습니다. – mkobit