GForge Jenkins Plugin
Jenkins Plugin Dev Cookbook
To develop/build the GForge Publisher plugin, you'll need:
- OS of choice: Ubuntu (I used Ubuntu because it's easy to set up)
- Eclipse (latest release for java developers is fine)
- JRE (obviously)
- Maven
- Updated source code of the plugin is in the SVN repo in the Hudson project on gforge.com
Notes:
- You'll also need to add the external references needed in the classpath
- See attached maven configuration (XML file).
How to build the plugin:
- Import the project into your eclipse workspace
- Build normally as any java project
- Package with maven to create the hpi file (jenkins plugin extension, which is basically a zip file with a specified directory structure inside)
- To package using maven, run mvn package from the project dir.
- You will also need the package to contain the referenced libraries, so run the release.sh script included in the project. This script takes care of everything.
- There's a file that needs to be added to the resulting package. To do so, unzip a previous version of the hpi file, and copy the
WEB-INF / classes / META-INF / annotations directory to the new build you made. Then zip again the whole package and set the extension as .hpi (as it originally was) - Now you have a Jenkins installable plugin
Note: You must include the annotations directory and content, or the config options for the plugin won't show up in Jenkins.
Helpful Links
- How to install Jenkins on ubuntu: https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
- How to convert maven project into eclipse project: http://www.mkyong.com/maven/how-to-convert-maven-java-project-to-support-eclipse-ide/
- How to create a plugin (pay attention to the section on installing / setting up Maven): https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial
| Item ID | Associated Item | Comment |
|---|---|---|
| No Associated Items Found | ||
| Locked | Sticky |
|
|
|
|
| ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| There are no threads. | ||||||||||||||||||
| Tags |
|---|
| No Tags Found |




