plugins { id "com.github.johnrengelman.shadow" } apply from: "$rootDir/gradle/java.gradle" // Depend on all libraries that are in the bootstrap classloader when running the agent. When // running tests, we simulate this by adding the jar produced by this project to the bootstrap // classpath. dependencies { implementation project(":instrumentation-api") implementation project(":javaagent-bootstrap") implementation deps.opentelemetryApi implementation deps.opentelemetryContext implementation deps.slf4j implementation "ch.qos.logback:logback-classic:${versions.logback}" } shadowJar { archiveFileName = "testing-bootstrap.jar" // need to exclude these logback classes from the bootstrap jar, otherwise tomcat will find them // and try to load them from the bootstrap class loader, which will fail with NoClassDefFoundError // since their super classes are servlet classes which are not in the bootstrap class loader exclude "ch/qos/logback/classic/servlet/LogbackServletContainerInitializer.class" exclude "ch/qos/logback/classic/servlet/LogbackServletContextListener.class" exclude "META-INF/services/javax.servlet.ServletContainerInitializer" }