Mevenide for Netbeans

by Robert Cooper

Related link: http://mevenide.codehaus.org/mevenide-netbeans-project/features.html



So recently I have been tasked with moving and facilitating a migration to Maven for my employer's Java codebase.

I must admit, I was skeptical of Maven when I first got started. Ant works great, and it is infinitely flexible. However, Maven's standardization has a lot of selling points. If nothing else, the standardization of "target" names (in the Maven world they are "goals") helps a lot. While Maven, though being an ASF project past the 1.0 mark, has the code-whiff of something that isn't quite... finished... I have really become a fan.

The second aspect to this post is my affinity for NetBeans. I know this leaves me in a tiny minority of Java developers, but especially after the 4.0 mark, I have consistently been impressed by what NB offers, and all in one easy package -- no getting the "Base" and a thousand plugins, including MyJ2EE which costs (albeit a tiny amount), to get started. One thing, though, that was part of the big NB 4.0 "features" list was the "Ant Based Build System". It is actually really great, and offers all the things you would expect from an IDE while making it easy to extend the build process in the IDE with custom tasks. However, the Ant scripts NB generated were completely worthless outside of a machine with NB installed. That means, whether you are working in a corporate team with the Odd Man Out IDE or working on open source projects, you lost almost all the great features.


Enter Mevenide. This is a plugin for NetBeans that basically replaces the entire Ant layer with Maven. The best part is, however, it does nothing "special". Maven will still build your projects perfectly. Even better, the Meveide deps management is WAY better than the one NB comes with. For instance (and this is new to the latest Mevenide rev):

image

Dependencies become a tree on the project view. Mevenide will inspect remote repos and show you the available versions. Updating is as easy as a right-click. You will also notice the little Maven logo thing next to dependencies that are other projects you have open. While it is smart enough to recognize these, it doesn't yet seems to support cascade "clean-build" cycles from the IDE tool, so you do have to constantly give it the old [type]:install to build deps.

It also completely replaces the project screen with Maven-equivs. The nicer part of which is the project.properties editor. You can see both the current set props for your project:

image

As well as all available properties for a plugin -- something that has saved me COUNTLESS trips to maven.apache.org just to find a prop name:

image

The new version also added a quick dropdown to get to all the related project files in the editor, which was a HUGE improvement over having to constantly flip back to the files view to make hand changes:

image

While it does feel you give up a good chunk of the functionality that really sells NetBeans over Eclipse in my mind, Mevenide beats the 80/20 rule hands down. Moreover, using your POM file as a cross-IDE project descriptor makes working and playing well with others a whole lot easier. The Mevenide group has plugins for most big Java IDEs. I have only worked with the NB and Eclipse verions, however. The Eclipse one comes with a nice GUI-lite POM editor (think web.xml editing), but other than that, it doesn't seem nearly as nice to me. That may simply be because I never seemed to grasp the operational metaphor it is trying to use with a project. Still, though, the Eclipse plugin for Maven on its own gets you 80% of the way there with Eclipse, so they may just not feel there is that much to "do".

Think I'm a freak for using NetBeans? Got any other good Maven tools?


2 Comments

hopelessOne
2005-10-18 06:42:25
Netbeans ant scripts
I think you're wrong when you say "However, the Ant scripts NB generated were completely worthless outside of a machine with NB installed".


I've used them to compile and run projects on machines without NB installed. Admittedly, some targets (like run-single) are designed for use with netbeans.

kebernet
2005-10-18 06:52:54
Netbeans ant scripts
Not if you are using the NB dependencies/libraries system. That all gets set with $nbhome properties. :(