This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 218488 - In a Platform Maven project with a custom layout the "Branding..." dialogs are broken
Summary: In a Platform Maven project with a custom layout the "Branding..." dialogs ar...
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.1
Hardware: PC Mac OS X
: P3 normal with 1 vote (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-17 18:42 UTC by fabriziogiudici
Modified: 2012-09-21 16:42 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fabriziogiudici 2012-09-17 18:42:37 UTC
I have some Platform projects made with Maven, but not with the NetBeans archetype. They are pretty fine; but opening the "Branding..." dialog in the Branding module I get broken dialogs:

1. Basic: the application title and the icons can't be seen (but they are set and I can see them when I run the application)
2. SplashScreen: all settings are zero, or black, and I can't see the splash screen.
3. Window System: all options are unchecked, I can change their values, but they don't persist.
4. Resource bundlers: the tree of resource bundles is empty.

Opening the very same project with NetBeans 7.0.1, everything works. This is the last working IDE version; I recall seeing the problem with NetBeans 7.1 and it's still there with 7.2.

A simple example project that can be used to reproduce the bug is SolidBlue:

http://bitbucket.org/tidalwave/solidblue-src

Please use the tag 1.0-ALPHA-8 which is stable (I'm working on the trunk in these days).
Comment 1 Milos Kleint 2012-09-19 07:14:14 UTC
initial evaluation:

1. there's some shaky way of finding the netbeans platform/application project for maven project type. in ant there's direct links, and done in the application suite, however in maven it's 2 projects and the branding project somehow has to find the application project to learn what the platform is composed from. The current algorithm is "iterate open projects, and if it's an nbm-application project and contains the groupId+artifactId coordinates of the branding project as dependency, use it. If there's more than one such application, do nothing"

2. The difference between your application project and the default one generated by the IDE, is that you are using "jar" dependencies for platform module jars, but the standard one is using "nbm-file" via the platform cluster pom dependency. When debugging, I've noticed that the list of platform jars doesn't get populated at all then effectively creating an empty platform. And it's all caused by o.a.maven.Artifact.isRelease() check, that supposedly should skip just snapshot dependencies (thought to be your modules) but it skips all dependencies. Apparently something has changed in maven internals. The isRelease() method is not computed, but somehow set during maven processing, more investigation needed here.

The workaround for now is obvious, use nbm-file style dependencies. The recommended way is to depend on the platform cluster pom and exclude modules you don't want.
Comment 2 Milos Kleint 2012-09-19 09:54:22 UTC
http://hg.netbeans.org/core-main/rev/d83e26850df8

attempts to fix or at least report both the missing application project and .isRelease() check. it's also a bit more resistant to failures in downloading of application project's dependencies (if not downloaded before)
Comment 3 fabriziogiudici 2012-09-19 19:43:27 UTC
Thank you very much. I'll try as soon as possible.
Comment 4 Quality Engineering 2012-09-21 02:27:29 UTC
Integrated into 'main-golden', will be available in build *201209210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d83e26850df8
User: Milos Kleint <mkleint@netbeans.org>
Log: #218488 make sure we report error condition when platformjarProvider fails to find the application project. stop using Artifact.isRelease() but use !isSnapshot() instead and  when dowloading of jars fails still return at least partial result.
Comment 5 fabriziogiudici 2012-09-21 16:42:07 UTC
Verified and it works perfectly :-) It also fixes other problems: for instance, the mode drop down of the dialog for creating a new TopComponent was not populated, and also the XML Layer / XML Layer in view nodes weren't working. Now they are ok. 

Thanks.