[英]Gradle archive contains more than 65535 entries
我正在集成 hadoop2.5.0 以運行 mapreduce 作業和 spring-boot-1.2.7 版本並在包含此內容時出錯
1) 檔案包含超過 65535 個條目。
我的 gradle jar 依賴
jar{
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
2) 在 jar 中包含 zip64
jar{
zip64=true
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
我收到無效或損壞的文件
3)在添加 shadowJar 時出現錯誤
shadowJar{
zip64=true
}
無法在 org.springframework.boot.loader.ExecutableArchiveLauncher 讀取字節
我應該如何從所有依賴項中制作一個 jar。
這個問題已經在評論中回答了,這里是提問者自己提供的相關部分:
非常感謝使用http: //stackoverflow.com/questions/10405970/... 和http://github.com/spring-projects/spring-boot/issues/1310解決了這個問題,我添加了 hbase 和 hadoop 作為提供。我刪除了來自 jar 的 zip64{}
快速瀏覽一下,SO 答案中的關鍵部分是:
目前最好的解決方案是聲明您自己
provided
配置,它將包含僅編譯依賴項並添加到您的編譯類路徑
github 似乎與此重疊,加上關鍵細節:
我在所有子項目的 jar 任務中添加了以下內容,並讓我的 jars 幸免於難。
bootRepackage.enabled = false
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.