Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-45842

Enforce version of build JDK in Maven HPI plugin

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None

      Currently there is no way to understand what is the minimal required version in Jenkins core and plugins.

      So I propose to add new API, which would help for tickets like JENKINS-29412.

          [JENKINS-45842] Enforce version of build JDK in Maven HPI plugin

          Oleg Nenashev added a comment -

          Just to clarify, the "in plugins" means that plugin can use the API to understand which Java version to require for external cases (Like Java in SSH slaves). In this ticket I have no plan to consult with plugin metadata in order to adjust the minimal required version.

          Seems it confused danielbeck at least.

          Oleg Nenashev added a comment - Just to clarify, the "in plugins" means that plugin can use the API to understand which Java version to require for external cases (Like Java in SSH slaves). In this ticket I have no plan to consult with plugin metadata in order to adjust the minimal required version. Seems it confused danielbeck at least.

          Oleg Nenashev added a comment -

          https://github.com/jenkinsci/jenkins/pull/2949 provides foundation, no plans to work on it. 

          Oleg Nenashev added a comment - https://github.com/jenkinsci/jenkins/pull/2949  provides foundation, no plans to work on it. 

          This issue was resolved as fixed, but it is not clear to me what kind of API was added. Is it something that versioncolumn-plugin could use for finding the minimum Java version required for Jenkins agents, instead of examining Jenkins.class on its own? If so, that could help fix JENKINS-67842.

          Kalle Niemitalo added a comment - This issue was resolved as fixed, but it is not clear to me what kind of API was added. Is it something that versioncolumn-plugin could use for finding the minimum Java version required for Jenkins agents, instead of examining Jenkins.class on its own? If so, that could help fix JENKINS-67842 .

          Basil Crow added a comment -

          I was repurposing this old ticket to cover my recent work in jenkinsci/maven-hpi-plugin#319 in the context of Java platform build toolchain updates I did improve the lib-version-number API (which is available in core) as part of this effort in jenkinsci/lib-version-number#41 as well. I am planning on closing this ticket once the build toolchain updates are released to at least indicate that this part of the effort is done.

          I think there could still be some room for future work for generalizing this kind of logic so that it is reusable from plugins like Version Column and SSH Build Agents, but that effort is a bit larger and requires a bit more design work to scope out existing usages, design a generalized API, introduce the beta API to core, and update all plugins to consume it. I would suggest filing a new ticket if you are interested, but I have no plans to work on it.

          Basil Crow added a comment - I was repurposing this old ticket to cover my recent work in jenkinsci/maven-hpi-plugin#319 in the context of Java platform build toolchain updates I did improve the lib-version-number API (which is available in core) as part of this effort in jenkinsci/lib-version-number#41 as well. I am planning on closing this ticket once the build toolchain updates are released to at least indicate that this part of the effort is done. I think there could still be some room for future work for generalizing this kind of logic so that it is reusable from plugins like Version Column and SSH Build Agents, but that effort is a bit larger and requires a bit more design work to scope out existing usages, design a generalized API, introduce the beta API to core, and update all plugins to consume it. I would suggest filing a new ticket if you are interested, but I have no plans to work on it.

          Basil Crow added a comment -

          Relased in 4.40.

          Basil Crow added a comment - Relased in 4.40 .

            basil Basil Crow
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: