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)
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:
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:
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.