• Icon: New Feature New Feature
    • Resolution: Duplicate
    • Icon: Minor Minor
    • core
    • None

      We have this issue all time when plugins starting using newer java versions. Plugin may need newer java version then core java version. In this case plugin manager must warn or even block ability to install the plugin.

      1. check/add information into update-center.json
      2. support PluginManager with UI

          [JENKINS-37080] PluginManager must warn minimal java version

          Daniel Beck added a comment -

          Any idea how the update site generator could determine this without opening each plugin hpi and checking the .java files' major.minor?

          Daniel Beck added a comment - Any idea how the update site generator could determine this without opening each plugin hpi and checking the .java files' major.minor?

          At least at build time we should add a control with an enforce bytecode version I think

          http://www.mojohaus.org/extra-enforcer-rules/enforceBytecodeVersion.html

          At runtime for the plugins manager if we don't want to parse all plugins we need to extract the supported java version in the update center for each plugin

          Arnaud Héritier added a comment - At least at build time we should add a control with an enforce bytecode version I think http://www.mojohaus.org/extra-enforcer-rules/enforceBytecodeVersion.html At runtime for the plugins manager if we don't want to parse all plugins we need to extract the supported java version in the update center for each plugin

          I created issue because tired from users complaining about it even if it written in docs. I didn't think about tech side. But i guess you can parse pom (i.e. Aether lib) that has enforcement level as string value.

          Kanstantsin Shautsou added a comment - I created issue because tired from users complaining about it even if it written in docs. I didn't think about tech side. But i guess you can parse pom (i.e. Aether lib) that has enforcement level as string value.

          Yes, it makes sense we see it regularly.
          The main issue is that some plugins are targeting Java 8 while Jenkins core and slaves are always supposed to run on Java 7.

          Arnaud Héritier added a comment - Yes, it makes sense we see it regularly. The main issue is that some plugins are targeting Java 8 while Jenkins core and slaves are always supposed to run on Java 7.

          Daniel Beck added a comment -

          extract the supported java version in the update center for each plugin

          Well, yes, but how? It's not like I can parse the POM for this, or have META-INF for this. I need to look at all the class files individually and check their versions. Which seems pretty insane.

          We could add this in maven-hpi-plugin, but until that trickles down we'd have nothing…

          Daniel Beck added a comment - extract the supported java version in the update center for each plugin Well, yes, but how ? It's not like I can parse the POM for this, or have META-INF for this. I need to look at all the class files individually and check their versions. Which seems pretty insane. We could add this in maven-hpi-plugin, but until that trickles down we'd have nothing…

          Every plugin has pom, that has <java.level> all you need parse pom and trust to this info. Checking META-INF was my first thought, but you limited to not extract hpi's

          Kanstantsin Shautsou added a comment - Every plugin has pom, that has <java.level> all you need parse pom and trust to this info. Checking META-INF was my first thought, but you limited to not extract hpi's

          Daniel Beck added a comment - - edited

          Daniel Beck added a comment - - edited Isn't that only convention? https://github.com/jenkinsci/plugin-pom/blob/master/pom.xml#L546 It wasn't in https://github.com/jenkinsci/jenkins/blob/jenkins-1.532/plugins/pom.xml … Also, remember the Gradle based plugins. Nothing in http://repo.jenkins-ci.org/simple/releases/org/jenkins-ci/plugins/job-dsl/1.52/job-dsl-1.52.pom …

            Unassigned Unassigned
            integer Kanstantsin Shautsou
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: