phxql / argon2-jvm

Argon2 Binding for the JVM
GNU Lesser General Public License v3.0
331 stars 33 forks source link

Add an OSGI manifest #74

Open zspitzer opened 4 years ago

zspitzer commented 4 years ago

Could you add in the OSGI bundle metadata?

http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html

The Lucee project is about to start using this library, but it's OSGI based https://github.com/lucee/Lucee/pull/985

Add support for the Argon2 hashing algorithm https://luceeserver.atlassian.net/browse/LDEV-2883

phxql commented 4 years ago

MANIFEST.MF now looks like this:

Manifest-Version: 1.0
Automatic-Module-Name: de.mkammerer.argon2
Bundle-ManifestVersion: 2
Bundle-SymbolicName: de.mkammerer.argon2
Bundle-Version: 2.8-SNAPSHOT
Export-Package: de.mkammerer.argon2, de.mkammerer.argon2.jna
Import-Package: com.sun.jna

I'm no expert in OSGi, does that look right?

zspitzer commented 4 years ago

me either! @michaeloffner can confirm

this is what the manifest for the wrapped OSGI version of 2.7 looks like

https://github.com/lucee/osgi-bundle-argon2/blob/master/pom.xml

https://mvnrepository.com/artifact/org.lucee/argon2/2.7.0

Manifest-Version: 1.0
Bnd-LastModified: 1595240457342
Build-Jdk: 1.8.0_161
Built-By: mic
Bundle-Description: OSGI version of jar Argon2
Bundle-License: http://www.gnu.org/licenses/lgpl-3.0.txt
Bundle-ManifestVersion: 2
Bundle-Name: org.lucee.argon2
Bundle-SymbolicName: org.lucee.argon2
Bundle-Version: 2.7.0
Created-By: Apache Maven Bundle Plugin
Export-Package: darwin;version="2.7.0",de.mkammerer.argon2;uses:="de.mka
 mmerer.argon2.jna";version="2.7.0",de.mkammerer.argon2.jna;uses:="com.s
 un.jna";version="2.7.0",linux-aarch64;version="2.7.0",linux-arm;version
 ="2.7.0",linux-x86;version="2.7.0",linux-x86-64;version="2.7.0",win32-x
 86;version="2.7.0",win32-x86-64;version="2.7.0"
Import-Package: com.sun.jna,de.mkammerer.argon2.jna
Require-Bundle: com.sun.jna;bundle-version=5.5.0
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.6))"
Tool: Bnd-3.0.0.201509101326
phxql commented 4 years ago

Thanks, I will try to adapt that.

zspitzer commented 3 years ago

is that working or not? the 2.8 release notes say it was, but then I see it's been removed?

https://github.com/phxql/argon2-jvm/commit/ef05f5d53d49f40a2132d2899df415ddb9302d3a https://github.com/phxql/argon2-jvm/commit/1f0717500173c3f65e6f8b06befd0d47e064a375

phxql commented 3 years ago

Oh sorry, I botched the changelog. No, it's not in the 2.8 release, this issue is still open. I'll fix the changelog.