• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • gradle-jpi-plugin
    • None
    • Windows 10 x64, Oracle JDK 8u92, Gradle 2.13, Jenkins Core 1.651.2

      The POM that is generated during Maven deployment refers to the org.jenkins-ci.plugins:plugin parent POM using the coreVersion from the jenkinsPlugin configuration.

      However, from Jenkins 1.646 onwards, the plugin parent POM is no longer a part of the Jenkins Core, so the generated POM will refer a non-existing version.

      This inconsistency makes it difficult to consume the API of the built plugin from another plugin, since the artifact will not resolve properly.

      See the Plugin tutorial for advice on how to specify the core version when using a more recent parent POM.

      I don't know how to sensibly select the parent POM automatically. Perhaps the latest available version should be the default, with optional configuration to specify it explicitly?

          [JENKINS-34874] Generated POM refers non-existing parent POM

          Daniel Spilker added a comment - https://github.com/jenkinsci/gradle-jpi-plugin/pull/78 fbruzelius can you test the fix?

          Yes, I will take a look tomorrow! Thanks!

          Fredrik Bruzelius added a comment - Yes, I will take a look tomorrow! Thanks!

          Fredrik Bruzelius added a comment - - edited

          I have made a test build and publishToMavenLocal with Gradle using the patched plugin and the POM can now be resolved properly from the dependant (Maven-based) plugin.

          I also tried building using mismatching Core versions (using a more recent version in the API plugin), and that did not cause any resolution problems either.

          As far as I can tell, it seems to work as expected.

          Fredrik Bruzelius added a comment - - edited I have made a test build and publishToMavenLocal with Gradle using the patched plugin and the POM can now be resolved properly from the dependant (Maven-based) plugin. I also tried building using mismatching Core versions (using a more recent version in the API plugin), and that did not cause any resolution problems either. As far as I can tell, it seems to work as expected.

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          CHANGELOG.md
          src/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiExtension.groovy
          src/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiPomCustomizer.groovy
          src/test/groovy/org/jenkinsci/gradle/plugins/jpi/JpiPomCustomizerSpec.groovy
          src/test/resources/org/jenkinsci/gradle/plugins/jpi/bitbucket-pom.xml
          src/test/resources/org/jenkinsci/gradle/plugins/jpi/compile-dependencies-pom.xml
          src/test/resources/org/jenkinsci/gradle/plugins/jpi/complex-pom.xml
          src/test/resources/org/jenkinsci/gradle/plugins/jpi/minimal-pom.xml
          src/test/resources/org/jenkinsci/gradle/plugins/jpi/optional-plugin-dependencies-pom.xml
          src/test/resources/org/jenkinsci/gradle/plugins/jpi/plugin-dependencies-pom.xml
          src/test/resources/org/jenkinsci/gradle/plugins/jpi/updated-findbugs-pom.xml
          src/test/resources/org/jenkinsci/gradle/plugins/jpi/updated-servlet-api-pom.xml
          http://jenkins-ci.org/commit/gradle-jpi-plugin/96ae26bc0da7a158be64a26deca5a7e872a1bc10
          Log:
          removed reference to parent POM from generated POM and declare relevant dependencies directly

          [FIXES JENKINS-34874]

          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/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiPomCustomizer.groovy src/test/groovy/org/jenkinsci/gradle/plugins/jpi/JpiPomCustomizerSpec.groovy src/test/resources/org/jenkinsci/gradle/plugins/jpi/bitbucket-pom.xml src/test/resources/org/jenkinsci/gradle/plugins/jpi/compile-dependencies-pom.xml src/test/resources/org/jenkinsci/gradle/plugins/jpi/complex-pom.xml src/test/resources/org/jenkinsci/gradle/plugins/jpi/minimal-pom.xml src/test/resources/org/jenkinsci/gradle/plugins/jpi/optional-plugin-dependencies-pom.xml src/test/resources/org/jenkinsci/gradle/plugins/jpi/plugin-dependencies-pom.xml src/test/resources/org/jenkinsci/gradle/plugins/jpi/updated-findbugs-pom.xml src/test/resources/org/jenkinsci/gradle/plugins/jpi/updated-servlet-api-pom.xml http://jenkins-ci.org/commit/gradle-jpi-plugin/96ae26bc0da7a158be64a26deca5a7e872a1bc10 Log: removed reference to parent POM from generated POM and declare relevant dependencies directly [FIXES JENKINS-34874]

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          CHANGELOG.md
          src/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiExtension.groovy
          src/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiPomCustomizer.groovy
          src/test/groovy/org/jenkinsci/gradle/plugins/jpi/JpiPomCustomizerSpec.groovy
          src/test/resources/org/jenkinsci/gradle/plugins/jpi/bitbucket-pom.xml
          src/test/resources/org/jenkinsci/gradle/plugins/jpi/compile-dependencies-pom.xml
          src/test/resources/org/jenkinsci/gradle/plugins/jpi/complex-pom.xml
          src/test/resources/org/jenkinsci/gradle/plugins/jpi/minimal-pom.xml
          src/test/resources/org/jenkinsci/gradle/plugins/jpi/optional-plugin-dependencies-pom.xml
          src/test/resources/org/jenkinsci/gradle/plugins/jpi/plugin-dependencies-pom.xml
          src/test/resources/org/jenkinsci/gradle/plugins/jpi/updated-findbugs-pom.xml
          src/test/resources/org/jenkinsci/gradle/plugins/jpi/updated-servlet-api-pom.xml
          http://jenkins-ci.org/commit/gradle-jpi-plugin/157960cc10d7bf8fd752a70e79e875ac9a6ef683
          Log:
          Merge pull request #78 from daspilker/JENKINS-34874

          JENKINS-34874 removed reference to parent POM from generated POM…

          Compare: https://github.com/jenkinsci/gradle-jpi-plugin/compare/e0f67e5e3099...157960cc10d7

          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/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiPomCustomizer.groovy src/test/groovy/org/jenkinsci/gradle/plugins/jpi/JpiPomCustomizerSpec.groovy src/test/resources/org/jenkinsci/gradle/plugins/jpi/bitbucket-pom.xml src/test/resources/org/jenkinsci/gradle/plugins/jpi/compile-dependencies-pom.xml src/test/resources/org/jenkinsci/gradle/plugins/jpi/complex-pom.xml src/test/resources/org/jenkinsci/gradle/plugins/jpi/minimal-pom.xml src/test/resources/org/jenkinsci/gradle/plugins/jpi/optional-plugin-dependencies-pom.xml src/test/resources/org/jenkinsci/gradle/plugins/jpi/plugin-dependencies-pom.xml src/test/resources/org/jenkinsci/gradle/plugins/jpi/updated-findbugs-pom.xml src/test/resources/org/jenkinsci/gradle/plugins/jpi/updated-servlet-api-pom.xml http://jenkins-ci.org/commit/gradle-jpi-plugin/157960cc10d7bf8fd752a70e79e875ac9a6ef683 Log: Merge pull request #78 from daspilker/ JENKINS-34874 JENKINS-34874 removed reference to parent POM from generated POM… Compare: https://github.com/jenkinsci/gradle-jpi-plugin/compare/e0f67e5e3099...157960cc10d7

          Has been released in 0.18.0.

          Daniel Spilker added a comment - Has been released in 0.18.0.

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

              Created:
              Updated:
              Resolved: