Setting up a jenkins development environment with netbeans

457 views
Skip to first unread message

Joel Collins

unread,
Mar 9, 2015, 2:50:48 PM3/9/15
to jenkin...@googlegroups.com
I've been trying to follow the instructions here https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial#Plugintutorial-SettingUpEnvironment but have been running into a lot of mental hurdles.

I've got jenkins installed from the debian repo (/var/lib/jenkins).
I've got my source code for the plugin checked out in (/home/myname/my-jenkins-plugin).

The plugin runs successfully if I run "mvn install", copy the hpi file from ./target over to /var/lib/jenkins/plugins, and restart jenkins.  However, debugging this was is enormously slow, and I'm trying to setup a better development environment.

In netbeans (8.0.2) I've loaded the project file, and the maven sources were downloaded.

The tutorial now says

NetBeans 6.7+ users can just hit Debug.

but the debug tab is not working.  Also, I dont understand how a netbeans project that only has my plugin in it is supposed to know how to kick off the instance of jenkins. 

I've also tried the mvnDebug command and listening on 8000 in netbeans with no success.

What am I doing wrong?

Thank you!

Thom Ellis

unread,
Mar 9, 2015, 8:08:34 PM3/9/15
to jenkin...@googlegroups.com
What do you get in the output window?

I just switched to NetBeans from Eclipse a couple days ago, and I had been debugging the same way I was previously in Eclipse, which was to build with Maven from the command line, and then I would just attach the NetBeans debugger which worked fine.  It's a bit more tedious, but it was the flow I'd been used to. Might be able to do that as a workaround as well in the meantime.

I did however just try debugging directly through NetBeans, and everything seemed to work just fine, it fired open a browser window and Jenkins was up and running.  

I'm assuming you can do a clean build through NetBeans without any errors?

--T

Joel Collins

unread,
Mar 10, 2015, 7:25:21 AM3/10/15
to jenkin...@googlegroups.com
Thanks Thom, like I said I think i'm missing something major here.  There is nothing in the output window since I have no options to "run" or "debug" anything.  I can build the plugin just fine, but that just creates an .hpi file, nothing else.

I want to make this super clear, I did not setup a development environment for jenkins core first.  Is that a prerequisite?  The instructions for the plugin development made it seem like merely building a jenkins plugin provided enough of a build environment to kick off jenkins itself, but I dont see how this is possible.  It also said that if you run mvnDebug (where the debugging happens on port 8000), jenkins will magically become available on :8080.  Again, I think I'm just confused.  Do I need to also follow a tutorial for setting up a development build of Jenkins?

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-dev/zSasZNqvRWU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/760c12da-9c44-4a8a-a221-a214d4e7c07e%40googlegroups.com.

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

Mads Nielsen

unread,
Mar 10, 2015, 7:43:43 AM3/10/15
to jenkin...@googlegroups.com
Have you tried installing the stapler/jenkins plugin for netbeans? Try that, and create a project from the template the plugin provides.

--
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/CAMCVXr%3D1WHtusYF2Cf4M213Zu4Yu9B20NXAE12cD%2BZfMNSH6UQ%40mail.gmail.com.

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



--
____________________________________________________________
Mads Nielsen
Consultant
m...@praqma.net
+45 50 98 18 09
Skype: inkspot
Praqma
www.praqma.com
Allerød Stationsvej 4
DK-3450 Allerød
+45 36 77 27 62

Joel Collins

unread,
Mar 10, 2015, 9:35:28 AM3/10/15
to jenkin...@googlegroups.com
That was it.  Thank you!  I updated the wiki page to clarify that runniung/debugging requires that plugin.

Reply all
Reply to author
Forward
0 new messages