Closed magg closed 8 years ago
You can't bundle a cryptographic library. They have to be signed for the JVM to load them, and the signature is destroyed when merged into the shadow jar.
It is possible to do this using the shadow
configuration. I've done this a number of times. Not sure what the error regarding your class is about. I would suspect you'll get that error if you run with a normal JAR and classpath.
Oh I see
how would you run it then?
Somehow the bouncycastle lib is ending up in your shadow jar even though you are declaring in on the shadow
configuration.
It's probably coming in from a transitive dependency. You could try excluding bouncycastle explicitly to se if that helps.
shadowJar {
dependencies {
exclude(dependency('org.bouncycastle:bcprov-jdk15on'))
}
}
Still a bit unclear on if it's possible to make bouncycastle like crypto libs as an external dependency to the fat jar. The convo above seems to be incomplete somehow in this fact ? I tried many different ways of configuring shadow dependencies with no luck. The doco here : https://imperceptiblethoughts.com/shadow/configuration/#configuring-the-runtime-classpath seems to explain exactly what i want but was unable to get it going as the BC dependency always ended up in the final jar.
I think this pretty much impossible, according to my research on google
I get errors when running, saying my own class has unsigned entries - com/oracle/miggonza/host_validation/domain/Resource.class
Shadow Version
1.2.3
Gradle Version
2.14
Gradle Build Script(s)
Content of Shadow JAR (
jar tf <jar file>
- post link to GIST if too long)https://gist.github.com/anonymous/bab20d1c065837897c5dae2632c43576