Yesterday when I play with jenkins and redmine, I noticed it was little weak for current redmine plugin, so I decided to take a look at the source codes and build some compentence here.
Since I didn’t play with java codes for long time, I need to bring it back especially for maven knowledge.
To my surprise, jenkins’s documentation and its develop environment is excellent, see detail below
Getting started
http://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial is the good start, and since mostly we use nexus, we need to follow http://wiki.jenkins-ci.org/display/JENKINS/HudsonWithNexus to configure the nexus server as well, yesterday I forget this
, two tips you may need
- besides recommend setting for nexus user, the plugin group org.jvnet.hudson.tools needs to be set in settings.xml as well
- in nexus server, I added apache snapshot as well though it is not in the list, otherwise it complain to miss maven-enforcer-plugin:pom:1.1-snapshot
The guideline and the hudson maven plugin is excellent, which we can also learn for our own products
$ mvn -cpu hpi:create $ cd create_samples $ mvn package $ mvn install $ mvn hpi:run
You can see during the package step, it will trigger the jetty server for smoke test, and after hpi:run command, I can visit my first jenkins plugin “UI Samples” for my browser.
so easy to start, this is also a reason the jenkins community is so big and lots of contribution since they have an excellent platform to work on.
Also this is a reason why almost every developers follow jenkins’s fork from hudson.
Play with redmine plugin
This plugin is not moved to github yet, and I don’t know how to download via svn, anyway lastest source codes exist here https://svn.jenkins-ci.org/trunk/hudson/plugins/redmine/, I just use wget to download the source codes, sth like
wget "--accept=*" -l 7 -np -rL --no-check-certificate https://svn.jenkins-ci.org/trunk/hudson/plugins/redmine/
Thanks to maven, I can simple use the same command to trigger it out, and to be fun, I just replace one icon to see whether it works, bingo, very good.
I will try to write some patches for our own usage.
Summary
- The jenkins development plugin is excellent on its code management using maven, since each plugin’s pom.xml is simple, it can let developer to focus its plugin business.
- mostly we need to develop own plugins in jenkins in the future to do integration.