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 #3 from Kai Hudalla <kai.hudalla@xxxxxxxxxxxx> ---
(In reply to Valentin Valchev from comment #2)
> What is 'PR'? Patch Request? And how? 
> Can I attach a patch?
Sorry, "PR" stands for a GitHub "Pull Request" which is the preferred way of
contribution since it makes it very easy to discuss the proposed changes and
finally merging the code.

> 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

This might be true if I only want to test once. However, we need to be able to
run the test suite with every build on our continuous integration system.
Therefore, if we do not have an automatic test, we have no test at all.
BTW the fact that it's not as easy to test OSGi bundles is one of the reasons
why we are interested in finding a maintainer who has a genuine interest in
OSGi support ;-)


> > 
> > > 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>

I see, that makes sense.

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


Back to the top