私は、次のbuild.gradlegradleでorg.jenkinsci.plugins.workflow.steps.FlowInterruptedExceptionを見つけることができますか?私は「Gradleのビルド」を実行すると
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'
}
を持って、私は次のエラーを取得する:
> 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
それは「org.jenkinsci.pluginsを見ていないかのようにです。 workflow.steps.FlowInterruptedException "しかし、私はworkflow-step-apiを追加しました。
私は間違っていますか?直し方?
はありがとう
'org.jenkins-ci.plugins.workflow:workflow-step-api:2.13'
依存性はそれでこれを持っているPOMは(
hereから取られた)してい
ありがとうございました!私はグラブファイルを変更しようとしましたが、ここで私は何を得るのですか https://paste.fedoraproject.org/paste/u9t0z5DWFGZvxwZSOCSL6w 2番目のオプションは基本的にGradleからMavenに切り替えてプロジェクトをビルドする必要がありますプロジェクト、右か? – ddreian
は、ここであなたがMavenのに切り替えるには_have_ません – ddreian
のGradleファイルhttps://paste.fedoraproject.org/paste/deePstR7apizJ1maj5bZFQです。 GradleはMavenよりはるかに優れたツールですが、JenkinsのエコシステムはMavenの上に構築されています。あなたがGradle(このようなもの)で走っている問題は、Gradle(まだ)の周りに大きなJenkinsコミュニティがないので、あなた自身を理解しなければなりません。私は今日私のスニペットをもう一度見て、あなたに正しい構文を与えたことを確認します。 – mkobit