Maven: Opening New Doors for NetBeans IDE

Yesterday I started up NetBeans IDE 6.1, went to the Plugin Portal, and installed the Maven plugin:

I then went to the New Project wizard and selected Maven and then "Maven Project":

After clicking Next, I found the following project types:

Wow. I can create NetBeans modules in Maven? No set up or manual wackiness needed? Then I expanded "Archetypes from remote Maven Repositories". Wow, check it out:

...and check it out some more...

...and more...

...and more...

...and more...

...and more...

From some of the many cool-seeming archetypes, which I can now work with after simply clicking through this wizard, it would seem that one should be able to create OSGi bundles in NetBeans IDE. How interesting.


I use NB 6.1, when I try to create an 'Maven Netbeans Platform Application Archetype' it gives me an error:

[ERROR]Mojo (aggregator):
[ERROR] org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-3:generate
[ERROR]Archetype org.codehaus.mojo.archetypes:netbeans-platform-app-archetype:1.0.1 is not configured

Posted by Richard Mihalovic on May 19, 2008 at 09:42 PM PDT #

An alternative view for the pom.xml (like we have for persistence.xml and faces-config.xml) would do wonders for Maven newbies though.

I.e. it took me long to figure out that the Maven plugin for 6.1 (3.5.x, based on Maven 2.1?!) no longer supports meta-version names (RELEASE, LATEST etc.) in the <plugin> deceleration, so many existing Maven apps will give you the error msg:

Root error message: The PluginDescriptor for the plugin
org.apache.maven.plugins:maven-compiler-plugin was not found. Should
have been in realm:

Posted by Casper on May 19, 2008 at 09:46 PM PDT #

4 Richard Mihalovic:
You have to fill in all 3 keys (brandingtoken, ...) in the 3rd step of the wizard.

4 Geertjan:
You should go beyond wizards and try for example real Maven Netbeans Platform Application with several modules with all transitive dependency hell. No wows.

Posted by M on May 19, 2008 at 11:14 PM PDT #

Re Richard: You need to fill out all additional parameters in the archetype (should appear in table at the bottom of last panel)

Re Casper: I consider that a bug that shall be fixed (unfortunately on maven side primarily)

Posted by Milos Kleint on May 19, 2008 at 11:16 PM PDT #

I filled out all parameters and works now.

thanks guys.

Posted by Richard Mihalovic on May 20, 2008 at 01:03 AM PDT #

re: richard - great. I guess this is an issue with the wizard that lets you finish the creation without all the fields entered. feel free to file it as bug.

re M: check the "Maven Dependency vs NetBeans runtime dependency" section in the nbm-maven-plugin documentation (
for explanation how things work. If you know how to handle the problem better, let me know.

Posted by Milos Kleint on May 20, 2008 at 02:37 AM PDT #

On Mac OS X 10.5.4 I do not see any additional parameters to be configured in the wizard. Any idea what could cause this?

Posted by Gunther Walther on August 03, 2008 at 01:36 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« July 2016