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

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

      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.

          [JENKINS-57341] Plugin archetype and tutorial do Java 7 and Java 8 but not Java 11

          Mark Waite created issue -
          Mark Waite made changes -
          Description Original: 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}
          New: 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}}.
          Mark Waite made changes -
          Summary Original: Plugin archetype and tutorial do Java 7, not Java 8 or Java 11 New: Plugin archetype and tutorial do Java 7 and Java 8 but not Java 11
          Mark Waite made changes -
          Description Original: 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}}.
          New: 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}}.
          Mark Waite made changes -
          Description Original: 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}}.
          New: 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}}.
          Mark Waite made changes -
          Description Original: 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}}.
          New: 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.
          Mark Waite made changes -
          Labels New: java11-devtools-compatibility
          Mark Waite made changes -
          Remote Link New: This issue links to "archetypes PR 41 (Web Link)" [ 22755 ]
          Oleg Nenashev made changes -
          Labels Original: java11-devtools-compatibility New: java11 java11-devtools-compatibility
          Mark Waite made changes -
          Assignee New: Mark Waite [ markewaite ]

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

              Created:
              Updated:
              Resolved: