You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[feature request] Support packaging as an OSGi bundle #15
As I do not use OSGi I'm not fully comfortable maintaining it. How does this work? Does it create a new OSGi compatible jar? Is it the same jar? Is there no easy way to wrap jars to make them OSGi compatible (outside of this project)?
Yes, it creates an OSGi compatible jar and it's the same jar. The jar should be exactly the same as before, other than additions to META-INF/MANIFEST.MF. It is easy to wrap jars; however, this makes them much harder to use: can't simply add the dependency to a project's pom.xml.
Looks like at.favre.lib:bcrypt is perfect. I was able to build and install the bcrypt-feat-15-osgi modules using Maven, and then to deploy and depend upon the bcrypt module as an OSGi bundle.
But it's only partly working as there is a dependency on at.favre.lib:bytes, which is not currently OSGi compatible. Without at.favre.lib:bytes also being an OSGi bundle it doesn't work at runtime.
Hi, I've released a new bytes version with also OSGi support. For now the support is added, but I can't guarantee it for the lifetime of this project as the requirement that every transitive dependency must ALSO be OSGi compatible makes it quite restricting.
I'm soon releasing 0.8.0 - please leave me a line to tell me if the lib now works with your project.
Activity
patrickfav commentedon Apr 4, 2019
Hi,
As I do not use OSGi I'm not fully comfortable maintaining it. How does this work? Does it create a new OSGi compatible jar? Is it the same jar? Is there no easy way to wrap jars to make them OSGi compatible (outside of this project)?
Andrew-Cottrell commentedon Apr 11, 2019
Hi patrickfav
Yes, it creates an OSGi compatible jar and it's the same jar. The jar should be exactly the same as before, other than additions to
META-INF/MANIFEST.MF. It is easy to wrap jars; however, this makes them much harder to use: can't simply add the dependency to a project'spom.xml.FYI, another BCrypt implementation does this
https://github.com/svenkubiak/jBCrypt/commit/89da34b2f779d4d51ff84fdb869273ec8c244de9
https://github.com/svenkubiak/jBCrypt/blob/0.4.1/pom.xml
https://mvnrepository.com/artifact/de.svenkubiak/jBCrypt/0.4.1
patrickfav commentedon Apr 11, 2019
Alright, let me look into this, if the change is transparent for anybody that does not use OSGi then thats fine for me.
Andrew-Cottrell commentedon Apr 11, 2019
Yes, the change should be transparent for non-OSGi uses. Thanks for looking in to this.
Add bundle plugin to support OSGi
patrickfav commentedon Apr 12, 2019
Hi,
I've pushed the changes to this feature branch: https://github.com/patrickfav/bcrypt/tree/feat-15-osgi
Could you please checkout, in the root directory run
to install the snapshot version into your local repo and change your dependency to
and give me feedback if that works? I have no osgi project to test it on (and to be frank never used it before) :)
Cheers!
Andrew-Cottrell commentedon Apr 15, 2019
Hi
Looks like
at.favre.lib:bcryptis perfect. I was able to build and install thebcrypt-feat-15-osgimodules using Maven, and then to deploy and depend upon thebcryptmodule as an OSGi bundle.But it's only partly working as there is a dependency on
at.favre.lib:bytes, which is not currently OSGi compatible. Withoutat.favre.lib:bytesalso being an OSGi bundle it doesn't work at runtime.Cheers!
Andrew-Cottrell commentedon Apr 15, 2019
(sorry, didn't mean to close)
patrickfav commentedon Apr 15, 2019
Hi, I've released a new bytes version with also OSGi support. For now the support is added, but I can't guarantee it for the lifetime of this project as the requirement that every transitive dependency must ALSO be OSGi compatible makes it quite restricting.
I'm soon releasing 0.8.0 - please leave me a line to tell me if the lib now works with your project.
patrickfav commentedon Apr 16, 2019
Released.
Andrew-Cottrell commentedon Apr 24, 2019
BCrypt 0.8.0 (and Bytes 1.1.0) works great with my projects. Thanks for adding OSGi support.