Title: Message Title
Mark Waite updated an issue
Jenkins / JENKINS-57341
Plugin archetype and tutorial do Java 7, not Java 8 or Java 11
Change By:
Mark Waite
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): : 2Choose io.jenkins.archetypes:hello-world-plugin version:1: 1.12: 1.23: 1.34: 1.4Choose a number: 4: 4[INFO] Using property: groupId = unusedDefine value for property 'artifactId': demoDefine value for property 'version' 1.0-SNAPSHOT: :[INFO] Using property: package = io.jenkins.plugins.sampleConfirm properties configuration:groupId: unusedartifactId: demoversion: 1.0-SNAPSHOTpackage: 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}}.
Add Comment