Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 352
New shading#26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
New shading #26
Changes from all commits
d3ce6b1359c0873159cef6bff68b5a58284e0e808e1dc7d5af7b34d7a150548399c4ca73ab3d3File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -52,13 +52,17 @@ | ||
| <version>${ot.agent.version}</version> | ||
| </dependency> | ||
| <!-- Used to find annotated methods --> | ||
| <dependency> | ||
| <groupId>org.reflections</groupId> | ||
| <artifactId>reflections</artifactId> | ||
| <version>0.9.11</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.google.auto.service</groupId> | ||
| <artifactId>auto-service</artifactId> | ||
| <version>1.0-rc3</version> | ||
| </dependency> | ||
| <!-- Server side instrumentation --> | ||
| <dependency> | ||
| @@ -236,7 +240,13 @@ | ||
| </dependency> | ||
| <!-- JUnit tests --> | ||
| <!-- Tests --> | ||
| <dependency> | ||
| <groupId>ch.qos.logback</groupId> | ||
| <artifactId>logback-classic</artifactId> | ||
| <version>1.2.3</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>io.opentracing</groupId> | ||
| <artifactId>opentracing-mock</artifactId> | ||
| @@ -287,15 +297,47 @@ | ||
| <goal>shade</goal> | ||
| </goals> | ||
| <configuration> | ||
| <artifactSet> | ||
| <excludes> | ||
| <!-- If not, the shade plugin doesn't work --> | ||
| <exclude>io.opentracing.contrib:opentracing-agent</exclude> | ||
| <exclude>org.jboss.byteman:byteman</exclude> | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting... so these artifacts were breaking for me too for gradle's shadow jar. I don't think it's safe to just exclude them like this though. | ||
| </excludes> | ||
| </artifactSet> | ||
| <relocations> | ||
| <relocation> | ||
| <pattern>javassist</pattern> | ||
| <shadedPattern>shaded.javassist</shadedPattern> | ||
| </relocation> | ||
| <relocation> | ||
| <pattern>org.reflections</pattern> | ||
| <shadedPattern>shaded.org.reflections</shadedPattern> | ||
| </relocation> | ||
| <relocation> | ||
| <pattern>com.fasterxml</pattern> | ||
| <shadedPattern>shaded.com.fasterxml</shadedPattern> | ||
| </relocation> | ||
| <relocation> | ||
| <pattern>com.google</pattern> | ||
| <shadedPattern>shaded.com.google</shadedPattern> | ||
| </relocation> | ||
| <relocation> | ||
| <pattern>org.yaml</pattern> | ||
| <shadedPattern>shaded.org.yaml</shadedPattern> | ||
| </relocation> | ||
| <relocation> | ||
| <pattern>org.slf4j</pattern> | ||
| <shadedPattern>shaded.org.slf4j</shadedPattern> | ||
| </relocation> | ||
| </relocations> | ||
| <transformers> | ||
| <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> | ||
| <resource>otarules.btm</resource> | ||
| </transformer> | ||
| <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> | ||
| <manifestEntries> | ||
| <Agent-Class>com.datadoghq.trace.agent.AnnotationsTracingAgent</Agent-Class> | ||
| <Premain-Class>com.datadoghq.trace.agent.AnnotationsTracingAgent | ||
| </Premain-Class> | ||
| <Premain-Class>com.datadoghq.trace.agent.AnnotationsTracingAgent</Premain-Class> | ||
| <Can-Redefine-Classes>true</Can-Redefine-Classes> | ||
| <Can-Retransform-Classes>true</Can-Retransform-Classes> | ||
| <Boot-Class-Path>./${project.artifactId}.jar</Boot-Class-Path> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -56,11 +56,6 @@ | ||
| <artifactId>slf4j-api</artifactId> | ||
| <version>1.7.25</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>ch.qos.logback</groupId> | ||
| <artifactId>logback-classic</artifactId> | ||
| <version>1.2.3</version> | ||
| </dependency> | ||
| <!-- Required for the tracer resolver / annotation --> | ||
| <dependency> | ||
| @@ -70,6 +65,12 @@ | ||
| </dependency> | ||
| <!-- Testing dependencies --> | ||
| <dependency> | ||
| <groupId>ch.qos.logback</groupId> | ||
| <artifactId>logback-classic</artifactId> | ||
| <version>1.2.3</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>junit</groupId> | ||
| <artifactId>junit</artifactId> | ||
| @@ -108,7 +109,7 @@ | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-shade-plugin</artifactId> | ||
| <version>2.4.1</version> | ||
| <version>2.4.3</version> | ||
| <executions> | ||
| <execution> | ||
| <phase>package</phase> | ||
| @@ -119,28 +120,21 @@ | ||
| <relocations> | ||
| <relocation> | ||
| <pattern>com.fasterxml</pattern> | ||
| <shadedPattern>dd.com.fasterxml</shadedPattern> | ||
| <shadedPattern>shaded.com.fasterxml</shadedPattern> | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure why this changed. I think it would be much better to use a custom prefix, not ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tylerbenson I changed dd to shaded because I think I more explicit. There is no reason otherwise. | ||
| </relocation> | ||
| <!--<relocation>--> | ||
| <!--<pattern>com.google</pattern>--> | ||
| <!--<shadedPattern>dd.com.google</shadedPattern>--> | ||
| <!--</relocation>--> | ||
| <relocation> | ||
| <pattern>org.yaml</pattern> | ||
| <shadedPattern>dd.org.yaml</shadedPattern> | ||
| <pattern>com.google</pattern> | ||
| <shadedPattern>shaded.com.google</shadedPattern> | ||
| </relocation> | ||
| <relocation> | ||
| <pattern>org.slf4j</pattern> | ||
| <shadedPattern>dd.org.slf4j</shadedPattern> | ||
| <pattern>org.yaml</pattern> | ||
| <shadedPattern>shaded.org.yaml</shadedPattern> | ||
| </relocation> | ||
| <relocation> | ||
| <pattern>ch.qos</pattern> | ||
| <shadedPattern>dd.ch.qos</shadedPattern> | ||
| <pattern>org.slf4j</pattern> | ||
| <shadedPattern>shaded.org.slf4j</shadedPattern> | ||
| </relocation> | ||
| </relocations> | ||
| <transformers> | ||
| <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" /> | ||
| </transformers> | ||
| </configuration> | ||
| </execution> | ||
| </executions> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
much nicer. 👍