Maven shade and assembly plugins first unpack and then add dependencies to the executable jar. This can produce a conflict with Java Cryptography Extension, since the libraries like BouncyCastle should be used in their signed versions.
Question: Is there a way to create executable jar with maven in a way that the libraries are included without unpacking?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The standard classloader will not load classes from another jar, hence the exploded jar. The best way to achieve adding the signed jars is using the -cp command, something like :
java -cp signedjar;shadepluginjar Main