• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • gradle-jpi-plugin
    • None
    • Windows 10 x64, Gradle 2.9, JDK 8u92 x64

      Jenkins version 2.x dependes on javax.servlet:javax.servlet-api:3.1.0 but the generated dependency uses the old module name servlet-api which is not resolvable.

      I have managed to work around this by adding the dependency explicitly and excluding the erroneous one, like so:

      dependencies {
      	compile 'javax.servlet:javax.servlet-api:3.1.0'
      }
      
      configurations {
      	all*.exclude module: 'servlet-api'
      }
      

          [JENKINS-34945] Build fails for jenkinsCore >= 2.0

          Improving on the workaround (using Gradle v2.12 and later) the dependency can also be written as a compileOnly dependency, thus avoiding having the servlet-api JAR ending up in the plugin.

          Fredrik Bruzelius added a comment - Improving on the workaround (using Gradle v2.12 and later) the dependency can also be written as a compileOnly dependency, thus avoiding having the servlet-api JAR ending up in the plugin.

          Ah, sorry, my fault. See https://github.com/jenkinsci/gradle-jpi-plugin/pull/79

          fbruzelius can you test the fix?

          Daniel Spilker added a comment - Ah, sorry, my fault. See https://github.com/jenkinsci/gradle-jpi-plugin/pull/79 fbruzelius can you test the fix?

          Of course!

          I have made test builds against Jenkins Core 2.5 and 1.658 using the patched plugin. Servlet API JAR is now resolved properly in both cases.

          Fredrik Bruzelius added a comment - Of course! I have made test builds against Jenkins Core 2.5 and 1.658 using the patched plugin. Servlet API JAR is now resolved properly in both cases.

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          CHANGELOG.md
          src/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiExtension.groovy
          src/test/resources/org/jenkinsci/gradle/plugins/jpi/updated-servlet-api-pom.xml
          http://jenkins-ci.org/commit/gradle-jpi-plugin/6a53531659a514d5509171559d54e153df310404
          Log:
          fixed Servlet API dependency for Jenkins 2.0 and later

          [FIXES JENKINS-34945]

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: CHANGELOG.md src/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiExtension.groovy src/test/resources/org/jenkinsci/gradle/plugins/jpi/updated-servlet-api-pom.xml http://jenkins-ci.org/commit/gradle-jpi-plugin/6a53531659a514d5509171559d54e153df310404 Log: fixed Servlet API dependency for Jenkins 2.0 and later [FIXES JENKINS-34945]

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          CHANGELOG.md
          src/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiExtension.groovy
          src/test/resources/org/jenkinsci/gradle/plugins/jpi/updated-servlet-api-pom.xml
          http://jenkins-ci.org/commit/gradle-jpi-plugin/9d53f13216dcaedadf895383c6500c231fa47155
          Log:
          Merge pull request #79 from daspilker/JENKINS-34945

          JENKINS-34945 fixed Servlet API dependency for Jenkins 2.0 and later

          Compare: https://github.com/jenkinsci/gradle-jpi-plugin/compare/6251672f7eb6...9d53f13216dc

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: CHANGELOG.md src/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiExtension.groovy src/test/resources/org/jenkinsci/gradle/plugins/jpi/updated-servlet-api-pom.xml http://jenkins-ci.org/commit/gradle-jpi-plugin/9d53f13216dcaedadf895383c6500c231fa47155 Log: Merge pull request #79 from daspilker/ JENKINS-34945 JENKINS-34945 fixed Servlet API dependency for Jenkins 2.0 and later Compare: https://github.com/jenkinsci/gradle-jpi-plugin/compare/6251672f7eb6...9d53f13216dc

            daspilker Daniel Spilker
            fbruzelius Fredrik Bruzelius
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: