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

Define manifest header in the jpi file to capture minimum Java requirement

    • Plugin POM 3.29

      Some plugins depend on Java6 (either by compiled for Java6 for by having critical dependencies that are compiled for Java6) while others still work on Java5. The manifest should declare this so that the update center can warn users appropritely.

          [JENKINS-20679] Define manifest header in the jpi file to capture minimum Java requirement

          Alex Earl added a comment -

          I'm willing to look into this, but I am unsure how to determine the minimum JDK required for a plugin during the plugin build. Is there something in the maven setup that specifies this?

          Alex Earl added a comment - I'm willing to look into this, but I am unsure how to determine the minimum JDK required for a plugin during the plugin build. Is there something in the maven setup that specifies this?

          Jesse Glick added a comment -

          slide_o_mix see upcoming plugin POM proposal.

          Jesse Glick added a comment - slide_o_mix see upcoming plugin POM proposal.

          Jesse Glick added a comment -

          Really needs multiple components. First, a change to maven-hpi-plugin to record a Java version in the manifest; easy now since java.level is defined in the 2.x POM, so we could just configure the mojo based on that. Second, a change to the update center generator to expose this manifest field in the update center JSON (I think it does not include every field it sees, just the ones explicitly called out). Third, a change to core to block you from installing a new/updated plugin with a Java version newer than what you are currently running.

          Jesse Glick added a comment - Really needs multiple components. First, a change to maven-hpi-plugin to record a Java version in the manifest; easy now since java.level is defined in the 2.x POM, so we could just configure the mojo based on that. Second, a change to the update center generator to expose this manifest field in the update center JSON (I think it does not include every field it sees, just the ones explicitly called out). Third, a change to core to block you from installing a new/updated plugin with a Java version newer than what you are currently running.

          JENKINS-37080 is marked as duplicate, but it's actually not exactly the same: capturing the target version of a given plugin is a first critical step, but it's not the same thing as modifying the UM to handle this.

          danielbeck I see you marked this in Progress since this morning (or evening PST ), do you plan to also adapt the Update Manager, or should JENKINS-37080 actually be reopened so that we have a look probably/ideally before Java 9 supports lands?

          Baptiste Mathus added a comment - JENKINS-37080 is marked as duplicate, but it's actually not exactly the same: capturing the target version of a given plugin is a first critical step, but it's not the same thing as modifying the UM to handle this. danielbeck I see you marked this in Progress since this morning (or evening PST ), do you plan to also adapt the Update Manager, or should JENKINS-37080 actually be reopened so that we have a look probably/ideally before Java 9 supports lands?

          Daniel Beck added a comment -

          batmat See linked PRs to update center (forwarding this metadata) and core (consuming it).

          Daniel Beck added a comment - batmat See linked PRs to update center (forwarding this metadata) and core (consuming it).

          Oleg Nenashev added a comment -

          As discussed with danielbeck I will take a look at these stories. Some of them may be helpful to deliver a custom version of Pipeline: Support for Java 11 preview availability: JENKINS-51998 

           

          Oleg Nenashev added a comment - As discussed with danielbeck I will take a look at these stories. Some of them may be helpful to deliver a custom version of Pipeline: Support for Java 11 preview availability:  JENKINS-51998    

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - https://github.com/jenkinsci/plugin-pom/pull/134  is the reference impl

          Oleg Nenashev added a comment -

          Created JENKINS-55048 for landing the Core implementation by danielbeck. I think it should be a part of the Java 11 GA availability scope

          Oleg Nenashev added a comment - Created  JENKINS-55048 for landing the Core implementation by danielbeck . I think it should be a part of the Java 11 GA availability scope

            oleg_nenashev Oleg Nenashev
            kohsuke Kohsuke Kawaguchi
            Votes:
            11 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: