From 6e17d5febaeda8a06a3504222f86a91fb1a1a4ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 11 Jul 2018 17:08:21 +0200 Subject: [PATCH] Fix jaeger-client dependency jaeger-thrift no-shadow artifact MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- jaeger-client/build.gradle | 5 +---- .../java/io/jaegertracing/client/VersionTest.java | 14 -------------- jaeger-crossdock/build.gradle | 3 +-- jaeger-zipkin/build.gradle | 8 +++++--- 4 files changed, 7 insertions(+), 23 deletions(-) diff --git a/jaeger-client/build.gradle b/jaeger-client/build.gradle index 3badede30..bbb6bbbec 100644 --- a/jaeger-client/build.gradle +++ b/jaeger-client/build.gradle @@ -1,12 +1,9 @@ description = 'Convenience module to be used by instrumented applications' dependencies { - // otherwise, we get the non-shaded version, which will fail at runtime due to missing classes - compile group: 'io.jaegertracing', name: 'jaeger-thrift', version: developmentVersion - // for the other projects, we can add the dependency on the projects themselves + compile project(path: ':jaeger-thrift', configuration: "shadow") compile project(':jaeger-core') - compile project(':jaeger-thrift') compile project(':jaeger-tracerresolver') testCompile group: 'junit', name: 'junit', version: junitVersion diff --git a/jaeger-client/src/test/java/io/jaegertracing/client/VersionTest.java b/jaeger-client/src/test/java/io/jaegertracing/client/VersionTest.java index 2ad7b5358..5afa75bba 100644 --- a/jaeger-client/src/test/java/io/jaegertracing/client/VersionTest.java +++ b/jaeger-client/src/test/java/io/jaegertracing/client/VersionTest.java @@ -19,23 +19,9 @@ import io.jaegertracing.Configuration; import io.jaegertracing.internal.JaegerTracer; -import io.jaegertracing.internal.senders.NoopSender; -import org.junit.After; -import org.junit.Before; import org.junit.Test; public class VersionTest { - - @Before - public void setEnvironment() { - System.setProperty(Configuration.JAEGER_SENDER_FACTORY, NoopSender.class.getName()); - } - - @After - public void unsetEnvironment() { - System.clearProperty(Configuration.JAEGER_SENDER_FACTORY); - } - @Test public void testVersionGet() { assertEquals( diff --git a/jaeger-crossdock/build.gradle b/jaeger-crossdock/build.gradle index 64b8697d4..6dc922ac9 100644 --- a/jaeger-crossdock/build.gradle +++ b/jaeger-crossdock/build.gradle @@ -11,8 +11,7 @@ compileJava { } dependencies { - compile project(':jaeger-core') - compile project(':jaeger-thrift') + compile project(':jaeger-client') compile group: 'org.apache.thrift', name: 'libthrift', version: apacheThriftVersion compile group: 'com.squareup.okhttp3', name: 'okhttp', version: okhttpVersion diff --git a/jaeger-zipkin/build.gradle b/jaeger-zipkin/build.gradle index 950c466cc..2bd9b86cd 100644 --- a/jaeger-zipkin/build.gradle +++ b/jaeger-zipkin/build.gradle @@ -1,12 +1,14 @@ description = 'Integration library for Zipkin' dependencies { + compile project(':jaeger-client') + + // For some reason, we need to use the default configuration here to get access to the Thrift-generated classes + compile project(path: ':jaeger-thrift', configuration: "default") + compile group: 'io.zipkin.reporter2', name: 'zipkin-sender-urlconnection', version: '2.7.6' compile group: 'org.apache.thrift', name: 'libthrift', version: apacheThriftVersion - compile project(':jaeger-core') - compile project(':jaeger-thrift') - testCompile group: 'io.zipkin.zipkin2', name: 'zipkin-junit', version: '2.9.4' testCompile group: 'com.tngtech.java', name: 'junit-dataprovider', version: junitDataProviderVersion