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

Commit

Permalink
Publish a shadow jar with thrift 0.9.2
Browse files Browse the repository at this point in the history
Fixes #80
  • Loading branch information
vprithvi committed Oct 26, 2016
1 parent a5281bb commit 520dcde
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,26 @@ For e.g, to depend on the core jaeger library, you'd include the following
</dependency>
```

###Thrift version conflicts
Jaeger client uses `org.apache.thrift:libthrift:0.9.2`. If your project depends on a different
version of `libthrift`, it is recommended that you use the shaded `jaeger-thrift` jar we publish
which packages it's own `libthrift`.

To depend on the shaded jar, add the following to your maven build.
Note that this is only supported for a jaeger version >= 0.15.0
```xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.uber.jaeger</groupId>
<artifactId>jaeger-thrift</artifactId>
<classifier>thrift92</classifier>
<version>$jaegerVersion</version>
</dependency>
</dependencies>
</dependencyManagement>
```

## In-process Context Propagation
`jaeger-context` defines
[ThreadLocalTraceContext](./jaeger-context/src/main/java/com/uber/jaeger/context)
Expand Down
15 changes: 14 additions & 1 deletion jaeger-thrift/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'org.jruyi.thrift'
apply plugin: 'com.github.johnrengelman.shadow'

//This is in a separate subproject so that we can use
//standard javac instead of the error prone compiler
Expand Down Expand Up @@ -38,6 +39,18 @@ sourceSets {
jar {
from sourceSets.main.output
manifest {
attributes('Implementation-Title': 'jaeger-generated', 'Implementation-Version': project.version)
attributes('Implementation-Title': 'jaeger-thrift', 'Implementation-Version': project.version)
}
}

shadowJar {
baseName = 'jaeger-thrift'
relocate 'org.apache.thrift', 'org.shadow.apache.thrift92'
classifier 'thrift92'
}

artifacts {
archives(shadowJar.archivePath) {
builtBy shadowJar
}
}

0 comments on commit 520dcde

Please sign in to comment.