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

Plugin archetype and tutorial do Java 7 and Java 8 but not Java 11

    Details

    • Similar Issues:

      Description

      The Jenkins.io "Create a plugin" tutorial uses the maven archetype to generate the "HelloWorld" plugin. The resulting plugin won't compile with Java 11 because it is configured with java.version=7, jenkins.version=2.7.3 and parent pom=3.4. Since Jenkins officially supports Java 8 and Java 11, the archetype should be updated to support Java 8 and Java 11 compilation.

      It should be configured with java.version=8, jenkins.version=2.164.1 and parent pom=3.43 so that the resulting plugin can be compiled with either Java 8 or Java 11.

      The example page also shows the wrong set of choices available when generating the archetype.

      [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
      Choose archetype:
      1: remote -> io.jenkins.archetypes:empty-plugin (-)
      2: remote -> io.jenkins.archetypes:hello-world-plugin (Skeleton of a Jenkins plugin with a POM and an example build step.)
      3: remote -> io.jenkins.archetypes:global-configuration-plugin (Skeleton of a Jenkins plugin with a POM and an example piece of global configuration.)
      4: remote -> io.jenkins.archetypes:global-shared-library (Uses the Jenkins Pipeline Unit mock library to test the usage of a Global Shared Library)
      5: remote -> io.jenkins.archetypes:scripted-pipeline (Uses the Jenkins Pipeline Unit mock library to test the logic inside a Pipeline script.)
      Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 2
      Choose io.jenkins.archetypes:hello-world-plugin version:
      1: 1.1
      2: 1.2
      3: 1.3
      4: 1.4
      Choose a number: 4: 4
      [INFO] Using property: groupId = unused
      Define value for property 'artifactId': demo
      Define value for property 'version' 1.0-SNAPSHOT: :
      [INFO] Using property: package = io.jenkins.plugins.sample
      Confirm properties configuration:
      groupId: unused
      artifactId: demo
      version: 1.0-SNAPSHOT
      package: io.jenkins.plugins.sample
       Y: : y
      

      The tutorial should also be updated to refer to spotbugs rather than findbugs. The project has switched static analysis to spotbugs.

      The preceding tutorial, "Preparing for Plugin Development" should use the Java 8 download from the AdoptOpenJDK project rather than using the Oracle JDK. Oracle JDK 8 is no longer free for commercial use, while AdoptOpenJDK is free for commercial use.

        Attachments

          Issue Links

            Activity

            markewaite Mark Waite created issue -
            markewaite Mark Waite made changes -
            Field Original Value New Value
            Description The Jenkins.io "[Create a plugin|https://jenkins.io/doc/developer/tutorial/create/]" tutorial uses the maven archetype to generate the "HelloWorld" plugin. The resulting plugin won't compile with Java 11 because it is configured with {{java.version=7}}, {{jenkins.version=2.7.3}} and {{parent pom=3.4}}.

            It should be configured with {{java.version=8}}, {{jenkins.version=2.164.1}} and {{parent pom=3.43}} so that the resulting plugin can be compiled with either Java 8 or Java 11.

            The example page also shows the wrong set of choices available when generating the archetype.

            {noformat}
            [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
            Choose archetype:
            1: remote -> io.jenkins.archetypes:empty-plugin (-)
            2: remote -> io.jenkins.archetypes:hello-world-plugin (Skeleton of a Jenkins plugin with a POM and an example build step.)
            3: remote -> io.jenkins.archetypes:global-configuration-plugin (Skeleton of a Jenkins plugin with a POM and an example piece of global configuration.)
            4: remote -> io.jenkins.archetypes:global-shared-library (Uses the Jenkins Pipeline Unit mock library to test the usage of a Global Shared Library)
            5: remote -> io.jenkins.archetypes:scripted-pipeline (Uses the Jenkins Pipeline Unit mock library to test the logic inside a Pipeline script.)
            Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 2
            Choose io.jenkins.archetypes:hello-world-plugin version:
            1: 1.1
            2: 1.2
            3: 1.3
            4: 1.4
            Choose a number: 4: 4
            [INFO] Using property: groupId = unused
            Define value for property 'artifactId': demo
            Define value for property 'version' 1.0-SNAPSHOT: :
            [INFO] Using property: package = io.jenkins.plugins.sample
            Confirm properties configuration:
            groupId: unused
            artifactId: demo
            version: 1.0-SNAPSHOT
            package: io.jenkins.plugins.sample
             Y: : y
            {noformat}
            The Jenkins.io "[Create a plugin|https://jenkins.io/doc/developer/tutorial/create/]" tutorial uses the maven archetype to generate the "HelloWorld" plugin. The resulting plugin won't compile with Java 11 because it is configured with {{java.version=7}}, {{jenkins.version=2.7.3}} and {{parent pom=3.4}}.

            It should be configured with {{java.version=8}}, {{jenkins.version=2.164.1}} and {{parent pom=3.43}} so that the resulting plugin can be compiled with either Java 8 or Java 11.

            The example page also shows the wrong set of choices available when generating the archetype.

            {noformat}
            [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
            Choose archetype:
            1: remote -> io.jenkins.archetypes:empty-plugin (-)
            2: remote -> io.jenkins.archetypes:hello-world-plugin (Skeleton of a Jenkins plugin with a POM and an example build step.)
            3: remote -> io.jenkins.archetypes:global-configuration-plugin (Skeleton of a Jenkins plugin with a POM and an example piece of global configuration.)
            4: remote -> io.jenkins.archetypes:global-shared-library (Uses the Jenkins Pipeline Unit mock library to test the usage of a Global Shared Library)
            5: remote -> io.jenkins.archetypes:scripted-pipeline (Uses the Jenkins Pipeline Unit mock library to test the logic inside a Pipeline script.)
            Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 2
            Choose io.jenkins.archetypes:hello-world-plugin version:
            1: 1.1
            2: 1.2
            3: 1.3
            4: 1.4
            Choose a number: 4: 4
            [INFO] Using property: groupId = unused
            Define value for property 'artifactId': demo
            Define value for property 'version' 1.0-SNAPSHOT: :
            [INFO] Using property: package = io.jenkins.plugins.sample
            Confirm properties configuration:
            groupId: unused
            artifactId: demo
            version: 1.0-SNAPSHOT
            package: io.jenkins.plugins.sample
             Y: : y
            {noformat}

            The tutorial should also be updated to refer to {{spotbugs}} rather than {{findbugs}}. The project has switched static analysis to {{spotbugs}}.
            markewaite Mark Waite made changes -
            Summary Plugin archetype and tutorial do Java 7, not Java 8 or Java 11 Plugin archetype and tutorial do Java 7 and Java 8 but not Java 11
            markewaite Mark Waite made changes -
            Description The Jenkins.io "[Create a plugin|https://jenkins.io/doc/developer/tutorial/create/]" tutorial uses the maven archetype to generate the "HelloWorld" plugin. The resulting plugin won't compile with Java 11 because it is configured with {{java.version=7}}, {{jenkins.version=2.7.3}} and {{parent pom=3.4}}.

            It should be configured with {{java.version=8}}, {{jenkins.version=2.164.1}} and {{parent pom=3.43}} so that the resulting plugin can be compiled with either Java 8 or Java 11.

            The example page also shows the wrong set of choices available when generating the archetype.

            {noformat}
            [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
            Choose archetype:
            1: remote -> io.jenkins.archetypes:empty-plugin (-)
            2: remote -> io.jenkins.archetypes:hello-world-plugin (Skeleton of a Jenkins plugin with a POM and an example build step.)
            3: remote -> io.jenkins.archetypes:global-configuration-plugin (Skeleton of a Jenkins plugin with a POM and an example piece of global configuration.)
            4: remote -> io.jenkins.archetypes:global-shared-library (Uses the Jenkins Pipeline Unit mock library to test the usage of a Global Shared Library)
            5: remote -> io.jenkins.archetypes:scripted-pipeline (Uses the Jenkins Pipeline Unit mock library to test the logic inside a Pipeline script.)
            Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 2
            Choose io.jenkins.archetypes:hello-world-plugin version:
            1: 1.1
            2: 1.2
            3: 1.3
            4: 1.4
            Choose a number: 4: 4
            [INFO] Using property: groupId = unused
            Define value for property 'artifactId': demo
            Define value for property 'version' 1.0-SNAPSHOT: :
            [INFO] Using property: package = io.jenkins.plugins.sample
            Confirm properties configuration:
            groupId: unused
            artifactId: demo
            version: 1.0-SNAPSHOT
            package: io.jenkins.plugins.sample
             Y: : y
            {noformat}

            The tutorial should also be updated to refer to {{spotbugs}} rather than {{findbugs}}. The project has switched static analysis to {{spotbugs}}.
            The Jenkins.io "[Create a plugin|https://jenkins.io/doc/developer/tutorial/create/]" tutorial uses the maven archetype to generate the "HelloWorld" plugin. The resulting plugin won't compile with Java 11 because it is configured with {{java.version=7}}, {{jenkins.version=2.7.3}} and {{parent pom=3.4}}. Since Jenkins officially support Java 8 and Java 11, the archetype should be updated to support Java 8 and Java 11 compilation.

            It should be configured with {{java.version=8}}, {{jenkins.version=2.164.1}} and {{parent pom=3.43}} so that the resulting plugin can be compiled with either Java 8 or Java 11.

            The example page also shows the wrong set of choices available when generating the archetype.

            {noformat}
            [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
            Choose archetype:
            1: remote -> io.jenkins.archetypes:empty-plugin (-)
            2: remote -> io.jenkins.archetypes:hello-world-plugin (Skeleton of a Jenkins plugin with a POM and an example build step.)
            3: remote -> io.jenkins.archetypes:global-configuration-plugin (Skeleton of a Jenkins plugin with a POM and an example piece of global configuration.)
            4: remote -> io.jenkins.archetypes:global-shared-library (Uses the Jenkins Pipeline Unit mock library to test the usage of a Global Shared Library)
            5: remote -> io.jenkins.archetypes:scripted-pipeline (Uses the Jenkins Pipeline Unit mock library to test the logic inside a Pipeline script.)
            Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 2
            Choose io.jenkins.archetypes:hello-world-plugin version:
            1: 1.1
            2: 1.2
            3: 1.3
            4: 1.4
            Choose a number: 4: 4
            [INFO] Using property: groupId = unused
            Define value for property 'artifactId': demo
            Define value for property 'version' 1.0-SNAPSHOT: :
            [INFO] Using property: package = io.jenkins.plugins.sample
            Confirm properties configuration:
            groupId: unused
            artifactId: demo
            version: 1.0-SNAPSHOT
            package: io.jenkins.plugins.sample
             Y: : y
            {noformat}

            The tutorial should also be updated to refer to {{spotbugs}} rather than {{findbugs}}. The project has switched static analysis to {{spotbugs}}.
            markewaite Mark Waite made changes -
            Description The Jenkins.io "[Create a plugin|https://jenkins.io/doc/developer/tutorial/create/]" tutorial uses the maven archetype to generate the "HelloWorld" plugin. The resulting plugin won't compile with Java 11 because it is configured with {{java.version=7}}, {{jenkins.version=2.7.3}} and {{parent pom=3.4}}. Since Jenkins officially support Java 8 and Java 11, the archetype should be updated to support Java 8 and Java 11 compilation.

            It should be configured with {{java.version=8}}, {{jenkins.version=2.164.1}} and {{parent pom=3.43}} so that the resulting plugin can be compiled with either Java 8 or Java 11.

            The example page also shows the wrong set of choices available when generating the archetype.

            {noformat}
            [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
            Choose archetype:
            1: remote -> io.jenkins.archetypes:empty-plugin (-)
            2: remote -> io.jenkins.archetypes:hello-world-plugin (Skeleton of a Jenkins plugin with a POM and an example build step.)
            3: remote -> io.jenkins.archetypes:global-configuration-plugin (Skeleton of a Jenkins plugin with a POM and an example piece of global configuration.)
            4: remote -> io.jenkins.archetypes:global-shared-library (Uses the Jenkins Pipeline Unit mock library to test the usage of a Global Shared Library)
            5: remote -> io.jenkins.archetypes:scripted-pipeline (Uses the Jenkins Pipeline Unit mock library to test the logic inside a Pipeline script.)
            Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 2
            Choose io.jenkins.archetypes:hello-world-plugin version:
            1: 1.1
            2: 1.2
            3: 1.3
            4: 1.4
            Choose a number: 4: 4
            [INFO] Using property: groupId = unused
            Define value for property 'artifactId': demo
            Define value for property 'version' 1.0-SNAPSHOT: :
            [INFO] Using property: package = io.jenkins.plugins.sample
            Confirm properties configuration:
            groupId: unused
            artifactId: demo
            version: 1.0-SNAPSHOT
            package: io.jenkins.plugins.sample
             Y: : y
            {noformat}

            The tutorial should also be updated to refer to {{spotbugs}} rather than {{findbugs}}. The project has switched static analysis to {{spotbugs}}.
            The Jenkins.io "[Create a plugin|https://jenkins.io/doc/developer/tutorial/create/]" tutorial uses the maven archetype to generate the "HelloWorld" plugin. The resulting plugin won't compile with Java 11 because it is configured with {{java.version=7}}, {{jenkins.version=2.7.3}} and {{parent pom=3.4}}. Since Jenkins officially supports Java 8 and Java 11, the archetype should be updated to support Java 8 and Java 11 compilation.

            It should be configured with {{java.version=8}}, {{jenkins.version=2.164.1}} and {{parent pom=3.43}} so that the resulting plugin can be compiled with either Java 8 or Java 11.

            The example page also shows the wrong set of choices available when generating the archetype.

            {noformat}
            [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
            Choose archetype:
            1: remote -> io.jenkins.archetypes:empty-plugin (-)
            2: remote -> io.jenkins.archetypes:hello-world-plugin (Skeleton of a Jenkins plugin with a POM and an example build step.)
            3: remote -> io.jenkins.archetypes:global-configuration-plugin (Skeleton of a Jenkins plugin with a POM and an example piece of global configuration.)
            4: remote -> io.jenkins.archetypes:global-shared-library (Uses the Jenkins Pipeline Unit mock library to test the usage of a Global Shared Library)
            5: remote -> io.jenkins.archetypes:scripted-pipeline (Uses the Jenkins Pipeline Unit mock library to test the logic inside a Pipeline script.)
            Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 2
            Choose io.jenkins.archetypes:hello-world-plugin version:
            1: 1.1
            2: 1.2
            3: 1.3
            4: 1.4
            Choose a number: 4: 4
            [INFO] Using property: groupId = unused
            Define value for property 'artifactId': demo
            Define value for property 'version' 1.0-SNAPSHOT: :
            [INFO] Using property: package = io.jenkins.plugins.sample
            Confirm properties configuration:
            groupId: unused
            artifactId: demo
            version: 1.0-SNAPSHOT
            package: io.jenkins.plugins.sample
             Y: : y
            {noformat}

            The tutorial should also be updated to refer to {{spotbugs}} rather than {{findbugs}}. The project has switched static analysis to {{spotbugs}}.
            markewaite Mark Waite made changes -
            Description The Jenkins.io "[Create a plugin|https://jenkins.io/doc/developer/tutorial/create/]" tutorial uses the maven archetype to generate the "HelloWorld" plugin. The resulting plugin won't compile with Java 11 because it is configured with {{java.version=7}}, {{jenkins.version=2.7.3}} and {{parent pom=3.4}}. Since Jenkins officially supports Java 8 and Java 11, the archetype should be updated to support Java 8 and Java 11 compilation.

            It should be configured with {{java.version=8}}, {{jenkins.version=2.164.1}} and {{parent pom=3.43}} so that the resulting plugin can be compiled with either Java 8 or Java 11.

            The example page also shows the wrong set of choices available when generating the archetype.

            {noformat}
            [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
            Choose archetype:
            1: remote -> io.jenkins.archetypes:empty-plugin (-)
            2: remote -> io.jenkins.archetypes:hello-world-plugin (Skeleton of a Jenkins plugin with a POM and an example build step.)
            3: remote -> io.jenkins.archetypes:global-configuration-plugin (Skeleton of a Jenkins plugin with a POM and an example piece of global configuration.)
            4: remote -> io.jenkins.archetypes:global-shared-library (Uses the Jenkins Pipeline Unit mock library to test the usage of a Global Shared Library)
            5: remote -> io.jenkins.archetypes:scripted-pipeline (Uses the Jenkins Pipeline Unit mock library to test the logic inside a Pipeline script.)
            Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 2
            Choose io.jenkins.archetypes:hello-world-plugin version:
            1: 1.1
            2: 1.2
            3: 1.3
            4: 1.4
            Choose a number: 4: 4
            [INFO] Using property: groupId = unused
            Define value for property 'artifactId': demo
            Define value for property 'version' 1.0-SNAPSHOT: :
            [INFO] Using property: package = io.jenkins.plugins.sample
            Confirm properties configuration:
            groupId: unused
            artifactId: demo
            version: 1.0-SNAPSHOT
            package: io.jenkins.plugins.sample
             Y: : y
            {noformat}

            The tutorial should also be updated to refer to {{spotbugs}} rather than {{findbugs}}. The project has switched static analysis to {{spotbugs}}.
            The Jenkins.io "[Create a plugin|https://jenkins.io/doc/developer/tutorial/create/]" tutorial uses the maven archetype to generate the "HelloWorld" plugin. The resulting plugin won't compile with Java 11 because it is configured with {{java.version=7}}, {{jenkins.version=2.7.3}} and {{parent pom=3.4}}. Since Jenkins officially supports Java 8 and Java 11, the archetype should be updated to support Java 8 and Java 11 compilation.

            It should be configured with {{java.version=8}}, {{jenkins.version=2.164.1}} and {{parent pom=3.43}} so that the resulting plugin can be compiled with either Java 8 or Java 11.

            The example page also shows the wrong set of choices available when generating the archetype.

            {noformat}
            [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
            Choose archetype:
            1: remote -> io.jenkins.archetypes:empty-plugin (-)
            2: remote -> io.jenkins.archetypes:hello-world-plugin (Skeleton of a Jenkins plugin with a POM and an example build step.)
            3: remote -> io.jenkins.archetypes:global-configuration-plugin (Skeleton of a Jenkins plugin with a POM and an example piece of global configuration.)
            4: remote -> io.jenkins.archetypes:global-shared-library (Uses the Jenkins Pipeline Unit mock library to test the usage of a Global Shared Library)
            5: remote -> io.jenkins.archetypes:scripted-pipeline (Uses the Jenkins Pipeline Unit mock library to test the logic inside a Pipeline script.)
            Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 2
            Choose io.jenkins.archetypes:hello-world-plugin version:
            1: 1.1
            2: 1.2
            3: 1.3
            4: 1.4
            Choose a number: 4: 4
            [INFO] Using property: groupId = unused
            Define value for property 'artifactId': demo
            Define value for property 'version' 1.0-SNAPSHOT: :
            [INFO] Using property: package = io.jenkins.plugins.sample
            Confirm properties configuration:
            groupId: unused
            artifactId: demo
            version: 1.0-SNAPSHOT
            package: io.jenkins.plugins.sample
             Y: : y
            {noformat}

            The tutorial should also be updated to refer to {{spotbugs}} rather than {{findbugs}}. The project has switched static analysis to {{spotbugs}}.

            The preceding tutorial, "[Preparing for Plugin Development|https://jenkins.io/doc/developer/tutorial/prepare/]" should use the Java 8 download from the AdoptOpenJDK project rather than using the Oracle JDK. Oracle JDK 8 is no longer free for commercial use, while AdoptOpenJDK is free for commercial use.
            markewaite Mark Waite made changes -
            Labels java11-devtools-compatibility
            markewaite Mark Waite made changes -
            Remote Link This issue links to "archetypes PR 41 (Web Link)" [ 22755 ]
            oleg_nenashev Oleg Nenashev made changes -
            Labels java11-devtools-compatibility java11 java11-devtools-compatibility
            markewaite Mark Waite made changes -
            Assignee Mark Waite [ markewaite ]
            markewaite Mark Waite made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            fcojfernandez Francisco Fernández made changes -
            Labels java11 java11-devtools-compatibility java11 java11-devtools-compatibility triaged
            markewaite Mark Waite made changes -
            Assignee Mark Waite [ markewaite ]
            Hide
            jglick Jesse Glick added a comment -

            Archetype changes released as 1.5. Typically the index gets rebuilt once a week, on Sundays IIRC.

            Show
            jglick Jesse Glick added a comment - Archetype changes released as 1.5. Typically the index gets rebuilt once a week, on Sundays IIRC.
            markewaite Mark Waite made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            markewaite Mark Waite made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            jglick Jesse Glick added a comment -

            Mark Waite acc. to the issue description, you also needed to update the tutorial or something?

            Show
            jglick Jesse Glick added a comment - Mark Waite acc. to the issue description, you also needed to update the tutorial or something?
            markewaite Mark Waite made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] In Review [ 10005 ]
            markewaite Mark Waite made changes -
            Status In Review [ 10005 ] In Progress [ 3 ]
            markewaite Mark Waite made changes -
            Assignee Mark Waite [ markewaite ]
            Hide
            markewaite Mark Waite added a comment -

            Thanks for the reminder Jesse Glick! I'll submit the pull request for the tutorial after the index rebuild makes the changes visible to me.

            Show
            markewaite Mark Waite added a comment - Thanks for the reminder Jesse Glick ! I'll submit the pull request for the tutorial after the index rebuild makes the changes visible to me.
            markewaite Mark Waite made changes -
            Remote Link This issue links to "jenkins.io PR 2341 (Web Link)" [ 23120 ]
            markewaite Mark Waite made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            Hide
            markewaite Mark Waite added a comment -

            Confirmed resolved with version 1.5 of the plugin archetype

            Show
            markewaite Mark Waite added a comment - Confirmed resolved with version 1.5 of the plugin archetype
            markewaite Mark Waite made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            markewaite Mark Waite made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              • Assignee:
                markewaite Mark Waite
                Reporter:
                markewaite Mark Waite
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: