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 179436 - Do not bundle dummy org.osgi.** classes
Summary: Do not bundle dummy org.osgi.** classes
Status: RESOLVED FIXED
Alias: None
Product: connecteddeveloper
Classification: Unclassified
Component: Issuetracking Framework (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on: 179470
Blocks:
  Show dependency tree
 
Reported: 2010-01-12 14:00 UTC by Jesse Glick
Modified: 2010-01-14 23:38 UTC (History)
1 user (show)

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 Jesse Glick 2010-01-12 14:00:32 UTC
I just noticed that libs.bugtracking not only includes skeletons of four OSGi classes, but exports them to friends, apparently to prevent problems such as

jira/src/org/netbeans/modules/jira/Jira.java:69: cannot access org.osgi.framework.BundleContext
class file for org.osgi.framework.BundleContext not found
public class Jira {

(same for Bugzilla).

We should not be bundling incomplete copies of OSGi APIs. A quick fix would be for libs.bugtracking, bugzilla, and jira modules to be friends of core.netigso and use its copy of OSGi APIs.

Better would be to pick up an official copy of the latest OSGi framework skeleton JARs from somewhere (e.g. org.apache.felix:org.osgi.core:* & org.apache.felix:org.osgi.compendium:*), bundle these into a lib wrapper module, and make core.netigso use these as well (in which case it would need to omit org.osgi.** from felix.jar).
Comment 1 Jesse Glick 2010-01-12 14:02:41 UTC
Should solve for 6.9 as part of OSGi compatibility effort.
Comment 2 Jesse Glick 2010-01-12 14:52:50 UTC
http://www.osgi.org/Download/Release4V42 lets you download osgi.core.jar and osgi.cmpn.jar, which is probably the right place to get these, though Felix seems to have copied these sources verbatim into its source repo.
Comment 3 Tomas Stupka 2010-01-13 08:33:03 UTC
http://hg.netbeans.org/cdev/rev/a6c0956f6a74

the org.osgi.* packages are public in core.netigso so removed them from libs.bugtracking and added a new dependency to libs.jira, libs.bugzilla and libs.bugtracking. 

what would be the benefit of splitting felix.jar between a lib and the netigso module?

closing as fixed for now
Comment 4 Jesse Glick 2010-01-13 13:09:42 UTC
(In reply to comment #3)
> added a new dependency to libs.jira, libs.bugzilla and libs.bugtracking.

Probably not going to work until you add these as friends to core.netigso.

> what would be the benefit of splitting felix.jar between a lib and the netigso
> module?

1. It would be clear who is depending simply on OSGi interfaces, rather than Felix container classes.

2. We would not need to have core.netigso in the build unless someone is actually trying to run OSGi bundles.

I filed bug #179470 to track this.
Comment 5 Quality Engineering 2010-01-14 23:38:26 UTC
Integrated into 'main-golden', will be available in build *201001150201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a6c0956f6a74
User: Tomas Stupka <tstupka@netbeans.org>
Log: #179436 -  Do not bundle dummy org.osgi.** classes