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.
In NetBeans module project producing an OSGi bundle, it is not possible to have a dependency on an OSGi bundle containing '-' char in the name. It correctly appears in project.xml, but in the built JAR's manifest (in Require-Bundle section) the dash is substituted with underscore char (e.g. oracle.javatools_nodeps instead of oracle.javatools-nodeps), which then cannot be resolved at runtime. In a native NetBeans module, the substituted underscore is somewhat handled by the module system and it works in the end. In OSGi bundle this does not work. A possible workaround is to avoid a dependency on the bundle all together but specify individual packages using Import-Package directly in the manifest.mf of the project. Not sure if this should be somewhat handled by Netigso at runtime, or the manifest generation should be fixed.
The conversion of the dependency (from '-' to '_') should not happen when generating entries into manifest in OSGi mode, I guess.
What is the symbolic name of the dependency in this case? Is there is a small test case to look at?
OK, so the dependency has Bundle-SymbolicName: oracle.javatools-nodeps meaning that whatever creates Require-Bundle from project.xml indeed needs to leave the symbolic name untouched (beyond removing attributes after a semicolon).
ergonomics#0b9154a59a3b
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/0b9154a59a3b User: Jaroslav Tulach <jtulach@netbeans.org> Log: #205537: Search for bundle variant with '-' if the '_' one is not found