hot reloading - plugin development flow (what is meant to work?)

219 views
Skip to first unread message

Michael Neale

unread,
Feb 2, 2016, 6:41:57 PM2/2/16
to Jenkins Developers
I am curious how much people use of the hot-reloading during plugin development.

As mentioned on https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial - jelly and other files are reloaded (I know that works well in my experience) however its the other reloading that seems to be suspect when I try it (have tried a few different plugins to ensure its just not one version of core etc). 

1) there is JVM hotswap with debugging (always a mixed bag)
2) press ENTER on mvn hpi:run to reload webapp
3) jrebel with OSS licence

What do people use? I have found 2 actually breaks hard almost always (various errors). 
3 I have never tried. 

Or do people just build and run unit tests and rerun mvn hpi:run as needed? 


Gavin Mogan

unread,
Feb 3, 2016, 3:32:28 AM2/3/16
to Jenkins Developers
I've had one plugin that worked with #2, I've done #1 a few times. Usually write more tests and restart from time to time.

Michael Neale

unread,
Feb 3, 2016, 3:47:15 AM2/3/16
to Jenkins Developers
"write more tests and restart from time to time" seems to be pretty good practice! (buy a faster machine too!). 

I wasn't sure if I was missing out in some way, but it seems many don't bother with the hot reloading options. 

Baptiste Mathus

unread,
Feb 3, 2016, 8:53:12 AM2/3/16
to jenkin...@googlegroups.com
I /think/ that 2) got some improvement in the maven-hpi-plugin itself (seem to remember some commits from Stephen talking about it IIRC). But indeed that requires to explicitly update its version in your pom, or run the fully qualified maven CLI (and not hpi:run alone).

That's also why I like the plugin-pom since it's gonna make it easier to update the plugin-pom version w/o bumping the jenkins core requirement itself. And so being able to take a recent m-hpi-p version on a more regular basis than now.

And yeah, it personally bothers me sometimes. Got to try the JRebel set up I guess.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/92e542f8-8aba-443e-a999-b29bd3066bc5%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Andrew Bayer

unread,
Feb 3, 2016, 10:24:01 AM2/3/16
to jenkin...@googlegroups.com
I've always had problems with the hpi:run ENTER reloading - I think, if I remember correctly, that it's bugged out on OS X...

A.

Michael Neale

unread,
Feb 3, 2016, 5:17:14 PM2/3/16
to Jenkins Developers
From what I can see jrebel aren't offering free OSS licences anymore (someone correct me if wrong). 

I will try it one of these days anyway, if it is as good as claimed I don't mind paying for it (and it doesn't introduce a runtime dependency or anything). If i do, I will report back. 

Jesse Glick

unread,
Feb 3, 2016, 6:09:25 PM2/3/16
to Jenkins Dev
On Tue, Feb 2, 2016 at 6:41 PM, Michael Neale <mne...@cloudbees.com> wrote:
> As mentioned on https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial
> - jelly and other files are reloaded (I know that works well in my
> experience)

Yes, this is automatic: you save the resource and reload the page.

> 1) there is JVM hotswap with debugging (always a mixed bag)

Works fine for me (from NetBeans), provided of course you only modify
method bodies.

> 2) press ENTER on mvn hpi:run to reload webapp

Does not actually work AFAIK.

Kanstantsin Shautsou

unread,
Feb 4, 2016, 5:37:23 AM2/4/16
to Jenkins Developers
Enter never worked because after restart descriptors changing links.
Reload doesn't affect removed classed, so only clean build and run can provide real working state after changes.
Reply all
Reply to author
Forward
0 new messages