Uploaded image for project: 'Jenkins Website'
  1. Jenkins Website
  2. WEBSITE-528

Update instruction of creating a plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The instruction of creating a plugin with archetype was out-of-date.

      When run 

      mvn -U archetype:generate -Dfilter=io.jenkins.archetypes:
      

      The options followed are 4 not 3.

      It needs to be updated.

        Attachments

          Activity

          Hide
          patniharshit Harshit Patni added a comment -

          @david I have identified the place where changes are required. But the task description mentions that there will be 4 options, but when I checked I got 5 options so I just wanted to confirm with Yang Zhou if I should change the document to reflect what I found.

          Show
          patniharshit Harshit Patni added a comment - @david I have identified the place where changes are required. But the task description mentions that there will be 4 options, but when I checked I got 5 options so I just wanted to confirm with Yang Zhou if I should change the document to reflect what I found.
          Hide
          mide David Olorundare added a comment - - edited

          I got 5 options too when I ran the code. Maybe email/message Yang ?

          Show
          mide David Olorundare added a comment - - edited I got 5 options too when I ran the code. Maybe email/message Yang ?
          Hide
          raychou1203 Yang Zhou added a comment - - edited

          Thanks for reply.David Olorundare Harshit Patni

          Yes, you are right. But I mean the instruction on https://jenkins.io/doc/developer/tutorial/create/ was out-of-date.There are only three choices there.

          $ mvn -U archetype:generate -Dfilter=io.jenkins.archetypes:
          …
          Choose archetype:
          1: remote -> io.jenkins.archetypes:empty-plugin (Skeleton of a Jenkins plugin with a POM and an empty source tree.)
          2: remote -> io.jenkins.archetypes:global-configuration-plugin (Skeleton of a Jenkins plugin with a POM and an example piece of global configuration.)
          3: remote -> io.jenkins.archetypes:hello-world-plugin (Skeleton of a Jenkins plugin with a POM and an example build step.)
          Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 3 
          Choose io.jenkins.archetypes:hello-world-plugin version:
          1: 1.1
          2: 1.2
          3: 1.3
          Choose a number: 3: 3 
          [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 
          

          But actually it is:

          Choose archetype:
          
          1: remote -> io.jenkins.archetypes:empty-plugin (Skeleton of a Jenkins plugin with a POM and an empty source tree.)
          
          2: remote -> io.jenkins.archetypes:global-configuration-plugin (Skeleton of a Jenkins plugin with a POM and an example piece of global configuration.)
          
          3: remote -> io.jenkins.archetypes:global-shared-library (Uses the Jenkins Pipeline Unit mock library to test the usage of a Global Shared Library)
          
          4: remote -> io.jenkins.archetypes:hello-world-plugin (Skeleton of a Jenkins plugin with a POM and an example build step.)
          
          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): : 4
          
          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
          
          Downloading from repo.jenkins-ci.org: https://repo.jenkins-ci.org/public/io/jenkins/archetypes/hello-world-plugin/1.4/hello-world-plugin-1.4.pom
          
          Downloaded from repo.jenkins-ci.org: https://repo.jenkins-ci.org/public/io/jenkins/archetypes/hello-world-plugin/1.4/hello-world-plugin-1.4.pom (737 B at 1.2 kB/s)
          
          Downloading from repo.jenkins-ci.org: https://repo.jenkins-ci.org/public/io/jenkins/archetypes/archetypes-parent/1.4/archetypes-parent-1.4.pom
          
          Downloaded from repo.jenkins-ci.org: https://repo.jenkins-ci.org/public/io/jenkins/archetypes/archetypes-parent/1.4/archetypes-parent-1.4.pom (4.5 kB at 1.4 kB/s)
          
          Downloading from repo.jenkins-ci.org: https://repo.jenkins-ci.org/public/io/jenkins/archetypes/hello-world-plugin/1.4/hello-world-plugin-1.4.jar
          
          Downloaded from repo.jenkins-ci.org: https://repo.jenkins-ci.org/public/io/jenkins/archetypes/hello-world-plugin/1.4/hello-world-plugin-1.4.jar (13 kB at 21 kB/s)
          
          [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
          
          [INFO] ----------------------------------------------------------------------------
          
          [INFO] Using following parameters for creating project from Archetype: hello-world-plugin:1.4
          
          [INFO] ----------------------------------------------------------------------------
          
          [INFO] Parameter: groupId, Value: unused
          
          [INFO] Parameter: artifactId, Value: demo
          
          [INFO] Parameter: version, Value: 1.0-SNAPSHOT
          
          [INFO] Parameter: package, Value: io.jenkins.plugins.sample
          
          [INFO] Parameter: packageInPathFormat, Value: io/jenkins/plugins/sample
          
          [INFO] Parameter: version, Value: 1.0-SNAPSHOT
          
          [INFO] Parameter: package, Value: io.jenkins.plugins.sample
          
          [INFO] Parameter: groupId, Value: unused
          
          [INFO] Parameter: artifactId, Value: demo
          
          [INFO] Project created from Archetype in dir: /home/zhouyang/workspace/testJenkins/demo
          
          [INFO] ------------------------------------------------------------------------
          
          [INFO] BUILD SUCCESS
          
          [INFO] ------------------------------------------------------------------------
          
          [INFO] Total time:  01:24 min
          
          [INFO] Finished at: 2018-11-19T20:48:40+08:00
          
          [INFO] ------------------------------------------------------------------------
          
          
          

          So I mean it out-of-date.

          Show
          raychou1203 Yang Zhou added a comment - - edited Thanks for reply. David Olorundare Harshit Patni Yes, you are right. But I mean the instruction on https://jenkins.io/doc/developer/tutorial/create/  was out-of-date.There are only three choices there. $ mvn -U archetype:generate -Dfilter=io.jenkins.archetypes: … Choose archetype: 1: remote -> io.jenkins.archetypes:empty-plugin (Skeleton of a Jenkins plugin with a POM and an empty source tree.) 2: remote -> io.jenkins.archetypes:global-configuration-plugin (Skeleton of a Jenkins plugin with a POM and an example piece of global configuration.) 3: remote -> io.jenkins.archetypes:hello-world-plugin (Skeleton of a Jenkins plugin with a POM and an example build step.) Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 3 Choose io.jenkins.archetypes:hello-world-plugin version: 1: 1.1 2: 1.2 3: 1.3 Choose a number: 3: 3 [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 But actually it is: Choose archetype: 1: remote -> io.jenkins.archetypes:empty-plugin (Skeleton of a Jenkins plugin with a POM and an empty source tree.) 2: remote -> io.jenkins.archetypes:global-configuration-plugin (Skeleton of a Jenkins plugin with a POM and an example piece of global configuration.) 3: remote -> io.jenkins.archetypes:global-shared-library (Uses the Jenkins Pipeline Unit mock library to test the usage of a Global Shared Library) 4: remote -> io.jenkins.archetypes:hello-world-plugin (Skeleton of a Jenkins plugin with a POM and an example build step.) 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): : 4 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 Downloading from repo.jenkins-ci.org: https: //repo.jenkins-ci.org/ public /io/jenkins/archetypes/hello-world-plugin/1.4/hello-world-plugin-1.4.pom Downloaded from repo.jenkins-ci.org: https: //repo.jenkins-ci.org/ public /io/jenkins/archetypes/hello-world-plugin/1.4/hello-world-plugin-1.4.pom (737 B at 1.2 kB/s) Downloading from repo.jenkins-ci.org: https: //repo.jenkins-ci.org/ public /io/jenkins/archetypes/archetypes-parent/1.4/archetypes-parent-1.4.pom Downloaded from repo.jenkins-ci.org: https: //repo.jenkins-ci.org/ public /io/jenkins/archetypes/archetypes-parent/1.4/archetypes-parent-1.4.pom (4.5 kB at 1.4 kB/s) Downloading from repo.jenkins-ci.org: https: //repo.jenkins-ci.org/ public /io/jenkins/archetypes/hello-world-plugin/1.4/hello-world-plugin-1.4.jar Downloaded from repo.jenkins-ci.org: https: //repo.jenkins-ci.org/ public /io/jenkins/archetypes/hello-world-plugin/1.4/hello-world-plugin-1.4.jar (13 kB at 21 kB/s) [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 [INFO] ---------------------------------------------------------------------------- [INFO] Using following parameters for creating project from Archetype: hello-world-plugin:1.4 [INFO] ---------------------------------------------------------------------------- [INFO] Parameter: groupId, Value: unused [INFO] Parameter: artifactId, Value: demo [INFO] Parameter: version, Value: 1.0-SNAPSHOT [INFO] Parameter: package , Value: io.jenkins.plugins.sample [INFO] Parameter: packageInPathFormat, Value: io/jenkins/plugins/sample [INFO] Parameter: version, Value: 1.0-SNAPSHOT [INFO] Parameter: package , Value: io.jenkins.plugins.sample [INFO] Parameter: groupId, Value: unused [INFO] Parameter: artifactId, Value: demo [INFO] Project created from Archetype in dir: /home/zhouyang/workspace/testJenkins/demo [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time:  01:24 min [INFO] Finished at: 2018-11-19T20:48:40+08:00 [INFO] ------------------------------------------------------------------------ So I mean it out-of-date.
          Hide
          raychou1203 Yang Zhou added a comment -

          If you two approval my opinion, please assign me to resovle the issue.

          Show
          raychou1203 Yang Zhou added a comment - If you two approval my opinion, please assign me to resovle the issue.
          Show
          raychou1203 Yang Zhou added a comment - https://github.com/jenkins-infra/jenkins.io/pull/1899

            People

            • Assignee:
              raychou1203 Yang Zhou
              Reporter:
              raychou1203 Yang Zhou
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: