build.gradle.kts 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. // Cant assert fails because muzzle assumes all instrumentations will fail
  6. // Instrumentations in jaxrs-2.0-common will pass
  7. pass {
  8. group.set("org.glassfish.jersey.core")
  9. module.set("jersey-server")
  10. versions.set("[2.0,3.0.0)")
  11. extraDependency("javax.servlet:javax.servlet-api:3.1.0")
  12. }
  13. pass {
  14. group.set("org.glassfish.jersey.containers")
  15. module.set("jersey-container-servlet")
  16. versions.set("[2.0,3.0.0)")
  17. extraDependency("javax.servlet:javax.servlet-api:3.1.0")
  18. }
  19. }
  20. dependencies {
  21. bootstrap(project(":instrumentation:jaxrs:jaxrs-common:bootstrap"))
  22. compileOnly("javax.ws.rs:javax.ws.rs-api:2.0")
  23. compileOnly("javax.servlet:javax.servlet-api:3.1.0")
  24. library("org.glassfish.jersey.core:jersey-server:2.0")
  25. library("org.glassfish.jersey.containers:jersey-container-servlet:2.0")
  26. implementation(project(":instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-common:javaagent"))
  27. testInstrumentation(project(":instrumentation:servlet:servlet-3.0:javaagent"))
  28. testInstrumentation(project(":instrumentation:servlet:servlet-javax-common:javaagent"))
  29. testImplementation(project(":instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-common:testing"))
  30. // First version with DropwizardTestSupport:
  31. testLibrary("io.dropwizard:dropwizard-testing:0.8.0")
  32. testImplementation("javax.xml.bind:jaxb-api:2.2.3")
  33. testImplementation("com.fasterxml.jackson.module:jackson-module-afterburner")
  34. latestDepTestLibrary("org.glassfish.jersey.core:jersey-server:2.+")
  35. latestDepTestLibrary("org.glassfish.jersey.containers:jersey-container-servlet:2.+")
  36. // this is needed because dropwizard-testing version 0.8.0 (above) pulls it in transitively,
  37. // but the latest version of dropwizard-testing does not
  38. latestDepTestLibrary("org.eclipse.jetty:jetty-webapp:9.+")
  39. }
  40. tasks {
  41. test {
  42. systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
  43. }
  44. withType<Test>().configureEach {
  45. // TODO run tests both with and without experimental span attributes
  46. jvmArgs("-Dotel.instrumentation.jaxrs.experimental-span-attributes=true")
  47. }
  48. }