Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Info about NB 6.7's support for Hudson plugin development.

...

NetBeans

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 IDEA

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:
Unix:

...

  1. When you make changes to view files in src/main/resources or resource files in src/main/webapp, just hit F5 in your browser to see the changes.
  2. 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 mvn at all.
    Info

    MAVEN_OPTS can be used to specify all sorts of other JVM parameters, like -Xmx

...

  1. Consider running Maven like mvn -o ... to avoid hitting repositories every time. This will make various operations considerably faster.
  2. Subscribe to users@hudson.dev.java.net from here so that we can get in touch with you.
  3. When you bump up the version of Hudson you depend on, make sure to run mvn clean once, in particular to delte delete target/work that Jetty uses. Newer versions may just use work, not target/work. Otherwise your Jetty may continue to pick up old left-over jar files.