NetBeans 6.7: still the only (maven2) IDE you’ll ever need…

Now that NetBeans 7.0 6.7 is just around the corner and comes with a set of interesting improvements, I wanted to take a few moments again reflecting what has eventually been most important to me in NetBeans IDE: Support for apache maven. Earlier I switched to NetBeans after being using Eclipse for quite a while because Maven2 tooling in Eclipse used to, well, leave a lot to be desired.

At the moment, this hasn’t really changed… right now, we’re into doing a project using a Java EE backend (created / built using NetBeans+maven) and a frontend / user interface making use of Eclipse RAP. By the way I am torn here: Despite my preferences for using and working with NetBeans, I have to say that the single-sourcing – approach of building desktop and web applications with Eclipse RCP / RAP is quite a good thing in a project like ours. At the moment I am looking into qooxdoo framework which obviously is the foundation of Eclipse RAP to see how this could eventually be used standalone along with NetBeans; so far I simply haven’t found any UI framework, even for web-only (no single-sourcing) development on NetBeans on par with RAP here. While dealing with RAP development in Eclipse, once again I had to learn that, in general, tooling there could be better, and Maven2 integration in Eclipse is still absolutely horrible. In case of that RAP application, we actually gave up on using Maven2 as a build environment as integrating Maven2, Eclipse target platforms and OSGi bundles has proven to be pretty ugly and add quite some complexity to the tooling environment even while not providing any additional benefit (thanks to the requirement to have “standard” Maven2 jar artifacts packed up in new custom artifacts to make them OSGi bundles even eliminated the possibility to use Maven2 for transitive dependency management here).

But that’s eventually a different story… So, looking at what NetBeans 6.7 has in store related to Maven2, it’s likely to excel here even more in comparison. As Maven2 support in NetBeans has been strong at the very least since early 6.x releases, it seems most of the features listed here are just “minor improvements” but, overally, these definitely add to the ease of use doing Maven2 based development using NetBeans…

pom.xml completion

Some time ago, CTRL+SPACE – based code completion has been introduced to NetBeans’ pom.xml editor which, of course, includes the different elements allowed to appear by the pom.xml schema definition:


So far this is not too much of an “uncommon” feature and yet way more helpful than any visual editor eventually would be. Even better, however, is that by now, while editing pom.xml, there also is code-completion support for groupId, artifactId and version content, practically allowing for browsing your repository from within the pom editor in a pretty straightforward manner:


This, eventually, so far is my most excessively used feature provided by the new Maven2 tooling…

New “Add Library” dialog

… but for all those who don’t want to use this, there also is a new way to “add libraries” to Maven2 projects from within the Project Explorer:


Basically, this also has most one could eventually wish for, including group / artifact / version code completion and a powerful search facility.

Repository Browser and Dependency Graph

More for those of us who want to “see something” on the screen: The Repository Browser window, as the name implies, allows for easily browsing different (local, remote) Maven2 repositories to get a glimpse of what’s inside. Looks good, feels good, even though I never so far used it:


Eventually more compelling is the Dependency Graph feature, which, invoked on some Maven2 project, does draw a dependency hierarchy outlining how artifacts are wired up:


This is something I do use a little more excessively in order to tell people how things in our local projects are linked; this kind of visualization at the very least is good for documentation purposes; having this image exported and somehow added to a maven2-generated project specific site would be pretty impressive…

Goal Completion

As Maven2 in Netbeans (opposing the Eclipse approach where there is a dedicated “maven2” menu to invoke mvn-specific actions on Maven2 projects) is tightly integrated with the IDE and used as the only build mechanism in case of Maven2 projects, menu actions like “Clean” and “Build” do what they obviously should do in such a case. In situations in which “custom targets” are required, there always has been a wizard to set up such custom target actions, allowing for defining targets to be invoked as well as profiles to be used. Quite powerful, this wizard now also offers code-completion for targets and profiles available in the environment given:


This, also, is rather useful and heavily used in my environment.

Project maintaineance

In NetBeans 6.7, also the amount of Maven2 project types to be added via the “New Project…” wizard has been extended by adding new archetype templates most notably for supporting the creation of Java EE and EJB projects:


This, again, makes me want to point out that, in NetBeans, there fortunately is no need to carry around other project/build specific informations than just the pom.xml, which, compared to Eclipse, just incredibly eases dealing with loads of Maven2 projects. Asides this, the tooling now also offers a “Build with dependencies” option allowing for, well, building a Maven2 project along with all of its required local artifacts which is rather nice a feature. Eventually, the only thing still missing about project management is the ability to simply create an “empty maven2 project” (pom.xml pre-loaded with artifactId/groupId/version and nothing else, along with a simple, empty folder structure – src/main/, src/resources/ … in place). Maybe later. 🙂


So, to overally look at it, mkleint and the NetBeans Maven2 team has been pretty busy doing an impressive piece of work for what is likely to be NetBeans 6.7. And, looking at the fact that Maven2 projects in NetBeans still are plain, simple Maven2 projects easily to be built / used from the command line mvn as well, and looking at the fact as well that developers here try to implement features like the “build with dependencies” using Maven2 features not IDE related code makes NetBeans 6.7 so far the most reliable and most powerful frontent / tool for Maven2 development available to date. Good job, folks.

6 replies on “ NetBeans 6.7: still the only (maven2) IDE you’ll ever need… ”
  1. I find Maven to be so ridiculous it’s hard to even put it into words. The NetBeans team must be doing this for the sheer psychology of it (Maven) is technically not very compelling.

    The first thing I do when I see an open source project that uses Maven is:
    1. See if there is a better project. Maven is usually a red flag for bloaty, crappy APIs.
    2. If there is no other project that is as good, then try to build from the source. Hopefully there aren’t any funny dependencies that are generated by some strange plugin in the Maven bloatbase.

  2. @Jimmy: Though I accept your opinion, let me add a few thoughts:

    (a) This post wasn’t mainly about maven2 itself but about IDE toolings for maven2, assumingly being used by people who know why they do use maven2… like me: I stumbled across maven2 a couple of years ago and found it out to just solve a bunch of the problems I was dealing with, these days (most notably managing transitive dependencies in a sane way and enforcing a common, homogenous project structure across several developers), and that’s why I started using it (and actually do to date). If it is not your use case – fine. Good thing there’s choice. 🙂

    (b) Apart from that, your comment is mainly living off terms like “bloat” and “crap” but actually lacks any technical reasons why maven2 is bad in your opinion. I won’t argue against maven2 having some interesting “misbehaviours” and/or bugs (after all, feel free to file issues against whatever you feel appropriate), but, nevertheless: If you know a better Java build tool to support a sane management of transitive dependencies, an “object-like” project model to allow for, say, inheritance of project dependencies and configuration and, more than that, doesn’t fall back to the stone-age scripting level of Makefiles and friends, feel free to name it – I’m curious and willing to give it a try. 🙂

  3. Hopefully Netbeans 6.7 will have some new features to help speed up the Develop->Deploy->Test cycle of maven projects, especially multi module Java EE projects. I find this is entirely too slow since any changes require the changed module to be completely rebuilt (jar or war), and the containing module to be rebuilt (ear) and maven goes out to the remote repositories and checks for changes on all of the dependencies. Exploded modules is slow too since maven will go through the unnecessary process of packing them up, and then unpacking them rather than just copying the pre-packed artifact.

    I’d be excited to see multi-module maven projects that the IDE can provide a fast Develop->Deploy->Test for. Hopefully Netbeans 6.7 brings us closer to this.

  4. @Jimmy: Funny, because I make the same generalizations about people who use ant. They are stuck in the past incapable of seeing a better way. They insist on having a totally different build script for every project they work on, and different directory structures. Or, they violate DRY and copy build scripts from project to project and make tweaks. This makes it difficult for developers to join the project because they have to learn the build system and scripts. Maven standardizes all of this, and the POM only contains differences from the standards specific to your project (such as dependencies). Plus Maven has excellent transitive dependencies support which works really well when using continuous build servers, or have multiple developers on a project.

    I have to agree with you that ant is usually a red flag for bloaty, crappy APIs.

  5. Maven support in netbeans 6.7 is some problematical.
    1.JEE project and web project support are only shortcuts of the standard archetype project. You can not set the basic feature in the wizard, such as target server and project relation(web project belong to a enterprise project) like ant based JEE support. You can not add a web framework support to web proejct.
    2.Project properties settings is lack of many features provide in ant-based GUI. Such as the build lifecycle, compile,package,documenting.
    3.Files explorer windows display the logic name for maven project, not the real directory name.
    4.”Add library” feature is designed to add dependency to maven project. But I dislike the code completion in three field. It is very slow. I input a character must wait some minutes for next character input. The single field query windows is welcome. Many users are familiar with the “Go To” style windows.

  6. @hantsy : have you communicated these issue to sun? Specifically issue #1 and #2? I know they want to make Maven2 project development as featureful as regular NetBeans ant project development.

Leave a Reply

Your email address will not be published. Required fields are marked *