Tuesday May 20, 2008
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.
May 20 2008, 04:25:39 AM PDT Permalink
I use NB 6.1, when I try to create an 'Maven Netbeans Platform Application Archetype' it gives me an error:
[ERROR]
[ERROR]
[ERROR]Mojo (aggregator):
[ERROR]
[ERROR] org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-3:generate
...
[ERROR]Reason:
[ERROR]
[ERROR]Archetype org.codehaus.mojo.archetypes:netbeans-platform-app-archetype:1.0.1 is not configured
Posted by Richard Mihalovic on May 20, 2008 at 04:42 AM 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:
ClassRealm[/plugins/org.apache.maven.plugins:maven-compiler-plugin
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 20, 2008 at 06:14 AM 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) http://www.netbeans.org/issues/show_bug.cgi?id=135043
Posted by Milos Kleint on May 20, 2008 at 06:16 AM PDT #
I filled out all parameters and works now.
thanks guys.
Posted by Richard Mihalovic on May 20, 2008 at 08: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 (http://mojo.codehaus.org/nbm-maven-plugin/index.html)
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 09: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 08:36 AM PDT #


