Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Commit

Permalink
Move jaeger-thrift shadow jar to its own classifier
Browse files Browse the repository at this point in the history
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
  • Loading branch information
jpkrohling committed Aug 21, 2018
1 parent 4934922 commit bc4b732
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 27 deletions.
5 changes: 2 additions & 3 deletions README.md
Expand Up @@ -48,9 +48,8 @@ This will bring a concrete sender, such as `jaeger-thrift`, as well as the `jaeg

### Thrift version conflicts
The Jaeger Java Client uses `org.apache.thrift:libthrift:0.11.0`. By default, declaring a dependency on the
`jaeger-thrift` module will bring a shaded version of Thrift (and others), making it safe to use your own versions of
such dependencies. A non-shaded version of the dependency is available with the classifier `no-shadow`, but the
transitive dependencies (Thrift included) will have to be added manually to your project.
`jaeger-thrift` module will bring a non-shaded version of Thrift (and others). A non-shaded version of the dependency is
available with the classifier `shadow`.

## Instantiating the Tracer

Expand Down
3 changes: 1 addition & 2 deletions jaeger-client/build.gradle
@@ -1,8 +1,7 @@
description = 'Convenience module to be used by instrumented applications'

dependencies {
// for the other projects, we can add the dependency on the projects themselves
compile project(path: ':jaeger-thrift', configuration: "shadow")
compile project(':jaeger-thrift')
compile project(':jaeger-core')
compile project(':jaeger-tracerresolver')

Expand Down
9 changes: 4 additions & 5 deletions jaeger-crossdock/build.gradle
@@ -1,6 +1,5 @@
apply plugin: 'com.github.johnrengelman.shadow'


description = 'A jaeger instrumented java server meant for testing interoperability with different Jaeger clients through the use of crossdock (https://github.com/crossdock/crossdock)'
ext.jacksonVersion = '2.8.10'
shadowJar.archiveName = 'jaeger-crossdock.jar'
Expand All @@ -13,15 +12,15 @@ compileJava {
dependencies {
compile project(':jaeger-client')

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: 'io.opentracing.contrib', name: 'opentracing-jaxrs2', version: '0.1.4'
compile group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.0'
compile group: 'javax.servlet', name: 'servlet-api', version: '2.5'
compile group: 'org.glassfish.grizzly', name: 'grizzly-http-servlet', version: '2.3.23'
compile group: 'org.glassfish.jersey.containers', name: 'jersey-container-grizzly2-http', version: jerseyVersion
compile group: 'org.glassfish.jersey.containers', name: 'jersey-container-servlet', version: jerseyVersion
compile group: 'org.glassfish.grizzly', name: 'grizzly-http-servlet', version: '2.3.23'
compile group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.0'
compile group: 'org.glassfish.jersey.core', name: 'jersey-client', version: jerseyVersion
compile group: 'org.glassfish.jersey.media', name: 'jersey-media-json-jackson', version: jerseyVersion
compile group: 'javax.servlet', name: 'servlet-api', version: '2.5'
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: slf4jVersion

// Testing Frameworks
Expand Down
17 changes: 3 additions & 14 deletions jaeger-thrift/build.gradle
Expand Up @@ -7,19 +7,14 @@ dependencies {
compile project(':jaeger-core')

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
compile group: 'org.apache.thrift', name: 'libthrift', version: apacheThriftVersion
compile group: 'com.squareup.okhttp3', name: 'okhttp', version: okhttpVersion

testCompile group: 'junit', name: 'junit', version: junitVersion
testCompile group: 'com.tngtech.java', name: 'junit-dataprovider', version: junitDataProviderVersion
testCompile group: 'org.awaitility', name: 'awaitility', version: awaitilityVersion
testCompile group: 'org.glassfish.jersey.test-framework.providers', name: 'jersey-test-framework-provider-grizzly2', version: jerseyVersion

// compileOnly dependencies aren't visible to tests
testCompile group: 'com.squareup.okhttp3', name: 'okhttp', version: okhttpVersion
testCompile group: 'org.apache.thrift', name: 'libthrift', version: apacheThriftVersion

signature 'org.codehaus.mojo.signature:java16:1.1@signature'
}

Expand Down Expand Up @@ -47,19 +42,13 @@ licenseMain.enabled = false
checkstyleMain.enabled = false
checkstyleTest.enabled = false

jar {
classifier 'no-shadow'
}

shadowJar {
baseName = 'jaeger-thrift'
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]
classifier 'shadow'
dependencies {
exclude(dependency('org.slf4j:slf4j-api'))
exclude(dependency('org.projectlombok:lombok'))
Expand Down
3 changes: 0 additions & 3 deletions jaeger-zipkin/build.gradle
Expand Up @@ -3,9 +3,6 @@ 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

Expand Down

0 comments on commit bc4b732

Please sign in to comment.