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

Plugin development fails with java.level set to 11

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • plugin-pom
    • Any development environment

      I'm in the process of developing a plugin. I created a Maven project from io.jenkins.archetypes:empty-plugin. The created POM contains:

          <properties>
            <java.level>8</java.level>
      

      If I change this to 11 hell breaks loose because on line 485 in the parent POM org.jenkins-ci.plugins:plugin:4.28 there is:

                        <maxJdkVersion>1.${java.level}</maxJdkVersion>
      

      and 1.11 is not a proper Java version. Hence it was not the best decision to define maxJdkVersion like this.

      The latest org.jenkins-ci.plugins:plugin:pom:4.29 contains the same declaration on the same line 485.

      The same applies to org.jenkins-ci.tools:maven-hpi-plugin:3.19, lines 292, 293.

          [JENKINS-67022] Plugin development fails with java.level set to 11

          Mark Waite added a comment -

          Jenkins plugins can be developed with Java 11 but we retain java.level as 8 so that plugins developed with Java 11 can still be run on a Jenkins instance that is running Java 8. Greater than 50% of Jenkins controllers are still running Java 8. You want to be compatible with those controllers. Leave the java.level value at 8.

          Mark Waite added a comment - Jenkins plugins can be developed with Java 11 but we retain java.level as 8 so that plugins developed with Java 11 can still be run on a Jenkins instance that is running Java 8. Greater than 50% of Jenkins controllers are still running Java 8. You want to be compatible with those controllers. Leave the java.level value at 8.

          Gerold Broser added a comment - - edited

          @markewaite Thx for the info. If such would have been mentioned on https://www.jenkins.io/doc/developer/tutorial/ and/or https://github.com/jenkinsci/theme-manager-plugin/blob/master/docs/developer-guide.md and/or as comment in the POM itself I wouldn't have even created an issue here.

          Gerold Broser added a comment - - edited @ markewaite Thx for the info. If such would have been mentioned on https://www.jenkins.io/doc/developer/tutorial/ and/or https://github.com/jenkinsci/theme-manager-plugin/blob/master/docs/developer-guide.md and/or as comment in the POM itself I wouldn't have even created an issue here.

            Unassigned Unassigned
            geri Gerold Broser
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: