'Gradle archive contains more than 65535 entries

I am integrating hadoop2.5.0 for running mapreduce job and spring-boot-1.2.7 release and getting error while including this
1) archive contains more than 65535 entries.

My gradle jar dependency

jar{
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }

2) On including zip64 in jar

  jar{
    zip64=true
    from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }

I am getting invalid or corrupt file
3)on adding shadowJar I am getting error

shadowJar{
   zip64=true
}

Unable to read bytes at org.springframework.boot.loader.ExecutableArchiveLauncher
How should I make one jar out of all dependencies.



Solution 1:[1]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dennis Jaheruddin