TODO-Plugin guidance

29 views
Skip to first unread message

Ronald Petty

unread,
Apr 10, 2018, 11:49:57 PM4/10/18
to Jenkins Developers
Hello,

I could be living in the past, but I am trying to get the old `mvn hpi:...` to work and it seems it has changed.  I found a page saying we should use this method here:

mvn archetype:generate -B -DarchetypeGroupId=io.jenkins.archetypes -DarchetypeArtifactId=hello-world-plugin -DarchetypeVersion=1.4 -DartifactId=first

mvn hpi:run

Things start up, and I see the TODO plugin installed, but the Hello World Builder is now gone.  No errors appear on start in the log.

Can someone point me to a fool proof hello-world (TODO) tutorial for Jenkins 2.115 development?

I appreciate the help.

Regards.

Ron

Baptiste Mathus

unread,
Apr 11, 2018, 3:52:29 AM4/11/18
to Jenkins Developers
Cool you're trying this! Welcome!

You should follow https://jenkins.io/doc/developer/tutorial/create/ then IIUC you will want to choose the (as of now) choice number 2: 

"2: remote -> io.jenkins.archetypes:hello-world-plugin (Skeleton of a Jenkins plugin with a POM and an example build step.)"

FWIW, just tested it and it worked perfectly for me:

Démarré par l'utilisateur anonymous
Building in workspace [...]/dev/tmp/2018-04-11T09h44m51+0200-/blah/work/workspace/fgfdffd
Hello, baptiste!
Finished: SUCCESS

In the end, it /should/ be the very same as what you typed, but well, better follow the documentation if you're still learning the basics. For you, and to give us the opportunity to improve/fix the documentation for newcomers :).

Cheers

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/b669b566-eb39-4b24-b76b-3965e14fa7e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ronald Petty

unread,
Apr 12, 2018, 7:57:43 AM4/12/18
to Jenkins Developers
Thanks for the information.  I did find part of the issue for me.  The global.jelly is not generated, so there was no Configure screen for the plugin.  There was an option (which I didn't check first time) for the job, but not the plugin.  Adding global.jelly, repackage, it then worked like it use to.


On Wednesday, April 11, 2018 at 12:52:29 AM UTC-7, Baptiste Mathus wrote:
Cool you're trying this! Welcome!

You should follow https://jenkins.io/doc/developer/tutorial/create/ then IIUC you will want to choose the (as of now) choice number 2: 

"2: remote -> io.jenkins.archetypes:hello-world-plugin (Skeleton of a Jenkins plugin with a POM and an example build step.)"

FWIW, just tested it and it worked perfectly for me:

Démarré par l'utilisateur anonymous
Building in workspace [...]/dev/tmp/2018-04-11T09h44m51+0200-/blah/work/workspace/fgfdffd
Hello, baptiste!
Finished: SUCCESS

In the end, it /should/ be the very same as what you typed, but well, better follow the documentation if you're still learning the basics. For you, and to give us the opportunity to improve/fix the documentation for newcomers :).

Cheers
2018-04-11 5:46 GMT+02:00 Ronald Petty <ronald...@gmail.com>:
Hello,

I could be living in the past, but I am trying to get the old `mvn hpi:...` to work and it seems it has changed.  I found a page saying we should use this method here:

mvn archetype:generate -B -DarchetypeGroupId=io.jenkins.archetypes -DarchetypeArtifactId=hello-world-plugin -DarchetypeVersion=1.4 -DartifactId=first

mvn hpi:run

Things start up, and I see the TODO plugin installed, but the Hello World Builder is now gone.  No errors appear on start in the log.

Can someone point me to a fool proof hello-world (TODO) tutorial for Jenkins 2.115 development?

I appreciate the help.

Regards.

Ron

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.

Jesse Glick

unread,
Apr 12, 2018, 10:28:15 AM4/12/18
to Jenkins Dev
On Thu, Apr 12, 2018 at 7:57 AM, Ronald Petty <ronald...@gmail.com> wrote:
> The
> global.jelly is not generated, so there was no Configure screen for the
> plugin.

Yes, that was removed from the `Builder` archetype, as it was using an
old idiom that does not generalize well and is no longer recommended.
There is a separate archetype showing how to use a
`GlobalConfiguration`.
Reply all
Reply to author
Forward
0 new messages