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.
A custom platform created with the create-platform ANT target doesn't work with the Suite Customizer. When you select a cluster in libraries, close and reopen the properties panel, it will be deselected again. Steps to reproduce: Create a new NetBeans Platform Application "suite1". Go to important files, right-click build.xml, invoke ANT-target "create-platform". Create a second NetBeans Platform Application "suite2". Go to properties -> Libraries, manage platforms -> add platform. Add the platform created with the create-platform ANT target and close. Back in te suites properties choose the suite1 platform from the dropdown list. Select platform10 Close and reopen the Suites properties: Expected behaviour: platform10 should be selected Observed behaviour: platform10 is deselected When you create a module in your suite, you cannot set deopendencies on modules from platform10 As a result it's impossible to do any development when using a custom platform
It's getting weird: When you've reopened the SuiteCustomizerLibraries Panel as I described, so the cluster platform10 is deselected and close by clicking OK, cluster.path in platform.properties is empty as expected. But the platform modules are then available for dependency management in modules of the suite, while a clean and build fails with this: /Users/antonepple/Desktop/ElsterPlatform/suite4/nbproject/build-impl.xml:34: Path to 'platform' cluster missing in ${cluster.path} property or using corrupt Netbeans Platform (missing harness). So I can either have the settings correct for the build, or for the development...
Ok, couple of questions: 1) What version of IDE do you use? 2) What is the version of the base platform (the one suite1 is built against)? 3) What is the harness setting for both suites (base suite and your custom suite) in NB Platform Manager? I mean "Harness bundled with IDE" vs. "Harness bundled with Platform" on Harness tab.
1) What version of IDE do you use? Standard 6.7: Product Version: NetBeans IDE 6.7 (Build 200906241340) Java: 1.6.0_13; Java HotSpot(TM) 64-Bit Server VM 11.3-b02-83 System: Mac OS X version 10.5.7 running on x86_64; MacRoman; de_DE (nb) Userdir: /Users/antonepple/.netbeans/6.7 This issue has originally been reported by me from someone else who has got the same problem using 6.7 on windows. They've downloaded 6.7 last friday. I've reproduced it on my mac. 2) What is the version of the base platform (the one suite1 is built against)? It's the IDE, so Product Version: NetBeans IDE 6.7 (Build 200906241340) as well 3) What is the harness setting for both suites (base suite and your custom suite) in NB Platform Manager? I mean "Harness bundled with IDE" vs. "Harness bundled with Platform" on Harness tab. Harness supplied with IDE for both
I found the root cause. It's the FileOwnerQuery in ClusterUtils evaluateClusterPath method which will return a project, when the platform directory is located inside a project: prj = FileOwnerQuery.getOwner(fo); then the clusterPath ClusterInfo is created via ClusterInfo with a Project that is not null: createFromCP(File evaluatedPath, Project prj, boolean isPlatformCluster, URL[] sourceRoots, URL[] javadocRoots, boolean enabled) The node ClusterInfo is created with: create(File clusterDir, boolean isPlatformCluster, boolean enabled) Later in SuiteCustomizerLibraries both are compared via their hash codes, which are different, because in one case the project wasn't null: if (!clusterPath.contains(node.getClusterInfo())) // must not call setEnabled(true), disabled modules would be enabled { node.setEnabled(false); } When using the IDEs platform, the createFromCP is called with project being null. therefore it works. Workaround: After performing create_platform task move your platform outside of the dist directory and place it somewhere else (not inside a project).
Reproducible, I'll fix that. However if you use 6.7 harness, why bother with creating custom platform? Just use default platform in suite2 and add suite1 in Properties -> Libraries -> Add Project... Target create-platform should probably be deprecated now (well, at least partially :)).
You're right, with 6.7 there are nicer ways for adding a cluster or a project... Thanks for taking care of this Richard! -- Toni
> I found the root cause. Thanks! So you've really dived into apisupport sources, congratulations :).
> Target create-platform should probably be deprecated now (well, at least partially :)). Having a binary platform still has some advantages. I like to have a shared binary platform in cvs. It's great for working in a team. Everyone has the same platform regardless what IDE he has. With adding clusters or projects that's not possible.
> With adding clusters or projects that's not possible. You can just put suite1 (i.e. the suite that you'd invoke create-platform on) at the location where you'd put your binary platform. Pros: No need to have 2 separate repos, no need to update binary platform each time suite1 sources change. Cons: You have to either manually build suite1 or create custom build.xml that builds your suites in correct order (and when needed) But I admit there may be some use cases. That's why I wrote "partially". Fixed in core-main #702f7688d05d
Integrated into 'main-golden', will be available in build *200907250201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/702f7688d05d User: Richard Michalsky <rmichalsky@netbeans.org> Log: #168804: fixing custom platform badly handled by suite customizer + note on cluster.path
*** Issue 172014 has been marked as a duplicate of this issue. ***
*** Issue 173493 has been marked as a duplicate of this issue. ***
Duplicate was reproducible and marked P2.