Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[leshan-dev] [Bug 483250] leshan-core doesn't export all required packages (osgi related)

https://bugs.eclipse.org/bugs/show_bug.cgi?id=483250
Product/Component: Leshan / General

--- Comment #2 from Valentin Valchev <v.valchev@xxxxxxxxxx> ---
(In reply to Kai Hudalla from comment #1)
> (In reply to Valentin Valchev from comment #0)
> Thanks for raising the issue, Valentin :-)
> I have to admit that OSGi support in leshan is not as well maintained
> currently as it should be-. That said, would you be willing to submit a PR
> fixing the issue? 
What is 'PR'? Patch Request? And how? 
Can I attach a patch?

> Or even better implementing a test case that illustrates
> teh problem along with the fix?
The test case would much more complex that performing the manual test.
Everybody has an OSGi framework, Eclipse itself has Console -> Host OSGi
Console, where you can use the following commands:

install -start
http://central.maven.org/maven2/org/eclipse/leshan/leshan-core/0.1.11-M6/leshan-core-0.1.11-M6.jar
install -start
http://central.maven.org/maven2/org/eclipse/leshan/leshan-server-core/0.1.11-M6/leshan-server-core-0.1.11-M6.jar


> 
> > Using <Export-Package> means, that most of the time you add a new package,
> > it should be mentioned there. However there is a more general way and it is
> > to replace  <Export-Package> with the following line:
> > <_exportcontents>*</_exportcontents>
> > 
> > It will export ALL packages from the current bundle (not including the
> > dependencies).
> 
> However, this also means that (potentially) private implementation packages
> are exposed to clients, doesn't it?
Correct! It's designed to be used as a library, and I guessed that all packages
must be exported. As far as I remember, the Eclipse convention was, that the
packages containing "internal* are not exported. Some other people use "impl"
for the implementation. So probably it's much safer to replace <Export-Package>
clause with:
<_exportcontents>!*.impl.*, !*.internal.*, *</_exportcontents>


> 
> Regards,
> Kai

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


Back to the top