Maven-based NetBeans platform development with JRebel 6 – minor update

Some months ago I wrote about how easy it is to use JRebel for development of NetBeans platform module [1]. That article was focused mainly on standard ant-based modules. But recently I started to convert my plugins to the maven-based approach. At the same time I started testing JRebel 6 in an EAP. This combination didn’t work as described in one of my previous blog entries [2], but I figured it out and I like to document it using this blog post.

Steps to get maven-based nbms running using JRebel 6

  • enable “compile on save”
  • generate rebel.xml to /src/main using the context menu of jrebel (this way it will be copied to target/classes)
  • alter the properties-section of the pom.xml like this
            <>-J-noverify -J-javaagent:e:/tools/jrebel/jrebel.jar -J-Drebel.log=true ${}</>
  • run the module – JRebel will create a bootstrap file in your temp directory once and will quit the execution
    JRebel: Starting logging to file: C:\Users\markiewb\.jrebel\jrebel.log
    [INFO] JRebel is now building a boot class cache.
    [INFO] This will only happen on this first run, or after manually deleting the rebel boot folder.
    [WARNING] JRebel bootclasspath not specified!
    [WARNING] Make sure to add -Xbootclasspath/p:C:/Users/markiewb/AppData/Local/Temp//rebelboot.jar to jvm arguments
    [WARNING] Otherwise this warning will appear again, and you won't be able to start your application
    [INFO] System will exit now, please restart the application to run with JRebel enabled.
  • add the bootclasspath argument with the path from the previous output to too (please note the “-J” prefix, that is important) (If NetBeans does not start, try to remove ${} from the <>-parameter
            <>-J-noverify -J-Xbootclasspath/p:C:\Users\markiewb\AppData\Local\Temp\rebelboot.jar -J-javaagent:e:/tools/jrebel/jrebel.jar -J-Drebel.log=true ${}</>
  • run the module – the application with your module and JRebel should start up
  • make changes to your classes and jrebel will pick them up

Tested with Win7 64bit, Oracle JDK 1.7.0u40, JRebel 6.0.0-M3, NetBeans IDE 7.4



  • Tested with Win7 64bit, Oracle JDK 1.7.0u45, JRebel 6.0.0-M6, NetBeans IDE 7.4Patch2
  • Added comment about removing ${}



How to convert an ANT-based NetBeans Module to a Maven-based NetBeans Module

I am currently converting some of my ANT-based NetBeans Modules to Maven-based ones. I didn’t found a step-by-step migration list, so I decided to create one and to share it with you. The following list was created while converting a simple plugin with less than 20 classes, so the migration steps of large projects might vary. But you should get the basic idea.

  • create a new maven based NBM using the “New Project”-wizard (to reuse a working configuration)
  • copy the folder src and pom.xml to the old project
  • in pom.xml
    • define a groupId
    • set the name from OpenIDE-Module-Name entry in
    • set the artifactid from OpenIDE-Module entry in MANIFEST.MF
    • set the version from OpenIDE-Module-Specification-Version entry in MANIFEST.MF
  • remove the line with OpenIDE-Module-Specification-Version entry from MANIFEST.MF
  • remove the line with OpenIDE-Module entry from MANIFEST.MF
  • remove nbproject/
  • remove nbproject/
  • remove nbproject/build-impl.xml
  • remove build.xml
  • move to folder src/main/nbm
  • move your sources (*.java) to src/main/java (or src/test/java) (GIT is very useful here, the commit history isn’t lost)
  • move your resources (not *.java) to src/main/resources (or src/test/resources) (especially
  • add dependencies (the most annoying part)
    • foreach dependency entry (code-name-base) in nbproject/project.xml add a dependency via the “Add dependency” dialog OR add a dependency manually to pom.xml

    For example use




    (!) Note that the dots in the dependency name have to replaced by a dashes

  • add test dependenciesFor example use



There is still more to do. Like to configure export packages, signing, homepage and so one. Most of these configuration settings defined in the original have a counterpart in the plugin configuration of the nbm-maven-plugin. See the detailed goal documentation at

But your mavenized plugin should start at least now.

PS: The whole process is worth a plugin itself.  Any volunteer?