I have been working with OSGi for a while now, but I still don't understand something about private packages.
Aren't all bundle packages which are not exported invisible to all other packages? If so, what's the difference to private packages and packages which are not exported?
I've read OSGi in Action and "OSGi and Apache Felix 3.0 - Beginners Guide", but i was not able to find the difference.
1): Packages that are not exported or imported are called private packages.
With npm private packages, you can use the npm registry to host code that is only visible to you and chosen collaborators, allowing you to manage and use private code alongside public code in your projects. Private packages always have a scope, and scoped packages are private by default.
private. If you set "private": true in your package. json, then npm will refuse to publish it. This is a way to prevent accidental publication of private repositories. Follow this answer to receive notifications.
If you need to control access to the package, you should click the + button under collaborators. And then add the appropriate username, and then click submit. If you want to install a private package, you need to have access to the package. Then you can make use of install with the scoped package name.
There is no difference.
Any package which is not listed in Export-Package
is private.... that's all there is to it.
You may have seen another header called Private-Package
. This is NOT an OSGi header and it is completely ignored by the OSGi Framework. If you see this it indicates that a bundle has been built with bnd or the Maven Bundle Plugin, which uses this header has a build-time instruction. It's therefore only relevant at build time, and has no effect whatsoever at run time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With