From 40fd67c5eea785da962c5ea600aeb65aca5a26da Mon Sep 17 00:00:00 2001 From: Michal Dvorak Date: Fri, 20 Jul 2018 15:43:56 +0200 Subject: [PATCH 1/2] Fixes #494 - removed unwanted classes from jaeger-thrift shadowed jar Moved relocated packages to io.jaegertracing.vendor Excluded lombok and animal-sniffer from shadow plugin in jaeger-thrift Added slf4j as runtime non-relocated dependency Removed unused dependencies from jaeger-crossdock (change suggested by @jpkrohling) Signed-off-by: Michal Dvorak --- jaeger-crossdock/build.gradle | 3 --- jaeger-thrift/build.gradle | 17 ++++++++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/jaeger-crossdock/build.gradle b/jaeger-crossdock/build.gradle index 6dc922ac9..4983576ab 100644 --- a/jaeger-crossdock/build.gradle +++ b/jaeger-crossdock/build.gradle @@ -13,9 +13,6 @@ compileJava { dependencies { compile project(':jaeger-client') - compile group: 'org.apache.thrift', name: 'libthrift', version: apacheThriftVersion - compile group: 'com.squareup.okhttp3', name: 'okhttp', version: okhttpVersion - compile group: 'io.opentracing.contrib', name: 'opentracing-jaxrs2', version: '0.1.4' compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: jacksonVersion compile group: 'org.glassfish.jersey.containers', name: 'jersey-container-grizzly2-http', version: jerseyVersion diff --git a/jaeger-thrift/build.gradle b/jaeger-thrift/build.gradle index 06cb77f96..9d61c3ca3 100644 --- a/jaeger-thrift/build.gradle +++ b/jaeger-thrift/build.gradle @@ -6,6 +6,8 @@ description = 'Library to send data to Jaeger backend components via Thrift' dependencies { compile project(':jaeger-core') + compile group: 'org.slf4j', name: 'slf4j-api' + compileOnly group: 'org.apache.thrift', name: 'libthrift', version: apacheThriftVersion compileOnly group: 'com.squareup.okhttp3', name: 'okhttp', version: okhttpVersion @@ -51,13 +53,18 @@ jar { shadowJar { baseName = 'jaeger-thrift' - relocate 'com.google.gson' , 'jaeger.com.google.gson' - relocate 'com.twitter' , 'jaeger.com.twitter' - relocate 'okhttp' , 'jaeger.okhttp' - relocate 'okio' , 'jaeger.okio' - relocate 'org.apache' , 'jaeger.org.apache' + relocate 'com.google.gson' , 'io.jaegertracing.vendor.com.google.gson' + relocate 'com.twitter' , 'io.jaegertracing.vendor.com.twitter' + relocate 'okhttp' , 'io.jaegertracing.vendor.okhttp' + relocate 'okio' , 'io.jaegertracing.vendor.okio' + relocate 'org.apache' , 'io.jaegertracing.vendor.org.apache' classifier null configurations = [project.configurations.compileOnly] + dependencies { + exclude(dependency('org.slf4j:slf4j-api')) + exclude(dependency('org.projectlombok:lombok')) + exclude(dependency('org.codehaus.mojo:animal-sniffer-annotations')) + } } task testJar(type: Jar, dependsOn: testClasses) { From b78c6b87e8f9b703d1f43e92faeafb6839e7227c Mon Sep 17 00:00:00 2001 From: Michal Dvorak Date: Fri, 20 Jul 2018 16:43:36 +0200 Subject: [PATCH 2/2] Added missing slf4j dependency version Signed-off-by: Michal Dvorak --- jaeger-thrift/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jaeger-thrift/build.gradle b/jaeger-thrift/build.gradle index 9d61c3ca3..68cd6a684 100644 --- a/jaeger-thrift/build.gradle +++ b/jaeger-thrift/build.gradle @@ -6,7 +6,7 @@ description = 'Library to send data to Jaeger backend components via Thrift' dependencies { compile project(':jaeger-core') - compile group: 'org.slf4j', name: 'slf4j-api' + compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion compileOnly group: 'org.apache.thrift', name: 'libthrift', version: apacheThriftVersion compileOnly group: 'com.squareup.okhttp3', name: 'okhttp', version: okhttpVersion