terl / lazysodium-java

A Java implementation of the Libsodium crypto library. For the lazy dev.

Home Page:https://github.com/terl/lazysodium-java/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing resource-loader dependency

dmitry-timofeev opened this issue · comments

resource-loader is neither specified as a project dependency so that it can be fetched by the build system, nor is bundled in the lazysodium-java distribution, leading to a runtime error:

java.lang.NoClassDefFoundError: co/libly/resourceloader/SharedLibraryLoader

Version: 4.2.5

Workaround

It is possible to overcome the problem by specifying an explicit dependency on resource-loader. However, that might eventually result in an incompatible combination of lazysodium and resource-loader versions in the user projects.

You are correct. This is becoming a pain in some of my other projects too.

I had initially encouraged users to add resource-loader from its bintray repository this but enterprise preferred maven central. This is due to them having to add yet another maven repository which for some enterprise companies means more exceptions which means more rigamarole. However, maven central is slow to update which is causing a lot of pain for me as a consumer of my own library

You might be seeing your error because resource loader is loaded as a JAR rather than a gradle dependency in 4.2.5. I had tested this on an empty Java project and it worked, not sure why it isn't for you 🤔

Try release 4.2.6. I think I fixed it.

It works, thank you a lot!

Yes, Maven Central takes quite some time to make the artifacts available :-)

I had tested this on an empty Java project and it worked, not sure why it isn't for you 🤔

Can't say definitely, but it might have been installed locally in your ~/.m2/repository.

Thanks for your help once again! 🙂