phxql / argon2-jvm

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

2.9's Split into Two Modules Breaks JPMS Usage #80

Closed A248 closed 3 years ago

A248 commented 3 years ago

Version 2.9 seems to have introduced an issue when using Argon2 in a modular project. This causes compilation of a dependent project to fail, where the dependent project uses module-info.

The problem is that there are 2 artifacts with de.mkammerer.argon2 as a module name.

My IDE notes 'ambiguous module name' for de.mkammerer.argon2. Based on the argon2-jvm build setup with gradle, I suspected both the argon2-jvm and argon2-jvm-nolibs had the same module name. Indeed, opening up the MANIFEST.MF in both jars shows the Automatic-Module-Name is the same.

The only workaround is to downgrade to 2.8. Trying to exclude argon2-jvm-nolibs as a workaround does not work because the packages cannot be found in that case.

phxql commented 3 years ago

Thanks for finding that. I'll fix it in 2.10 by setting the Automatic-Module-Name to something different in the -nolibs version.

phxql commented 3 years ago

Just released 2.9.1, which fixes this issue.

1tchy commented 3 years ago

Unfortunately, this is still not fixed. Because - in de.mkammerer.argon2-nolibs is not a valid character in a module name.

But by the way: Thanks for maintaing this repository!

phxql commented 3 years ago

Thanks for letting me know, i'll fix that.

phxql commented 3 years ago

It's now de.mkammerer.argon2.nolibs - and i have tested it with a modularized runner :) The next released version will contain the fix.

phxql commented 3 years ago

Fix is released in >= 2.10.