Reputation: 7833
I am integrating hadoop2.5.0 for running mapreduce job and spring-boot-1.2.7 release and getting error while including this
My gradle jar dependency
jar {
from configurations.compile.collect {
it.isDirectory() ? it : zipTree(it)
}
jar {
zip64=true
from configurations.compile.collect {
it.isDirectory() ? it : zipTree(it)
}
On adding shadowJar
shadowJar { zip64=true }
I am getting error
Unable to read bytes
at org.springframework.boot.loader.ExecutableArchiveLauncher
How should I make one jar out of all dependencies.
Upvotes: 25
Views: 20663
Reputation: 21563
This question was already answered in the comments, here is the relevant piece as provided by the asker themselves:
Thanks a lot solved the problem using http://stackoverflow.com/questions/10405970/… and http://github.com/spring-projects/spring-boot/issues/1310 I added hbase and hadoop as provided.I removed zip64 from jar{}
A quick glance suggests the key part from the SO answer is:
currently the best solution is to declare your own
provided
configuration, that will included compile-only dependencies and add to to your compile classpath
The github seems to overlap with this, plus the key detail:
I added the following in my jar task of all the sub projects and got my jars spared.
bootRepackage.enabled = false
Upvotes: 0