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 247837 - Ant build of RCP applications includes disabled modules in generated application
Summary: Ant build of RCP applications includes disabled modules in generated application
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 8.0.1
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-09 15:16 UTC by stevenyi
Modified: 2014-11-21 03:50 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Test project demonstrating Eclipse modules being used in generated application, even when disabled (7.55 KB, application/zip)
2014-10-09 15:16 UTC, stevenyi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stevenyi 2014-10-09 15:16:14 UTC
Created attachment 149818 [details]
Test project demonstrating Eclipse modules being used in generated application, even when disabled

This bug is filed in reference to a message thread on the Platform dev mailing list:

https://netbeans.org/projects/platform/lists/dev/archive/2014-10/message/56

Using Netbeans 8.0.1 and building an RCP application, eclipse modules related to OSGi that are marked as disabled.modules within the platform.properties are still being included with the generated application.  This happens whether the developer has disabled OSGi integration in their application or not.  It appears that the build scripts for OSGi modules included with the Netbeans harness may not be properly respecting disabled.modules, as mentioned here:

https://netbeans.org/projects/platform/lists/dev/archive/2014-10/message/58

The TestEclipse.zip project attached here is the one posted on that thread by Neil Smith. The application has OSGi integration enabled, but has eclipse related modules disabled within the project.properties.  If you run the application, the eclipse modules are shown in the log to be loaded by Netigso.  If you generate the application as a Zip, then unpack the zip, you will see the eclipse-related jars have been packaged with the application in the ide/modules folder.
Comment 1 NeilCSmith 2014-10-09 15:43:22 UTC
I did have a look at this when I first created the test project, and I *think* it's caused by the code here -

http://hg.netbeans.org/main/file/05a0ffb66c2a/nbbuild/antsrc/org/netbeans/nbbuild/ModuleSelector.java#l113

which doesn't handle the directive part of Bundle-SymbolicName - eg. with 

Bundle-SymbolicName: org.eclipse.core.jobs; singleton:=true

it needs to only use the bit before the semi-colon to compare with.

I assume the fix is to do something similar with semi-colons as the existing support for slash at

http://hg.netbeans.org/main/file/05a0ffb66c2a/nbbuild/antsrc/org/netbeans/nbbuild/ModuleSelector.java#l155
Comment 2 Jaroslav Tulach 2014-10-10 15:45:18 UTC
Thanks for the investigation. Yes, the semicolon is a usual problem in many places, as we originally did not count with that.
Comment 3 Jaroslav Tulach 2014-11-14 12:36:13 UTC
https://hg.netbeans.org/ergonomics/rev/0e19bf034e14
Comment 4 Quality Engineering 2014-11-21 03:50:38 UTC
Integrated into 'main-silver', will be available in build *201411210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/0e19bf034e14
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #247837: Remove part after semicolon from bundle name