I try to resolve issue, which I've posted in this topic
with this solution
I try to create a shaded-jar with 'shaded-plugin' from Maven. But I've stuck with problem to load this shaded jar to another project. This 'jar' is a non-executable library for using somewere... I simply add this jar to the external libraries in separate project(using IDEA) and everything looks fine until I run the application.
It throws 'ClassNotFoundException: Test' (Test - is my only one class in this project and it has main method). I want to mention, that when I use 'assembly plugin' and make jar-with-dependencies everything works fine, without any exceptions.
What have I missed?
Full stacktrace:
Exception in thread "main" java.lang.ClassNotFoundException: Test
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:259)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:116)