Jamie's Space


Maven Support in Netbeans 6.0

Today I started writing the message exchange beans for my ServiceMix/virtualisation benchmark. I have previously used Netbeans to develop these, but it usually requires manually adding the library JARs from the ServiceMix directory (plus any others it depends on) which is a bit of a pain.

Not so anymore! I installed the Maven plugin for Netbeans when I first installed it, with the intention of trying it out. While I was trying to add the java source directory of the bean service unit I am developing I noticed that the directory was showing up as a Netbeans project (they have a different icon to regular directories in the Netbeans file dialogs). I opened it up as a project instead, and it gave me a project with all of the library files added, the ability to modify parts of the POM using a form, easy access to sub-projects (if you open the root project up first), easy access to resources, the works. I am so impressed with this.

It even gives you the ability to execute any Maven goal from within Netbeans. This is great - usually when developing things for ServiceMix I have a number of windows open (Netbeans, a few command lines, explorer, notepad++, etc) and things get very cluttered. Now I can set up Maven actions in Netbeans that clean, install and deploy my service assemblies, without needing to switch between windows.