July 2009 Archives

NB 6.7.1 - 20 Maven related bugs fixed

A new version of NetBeans is out, 6.7.1 - a bugfix release. Among other things it contains 20 bugfixes in the Apache Maven support. Please upgrade.

Few notes on using maven projects at kenai.com

Because kenai.com doesn't provide any unified deployment vehicle for maven projects yet, I've tried the way suggested by Fabrizio Guidici. The following comments might help other who also attempt to do so.

I've tried to perform a release of a set of maven projects at http://kenai.com/projects/nb-maven-generators


  • if you are using mercurial as the version control of choice, then release:prepare will fail for you if the mercurial root doesn't contain the root pom.xml file. I had the projects in a subdirectory and the checkout/clone that is part of the release:prepare goal didn't find it then. I suppose that's a generic issue with mercurial+maven-scm-plugin. It attempts to tag the project, but mercurial is only capable of tagging and cloning the whole repository. I haven't tried, but I suppose releasing just one submodule might not be possible

  • If your username at kenai contains a special character, like @ in my case (milos.kleint@sun.com), you need to encode the character when running
    mvn -Dusername=milos.kleint%40sun.com -Dpassword= release:prepare
    For a complete list of url encodings, see this explanatory page
  • When doing release:perform afterward, the forked maven build needed me to confirm credentials of the svn release repository. Unfortunately the forked maven instance within release:perform doesn't have the input streams connected correctly and therefore I could not confirm the credentials are ok. A workaround I found was to perform mvn deploy:deploy-file, confirm credentials and then cancel.

  • Finally, when deploying you need to pass the username and password for the svn wagon extension via the ~/.m2/settings.xml file. See details about the exact syntax.

After a few try&error cycles, I finally managed to perform the release correctly. Hope that helps.

As the canonical Maven book suggests, you should use $[foo.bar.version} property expressions when you have multiple, related artifacts with the same version. Then you are able to upgrade all the dependencies consistently with minimal effort.

The NetBeans IDE 6.7 supports this pattern in the Add Dependency dialog. You can invoke that dialog from the Add Dependency action on project's Libraries node in Projects view, or from the pom.xml editor via Insert Code (Alt-Insert) editor action.
The Version field completion includes all *.version properties defined in the project (or any of the parent) and offers them as expressions in form ${*.properties}

That way you can keep your dependencies in sync right from the NetBeans UI.

In future 6.8, we also replace the GroupId and Version values with ${project.groupId} and ${project.version} if both the groupid and version match those of the current project. Again, a practise suggested by the Maven book.

Maven, NetBeans platform, JavaRebel

| 9 Comments

When I was playing with JavaRebel in April, it was not possible to use JavaRebel with the NetBeans platform. Basically because the module system is just another container and for each container you need a JavaRebel plugin. The guys at Zeroturnaround wrote the plugin a few weeks back (thanks!) so I've downloaded the nightly build and tried to experiment a bit. I've also worked some more on Compile on Save support for 6.8, so I wanted to test how far we've got with #161337. Here's the result.

NB 6.7 binaries in Maven repository

| 5 Comments

I've uploaded the Netbeans 6.7 final artifacts to the Maven repository at http://bits.netbeans.org/maven2/. It contains the module jars, NBM files, javadoc and source jars and other artifacts relevant to 6.7 release.

Please note that when upgrading your NetBeans platform application from 6.5 to 6.7, you need to increase the version of all artifacts from RELEASE65 to RELEASE67 and also in your nbm-application project, change the dependency from org.netbeans.cluster:platform9 to org.netbeans.cluster:platform10. The artifactId of the platform cluster has changed as the cluster version was increased. (Not sure what meaningful purpose the cluster numbering serves, but that's a different story)

        <dependency>
            <groupId>org.netbeans.cluster</groupId>
            <artifactId>platform10</artifactId>
            <version>${netbeans.version}</version>
            <type>pom</type>
        </dependency>

Please note that the current 3.0 version of the nbm-maven-plugin might have problems with NetBeans 6.7 . A new version of the plugin will appear shortly.

About this Archive

This page is an archive of entries from July 2009 listed from newest to oldest.

April 2009 is the previous archive.

August 2009 is the next archive.

Find recent content on the main index or look in the archives to find all content.