Skip to content

Commit

Permalink
Fixes IOException in jar -x on shadow jars
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Adrian Cole committed Jan 4, 2016
1 parent 35952e8 commit ea7d4c4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions zipkin-collector-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jar.manifest.attributes 'Main-Class': mainClassName
tasks.build.dependsOn(shadowJar)
artifacts.zipkinUpload shadowJar

shadowJar {
exclude 'META-INF/LICENSE' // jackson's META-INF/LICENSE conflicts with the directory META-INF/license
}

dependencies {
compile "com.twitter:finagle-ostrich4_${scalaInterfaceVersion}:${commonVersions.finagle}"
compile "com.twitter:finagle-thriftmux_${scalaInterfaceVersion}:${commonVersions.finagle}"
Expand Down
4 changes: 4 additions & 0 deletions zipkin-query-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jar.manifest.attributes 'Main-Class': mainClassName
tasks.build.dependsOn(shadowJar)
artifacts.zipkinUpload shadowJar

shadowJar {
exclude 'META-INF/LICENSE' // jackson's META-INF/LICENSE conflicts with the directory META-INF/license
}

dependencies {
compile "com.twitter:finagle-ostrich4_${scalaInterfaceVersion}:${commonVersions.finagle}"
compile "com.twitter:finagle-zipkin_${scalaInterfaceVersion}:${commonVersions.finagle}"
Expand Down
4 changes: 4 additions & 0 deletions zipkin-web/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ jar.manifest.attributes 'Main-Class': mainClassName
tasks.build.dependsOn(shadowJar)
artifacts.zipkinUpload shadowJar

shadowJar {
exclude 'META-INF/LICENSE' // jackson's META-INF/LICENSE conflicts with the directory META-INF/license
}

dependencies {
compile project(':zipkin-common')
compile "com.twitter:twitter-server_${scalaInterfaceVersion}:${commonVersions.twitterServer}"
Expand Down

0 comments on commit ea7d4c4

Please sign in to comment.