-
Bug
-
Resolution: Fixed
-
Minor
-
None
I have worked on creating a build.gradle file for build-flow-plugin.
You can see my efforts by doing:
git clone https://github.com/jenkinsci/build-flow-plugin
While trying to create the build.gradle file, I found that I needed to explicitly add more dependencies than are listed in the pom.xml file.
This is the dependency list for pom.xml:
pom.xml
<dependencies> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-all</artifactId> <version>1.8.5</version> <scope>provided</scope> <!-- from jenkins-core --> </dependency> <dependency> <groupId>org.jgrapht</groupId> <artifactId>jgrapht-jdk1.5</artifactId> <version>0.7.3</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-all</artifactId> <version>1.8.5</version> <scope>test</scope> </dependency> <!-- Add test dependencies for pipeline plugin --> <dependency> <groupId>org.jenkins-ci.plugins.workflow</groupId> <artifactId>workflow-job</artifactId> <version>${pipeline.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jenkins-ci.plugins.workflow</groupId> <artifactId>workflow-basic-steps</artifactId> <version>${pipeline.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jenkins-ci.plugins.workflow</groupId> <artifactId>workflow-cps</artifactId> <version>${pipeline.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jenkins-ci.plugins.workflow</groupId> <artifactId>workflow-durable-task-step</artifactId> <version>${pipeline.version}</version> <scope>test</scope> </dependency> </dependencies>
This is the dependency list for build.gradle:
build.gradle
dependencies { compile "org.jgrapht:jgrapht-jdk1.5:0.7.3" compile 'com.cloudbees:groovy-cps:1.7@jar' jenkinsPlugins 'org.jenkins-ci.plugins:matrix-project:1.7@jar' jenkinsPlugins 'org.jenkins-ci.plugins:junit:1.13@jar' // Test dependencies jenkinsTest "org.jenkins-ci.plugins:ant:1.3@jar" jenkinsTest "org.mockito:mockito-all:1.8.5@jar" jenkinsTest 'org.jenkins-ci.plugins:script-security:1.19@jar' jenkinsTest 'org.jenkins-ci.main:maven-plugin:2.12.1@jar' jenkinsTest 'org.jenkins-ci.plugins:javadoc:1.3@jar' jenkinsTest 'org.jenkins-ci.plugins:mailer:1.17@jar' // Test dependencies for pipeline plugin jenkinsTest "org.jenkins-ci.plugins:durable-task:1.10@jar" jenkinsTest "org.jenkins-ci.plugins.workflow:workflow-api:1.13@jar" jenkinsTest "org.jenkins-ci.plugins.workflow:workflow-basic-steps:1.13@jar" jenkinsTest "org.jenkins-ci.plugins.workflow:workflow-cps:1.13@jar" jenkinsTest "org.jenkins-ci.plugins.workflow:workflow-durable-task-step:1.13@jar" jenkinsTest "org.jenkins-ci.plugins.workflow:workflow-job:1.13@jar" jenkinsTest "org.jenkins-ci.plugins.workflow:workflow-scm-step:1.13@jar" jenkinsTest "org.jenkins-ci.plugins.workflow:workflow-step-api:1.13@jar" jenkinsTest "org.jenkins-ci.plugins.workflow:workflow-support:1.13@jar" }
If I make the build.gradle file have the same dependencies as pom.xml,
then lots of various java.lang.NoClassDefFoundError errors when running the tests.
Any idea what is going on and why pom.xml dependencies are less than build.gradle?
- is duplicated by
-
JENKINS-35232 Gradle JPI and JenkinsRule loading issues
- Closed