Exclude java 9 compiled files from shadow jar.
MODIFY
build.gradle
build.gradle
@@ -12,7 +12,7 @@ subprojects {
task packageSources(type: Jar) {
classifier = 'sources'
- from sourceSets.main.allSource\
+ from sourceSets.main.allSource
}
artifacts.archives packageSources
repositories {

MODIFY
dd-java-agent/build.gradle
dd-java-agent/build.gradle
plugins {
- id 'application'
id "com.github.johnrengelman.shadow" version "2.0.1"
}
description = 'dd-java-agent'
-mainClassName = "com.datadoghq.trace.agent.AnnotationsTracingAgent"
dependencies {
compile project(':dd-trace')
@@ -14,7 +12,6 @@ dependencies {
compile group: 'org.reflections', name: 'reflections', version: '0.9.11'
compile group: 'com.google.auto.service', name: 'auto-service', version: '1.0-rc3'
-
compile(group: 'io.opentracing.contrib', name: 'opentracing-web-servlet-filter', version: '0.0.9') {
exclude(module: 'jetty-servlet')
}
@@ -84,4 +81,14 @@ shadowJar {
relocate('', 'dd.deps.') {
exclude '%ant[META-INF/**/*]'
}
+
+ //Exclude Java 9 compiled classes:
+ exclude 'org/jboss/byteman/agent/JigsawAccessEnablerGenerator.class'
+ exclude 'org/jboss/byteman/agent/JigsawAccessManager$1.class'
+ exclude 'org/jboss/byteman/agent/JigsawAccessManager.class'
+ exclude 'org/jboss/byteman/layer/LayerFactory.class'
+ exclude 'org/jboss/byteman/layer/LayerModuleFinder$1.class'
+ exclude 'org/jboss/byteman/layer/LayerModuleFinder.class'
+ exclude 'org/jboss/byteman/layer/LayerModuleReader.class'
+ exclude 'org/jboss/byteman/layer/LayerModuleReference.class'
}

MODIFY
dd-trace-examples/dropwizard-mongo-client/build.gradle
dd-trace-examples/dropwizard-mongo-client/build.gradle
description = 'dropwizard-mongo-client'
dependencies {
compile project(':dd-trace-annotations')
+
+ compile group: 'io.opentracing', name: 'opentracing-api', version: '0.+'
+ compile group: 'io.opentracing', name: 'opentracing-util', version: '0.+'
+
compile group: 'io.dropwizard', name: 'dropwizard-core', version: '0.9.2'
compile group: 'org.mongodb', name: 'mongo-java-driver', version: '3.4.2'
compile group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.7.0'

MODIFY
dd-trace/build.gradle
dd-trace/build.gradle
@@ -17,6 +17,9 @@ dependencies {
testCompile group: 'org.assertj', name: 'assertj-core', version: '3.6.2'
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.7.22'
testCompile group: 'ch.qos.logback', name: 'logback-classic' , version: '1.2.3'
+ testCompile group: 'org.spockframework', name: 'spock-core', version: '1.0-groovy-2.4'
+ testCompile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.4.4'
+ testCompile group: 'io.ratpack', name: 'ratpack-groovy-test', version: '1.4.6'
}
shadowJar {

Exclude java 9 compiled files from shadow jar.