terl / lazysodium-java

A Java implementation of the Libsodium crypto library. For the lazy dev.
https://github.com/terl/lazysodium-java/wiki
Mozilla Public License 2.0
134 stars 46 forks source link

Problems with resolving resource-loader dependency through OSGI #105

Open fapdash opened 3 years ago

fapdash commented 3 years ago

Issue description

We are trying to use lazysodium-java 5.0.1 in an Eclipse project through m2e, but lazysodium can't find the resource-loader bundle. Even if I require all of lazysodiums dependencies explicitly. I think the problem is that lazysodium is looking for a bundle called com.goterl.resourceloader but https://github.com/terl/resource-loader gets bundled as resource-loader.

Build error

Error:  Cannot resolve project dependencies:
Error:    Software being installed: de.empri.devops.gitprivacy 1.0.0.qualifier
Error:    Missing requirement: lazysodium-java 5.0.1 requires 'java.package; com.goterl.resourceloader 0.0.0' but it could not be found
Error:    Cannot satisfy dependency: de.empri.devops.gitprivacy 1.0.0.qualifier depends on: osgi.bundle; lazysodium-java 5.0.1

resource-loader manifest

Manifest-Version: 1.0
Bnd-LastModified: 1617569345955
Bundle-ManifestVersion: 2
Bundle-Name: resource-loader <--
Bundle-SymbolicName: resource-loader <--
...

lazysodium manifest

Manifest-Version: 1.0
Bnd-LastModified: 1617619797249
Bundle-ManifestVersion: 2
Bundle-Name: lazysodium-java
Bundle-SymbolicName: lazysodium-java
Bundle-Version: 5.0.1
Created-By: 1.8.0_172 (Oracle Corporation)
Import-Package: com.goterl.resourceloader,com.sun.jna;version="[5.8,6) <--
 ",com.sun.jna.ptr;version="[5.8,6)",javax.crypto,org.slf4j;version="[
 1.7,2)"

Might be related to https://github.com/terl/lazysodium-java/issues/102?

fapdash commented 3 years ago

You can see our configuration here: https://github.com/vogellacompany/egit-privacy/commit/c68356ea0683fbdf59e76858c6856642e9e0cfac

gurpreet- commented 3 years ago

Hi @fapdash,

Thank you for the query. Yes this is related to https://github.com/terl/lazysodium-java/issues/102. I've had to upgrade the Gradle version which sadly meant OSGI has been deprecated and we need to replace it with Bnd. I still haven't had time to investigate how much work this is as of yet but it urgently needs to be done as version 5+ of Lazysodium is on MavenCentral.