1

我正在尝试使用eu.appsatori.fatjar插件创建一个 fatJar。

出于某种原因,我不断收到此错误:

Caused by: org.gradle.api.GradleException: Could not expand ZIP '/Users/xxx/.gradle/caches/modules-2/files-2.1/org.apache.storm/storm-core/0.10.0/59bc38e472630eecfe41fec4bd3cc346626a3f24/storm-core-0.10.0.jar'.

Caused by: org.gradle.api.GradleException: Could not copy zip entry /Users/xxx/.gradle/caches/modules-2/files-2.1/org.apache.storm/storm-core/0.10.0/59bc38e472630eecfe41fec4bd3cc346626a3f24/storm-core-0.10.0.jar!META-INF/license/ to '/Users/xxx/path/projectName/build/tmp/expandedArchives/storm-core-0.10.0.jar_awree5slcpd7gxsjwz6rwpmop/META-INF/license'.

Caused by: org.gradle.api.UncheckedIOException: Cannot create directory '/Users/xxx/path/projectName/build/tmp/expandedArchives/storm-core-0.10.0.jar_awree5slcpd7gxsjwz6rwpmop/META-INF/license' as it already exists, but is not a directory

我已经在我的 gradle 文件中排除了一堆东西:

fatJar {
  zip64 true
  exclude 'META-INF/license/LICENSE.*.txt'
    exclude 'META-INF/*.SF'
    exclude 'META-INF/*.DSA'
    exclude 'META-INF/*.SHA256'
    exclude 'META-INF/*.RSA'
    exclude 'META-INF/*.EC'
    exclude 'META-INF/**'
    exclude 'META-INF/LICENSE'
  exclude '*META-INF/license'
  exclude 'storm-core-0.10.0.jar!META-INF/license'
}
fatJarPrepareFiles {
  exclude 'META-INF/license/LICENSE.*.txt'
  exclude 'META-INF/*.SF'
  exclude 'META-INF/*.DSA'
  exclude 'META-INF/*.SHA256'
  exclude 'META-INF/*.RSA'
  exclude 'META-INF/*.EC'
  exclude 'META-INF/**'
  exclude 'META-INF/LICENSE'
  exclude '*META-INF/license'
  exclude 'storm-core-0.10.0.jar!META-INF/license'
}

但它仍然无法正常工作,有谁知道什么可以解决这个错误?

4

0 回答 0