NetBeans users can now use the IDE's Maven support to open the project directly. (Bundled in 6.7 and up; available from Plugin Manager for NetBeans 6.5 and up) to open the project directly..)
IntelliJ 7.0 (or later) users can load pom.xml directly from IDE, and you should see all the source code of libraries and Hudson core all the way to the bottom.
Most of the time, a plugin class just registers extension points, and your main work involves in implementing those extension points. See the source code for more about how a
Builder is implemented and what it does.
Debugging a Plugin
Run NetBeans 6.7+ users can just hit Debug. For all others, run the following command to launch Hudson with your plugin:
- When you make changes to view files in
src/main/resourcesor resource files in
src/main/webapp, just hit F5 in your browser to see the changes.
- When you change Java source files. Compile them in your IDE (NetBeans 6.7+: Debug > Apply Code Changes) and Jetty should automatically redeploy Hudson to pick up those changes. There is no need to run
MAVEN_OPTS can be used to specify all sorts of other JVM parameters, like
- Consider running Maven like
mvn -o ...to avoid hitting repositories every time. This will make various operations considerably faster.
- Subscribe to
firstname.lastname@example.org here so that we can get in touch with you.
- When you bump up the version of Hudson you depend on, make sure to run
mvn cleanonce, in particular to delte delete
target/workthat Jetty uses. Newer versions may just use work, not target/work. Otherwise your Jetty may continue to pick up old left-over jar files.