• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • gradle-jpi-plugin
    • None
    • jenkins core: 2.60.3

      Jenkins Test Harness and Jenkins core both use newer jUnit 4.12 so I don't understand why gradle-jpi is introducing junit-dep which is deprecated even and removed in Jenkins as of "jenkins-1.505"

      though it might be the fact that I am working with PluginFirstLoader enabled. However it causes the following error

      java.lang.NoSuchMethodError: org.junit.rules.Timeout.seconds(J)Lorg/junit/rules/Timeout;
      
      at org.jvnet.hudson.test.JenkinsRule.apply(JenkinsRule.java:574)
      at org.junit.rules.RunRules.applyAll(RunRules.java:24)
      at org.junit.rules.RunRules.<init>(RunRules.java:13)
      at org.junit.runners.BlockJUnit4ClassRunner.withTestRules(BlockJUnit4ClassRunner.java:376)
      at org.junit.runners.BlockJUnit4ClassRunner.withRules(BlockJUnit4ClassRunner.java:331)
      at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:248)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
      at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
      

      5 years ago, junit-dep was removed from Jenkins: https://github.com/jenkinsci/jenkins/commit/b956c4c9c5cfc808f467ff04a5eec1b9e1cd9985
      Core, 2 year old commit for 4.12: https://github.com/jenkinsci/jenkins/commit/d708b389ee73fbc07dc37a2b02b72f26c7e01d7b
      Test harness, 2 year old commit: https://github.com/jenkinsci/jenkins-test-harness/commit/ac5f86aabfc5e8b77c2081105992478c0efbba89

      lucky there is a workaround:

      configurations.forEach { it.exclude(module = "junit-dep") }
      

          [JENKINS-48353] junit-dep blocking testCompile using jUnit 4.12

          PR 96 should resolve the issue

          Joseph Petersen (old) added a comment - PR 96  should resolve the issue

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          pom.xml
          http://jenkins-ci.org/commit/jira-plugin/420f69076b8606c74cf24f301b9446778d88658f
          Log:
          JENKINS-48353 - Use Apache HttpComponents Client 4.x API Plugin as a client source

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/jira-plugin/420f69076b8606c74cf24f301b9446778d88658f Log: JENKINS-48353 - Use Apache HttpComponents Client 4.x API Plugin as a client source

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          .gitignore
          CHANGELOG.md
          src/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiExtension.groovy
          src/test/groovy/org/jenkinsci/gradle/plugins/jpi/JpiExtensionSpec.groovy
          http://jenkins-ci.org/commit/gradle-jpi-plugin/619d5d34362f351356e61e725eddfbd6894029f1
          Log:
          Merge remote-tracking branch 'casz/JENKINS-48353'

          Compare: https://github.com/jenkinsci/gradle-jpi-plugin/compare/7636c3d3b724...619d5d34362f

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: .gitignore CHANGELOG.md src/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiExtension.groovy src/test/groovy/org/jenkinsci/gradle/plugins/jpi/JpiExtensionSpec.groovy http://jenkins-ci.org/commit/gradle-jpi-plugin/619d5d34362f351356e61e725eddfbd6894029f1 Log: Merge remote-tracking branch 'casz/ JENKINS-48353 ' Compare: https://github.com/jenkinsci/gradle-jpi-plugin/compare/7636c3d3b724...619d5d34362f

            daspilker Daniel Spilker
            casz Joseph Petersen (old)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: