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.

5 Comments

Thanks !

That's great Milos. I've just started a Maven-based NetBeans 6.7 platform project, so this is very timely.

However, I'm experiencing problems when using the @ServiceProvider annotation. When I invoke clean and build I always end up with a NullPointerException in the compile phase (See below). Is annotations not supported for Maven based projects? Seems to work fine for the Ant based projects.


-- Exception --
java.lang.NullPointerException
at com.sun.tools.javac.util.DefaultFileManager.getFileForOutput(DefaultFileManager.java:1078)
at com.sun.tools.javac.util.DefaultFileManager.getFileForOutput(DefaultFileManager.java:1054)
at com.sun.tools.javac.processing.JavacFiler.getResource(JavacFiler.java:434)
at org.netbeans.modules.openide.util.ServiceProviderProcessor.register(ServiceProviderProcessor.java:149)
at org.netbeans.modules.openide.util.ServiceProviderProcessor.process(ServiceProviderProcessor.java:101)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:624)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:553)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:698)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:981)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
at com.sun.tools.javac.main.Main.compile(Main.java:353)
at com.sun.tools.javac.main.Main.compile(Main.java:279)
at com.sun.tools.javac.main.Main.compile(Main.java:270)
at com.sun.tools.javac.Main.compile(Main.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:420)
at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:141)
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:493)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

googling around reveals that you might need to add some compiler plugin configuration.

I'm not entirely convinced it's actually supported, see these 2 issues filed by Jesse Glick

http://jira.codehaus.org/browse/MCOMPILER-97
http://jira.codehaus.org/browse/MCOMPILER-98

Hi, I'm setting up a mixed eclipse / netbeans environment. I have followed your suggestions above which gives me a working proto in Netbeans 6.7 for a platform project.

Q1. If I execute a mvn install it works correctly, however if I execute a mvn compile it fails with the following error.

[INFO] Building cmc - NetBeans Platform based application
[INFO] task-segment: [compile]
[INFO] ------------------------------------------------------------------------
[INFO] [nbm:cluster-app {execution: default-cluster-app}]
[INFO] Processing cluster 'platform10'
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] error in opening zip file

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: error in opening zip file
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: error in opening zip file
at org.codehaus.mojo.nbm.ExamineManifest.checkFile(ExamineManifest.java:83)
at org.codehaus.mojo.nbm.AbstractNbmMojo.turnJarToNbmFile(AbstractNbmMojo.java:385)
at org.codehaus.mojo.nbm.CreateClusterAppMojo.execute(CreateClusterAppMojo.java:154)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at org.codehaus.mojo.nbm.ExamineManifest.checkFile(ExamineManifest.java:79)
... 21 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Thu Sep 10 12:20:02 BST 2009
[INFO] Final Memory: 21M/79M
[INFO] ------------------------------------------------------------------------


Any suggestions much appreciated.

Q2. In my mixed environment, if i check out a multiproject with both eclipse and netbeans projects in eclipse it complains about missing indirect references, specifically:

Missing indirectly referenced artifact org.netbeans.api:org-jdesktop-layout:nbm-file:RELEASE67:compile

and


Missing indirectly referenced artifact org.netbeans.api:org-netbeans-api-annotations-common:nbm-file:RELEASE67:compile

and others.

Is there a repository that I can use to feed these to eclipse?

Damian:

Q1: please file it asa bug at http://jira.codehaus.org/browse/MNBMODULE, I'll take a look. Also please try with the latest version (3.1) released a few weeks ago.

Q2: I think it is some error in the eclipse integration that doesn't recognize the artifact mapping from "nbm-file" type to ".nbm" file extension. That's defined in the nbm-maven plugin as extension but somehow you probably don't get it resolved correctly and eclipse is using the .nbm-file extension instead. All the nbm dependencies are in the same repository. the ones mentioned by you should be as well..

About this Entry

This page contains a single entry by mkleint published on July 1, 2009 9:08 AM.

Appframework, Maven, JavaRebel and NetBeans was the previous entry in this blog.

Maven, NetBeans platform, JavaRebel is the next entry in this blog.

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