-
Notifications
You must be signed in to change notification settings - Fork 300
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
New shading #26
Changes from all commits
d3ce6b1
359c087
3159cef
6bff68b
5a58284
e0e808e
1dc7d5a
f7b34d7
a150548
399c4ca
73ab3d3
File filter
Filter by extension
Conversations
Jump to
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> | ||
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> | ||
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 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> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,8 +32,8 @@ | |
<url>https://github.com/datadog/dd-trace-java</url> | ||
<connection>scm:git:git://github.com/datadog/dd-trace-java.git</connection> | ||
<developerConnection>scm:git:[email protected]:datadog/dd-trace-java.git</developerConnection> | ||
<tag>HEAD</tag> | ||
</scm> | ||
<tag>HEAD</tag> | ||
</scm> | ||
|
||
<modules> | ||
<module>dd-trace</module> | ||
|
@@ -47,6 +47,7 @@ | |
<maven.deploy.skip>true</maven.deploy.skip> | ||
<opentracing.version>0.30.0</opentracing.version> | ||
<java.version>1.7</java.version> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<distributionManagement> | ||
|
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. 👍