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 208410 - maven.osgi.ForeignClassBundlerImpl too simplistic
Summary: maven.osgi.ForeignClassBundlerImpl too simplistic
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven OSGi bundles (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks: 179521 209365
  Show dependency tree
 
Reported: 2012-02-14 16:52 UTC by Jesse Glick
Modified: 2012-09-03 10:05 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
More complete Matcher implementation (14.92 KB, application/x-gzip)
2012-08-01 10:16 UTC, folarte
Details
Patch version of Matcher (13.09 KB, patch)
2012-08-01 11:15 UTC, folarte
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2012-02-14 16:52:48 UTC
Could try to be more clever and inspect Export-Package, Private-Package, and Embed-Dependency config to see if the bundle is really including classes from other bundles or not.
Comment 1 Jesse Glick 2012-03-14 19:47:21 UTC
*** Bug 209365 has been marked as a duplicate of this bug. ***
Comment 2 Milos Kleint 2012-07-27 09:37:38 UTC
http://www.aqute.biz/Bnd/Format gives detailed info on what values can be in the Export-Package, Private-Package instructions

http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html
Comment 3 Milos Kleint 2012-07-27 12:44:04 UTC
http://hg.netbeans.org/core-main/rev/392d08934049

I didn't really understand Embed-Dependency but I assume it doesn't hurt us as the  dependency ends up as jar inside jar.

A bit simplistic resolution of Export-Package and Private-Package instructions, no directives taken into account.

When sources are not preferred, we show a warning problem describing the issue.
Comment 4 Jesse Glick 2012-07-27 14:50:37 UTC
Alternate API would be for FCB (or FCB2) to return ProblemReport|null, so that the impl does not need to explicitly manage attaching and detaching the report - this would be handled by infrastructure.

That of course assumes that you want to enforce that every case of !preferSources produces a warning. Or you could return a Pair<Boolean,ProblemReport|null> which allows the impl to decide whether or not to warn about the condition.
Comment 5 Quality Engineering 2012-07-28 02:22:37 UTC
Integrated into 'main-golden', will be available in build *201207280002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/392d08934049
User: Milos Kleint <mkleint@netbeans.org>
Log: #209365, #208410 more detailed decision logic to decide if a bundle project is bundling dependencies in final jar in local repository or not. based on content of Export-Package and Private-Package instructions in maven bundle plugin.
also have a problem item shown when sources are not preferred.
Comment 6 folarte 2012-08-01 10:16:28 UTC
Created attachment 122624 [details]
More complete Matcher implementation

Matcher implementation in changeset  http://hg.netbeans.org/main-golden/rev/392d08934049 was too simple, and didn't correctly match some cases.

Developed an alternate, more complete on after talking with mkleint. 

This is an small standalone project used to develop the code, and include some timing test to insure viability. Integration with main tree to generate a patch is in progress.
Comment 7 folarte 2012-08-01 11:15:11 UTC
Created attachment 122630 [details]
Patch version of Matcher

More complete Matcher implementation - patch version. 

Patch over checked out sources from hg.netbeans.org/main of previous attachment, without the timing test case.
Comment 8 Milos Kleint 2012-08-01 11:56:20 UTC
reopening.
can only apply once the contributor agreement is processed.
Comment 9 Milos Kleint 2012-08-14 13:02:38 UTC
applied patch by folarte:
https://hg.netbeans.org/core-main/rev/b8875d941279
Comment 10 Quality Engineering 2012-08-15 01:40:02 UTC
Integrated into 'main-golden', will be available in build *201208150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b8875d941279
User: Francisco Olarte <folarte@netbeans.org>
Log: #208410 improved handling of various export+private package entries
Comment 12 Quality Engineering 2012-09-01 11:05:56 UTC
Integrated into 'releases', will be available in build *201209010822* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/09f2b7147315
User: Milos Kleint <mkleint@netbeans.org>
Log: #209365, #208410 merge into release72 branch