Skip to content

Commit ea7d4c4

Browse files
author
Adrian Cole
committed
Fixes IOException in jar -x on shadow jars
The shadowJar plugin makes a single file out of all the dependencies of our services. Occasionally, this leads to file conflicts. Jackson's META-INF/LICENSE conflicts with the directory META-INF/license While we can run the shadowJars, you cannot extract them with `jar -x`, as it ends up with an IOException extracting META-INF/license. This excludes Jackson's META-INF/LICENSE, until we have a better solution, ideally with one of the proposals in the shadow jar project. See GradleUp/shadow#86 See GradleUp/shadow#102
1 parent 35952e8 commit ea7d4c4

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

zipkin-collector-service/build.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ jar.manifest.attributes 'Main-Class': mainClassName
1515
tasks.build.dependsOn(shadowJar)
1616
artifacts.zipkinUpload shadowJar
1717

18+
shadowJar {
19+
exclude 'META-INF/LICENSE' // jackson's META-INF/LICENSE conflicts with the directory META-INF/license
20+
}
21+
1822
dependencies {
1923
compile "com.twitter:finagle-ostrich4_${scalaInterfaceVersion}:${commonVersions.finagle}"
2024
compile "com.twitter:finagle-thriftmux_${scalaInterfaceVersion}:${commonVersions.finagle}"

zipkin-query-service/build.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ jar.manifest.attributes 'Main-Class': mainClassName
1515
tasks.build.dependsOn(shadowJar)
1616
artifacts.zipkinUpload shadowJar
1717

18+
shadowJar {
19+
exclude 'META-INF/LICENSE' // jackson's META-INF/LICENSE conflicts with the directory META-INF/license
20+
}
21+
1822
dependencies {
1923
compile "com.twitter:finagle-ostrich4_${scalaInterfaceVersion}:${commonVersions.finagle}"
2024
compile "com.twitter:finagle-zipkin_${scalaInterfaceVersion}:${commonVersions.finagle}"

zipkin-web/build.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ jar.manifest.attributes 'Main-Class': mainClassName
1212
tasks.build.dependsOn(shadowJar)
1313
artifacts.zipkinUpload shadowJar
1414

15+
shadowJar {
16+
exclude 'META-INF/LICENSE' // jackson's META-INF/LICENSE conflicts with the directory META-INF/license
17+
}
18+
1519
dependencies {
1620
compile project(':zipkin-common')
1721
compile "com.twitter:twitter-server_${scalaInterfaceVersion}:${commonVersions.twitterServer}"

0 commit comments

Comments
 (0)