user836264
user836264

Reputation: 13

Run Jenkins plugin in Eclipse

I'm able to maven-build a Jenkins plugin project on Eclipse. Is there a way to directly run the plugin in Eclipse? So the Jenkins user interface can show up.

Upvotes: 1

Views: 5436

Answers (2)

Icermann
Icermann

Reputation: 181

If I understand your question correct you want to hit debug in Eclipse and get Jenkins with your own plugin installed.

Add the information to your settings.xml file in your .m2 folder according to Jenkins Plugin Tutorial

In Eclipse, add a new maven build configuration (under run -> run configuration...) with the base directory set to your project (where your pom-file is) and hpi:run as goal. Choosing to run this configuration in Eclipse will start a new Jenkins instance within a Jetty server (you won't have your old jobs or data there, but jobs you create will be saved between runs). Hitting debug instead will start Jenkins in debug mode.

Set a breakpoint in your code (Eclipse might warn you about not being able to set the breakpoint due to some line number compile options, but it will work anyway) and open your Jenkins administration page at localhost:8080/jenkins.

Good luck!

Upvotes: 5

Morfic
Morfic

Reputation: 15518

I don't know of such an option.The maven hpi:run seems to be the closest option to what you desire, as described in the jenkins plugin tutorial. There is an alternate eclipse setup but it seems to be even less "compatible" with your request.

Upvotes: 0

Related Questions