build.gradle.kts 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. pass {
  6. group.set("org.springframework")
  7. module.set("spring-webmvc")
  8. versions.set("[6.0.0,)")
  9. // these versions depend on org.springframework:spring-web which has a bad dependency on
  10. // javax.faces:jsf-api:1.1 which was released as pom only
  11. skip("1.2.1", "1.2.2", "1.2.3", "1.2.4")
  12. // 3.2.1.RELEASE has transitive dependencies like spring-web as "provided" instead of "compile"
  13. skip("3.2.1.RELEASE")
  14. extraDependency("jakarta.servlet:jakarta.servlet-api:5.0.0")
  15. assertInverse.set(true)
  16. }
  17. }
  18. dependencies {
  19. bootstrap(project(":instrumentation:servlet:servlet-common:bootstrap"))
  20. implementation(project(":instrumentation:spring:spring-webmvc:spring-webmvc-common:javaagent"))
  21. compileOnly("org.springframework:spring-webmvc:6.0.0")
  22. compileOnly("jakarta.servlet:jakarta.servlet-api:5.0.0")
  23. // Include servlet instrumentation for verifying the tomcat requests
  24. testInstrumentation(project(":instrumentation:servlet:servlet-5.0:javaagent"))
  25. testInstrumentation(project(":instrumentation:servlet:servlet-javax-common:javaagent"))
  26. testInstrumentation(project(":instrumentation:tomcat:tomcat-10.0:javaagent"))
  27. testInstrumentation(project(":instrumentation:spring:spring-core-2.0:javaagent"))
  28. testInstrumentation(project(":instrumentation:spring:spring-web:spring-web-6.0:javaagent"))
  29. testImplementation(project(":instrumentation:spring:spring-webmvc:spring-webmvc-common:testing"))
  30. testLibrary("org.springframework.boot:spring-boot-starter-test:3.0.0")
  31. testLibrary("org.springframework.boot:spring-boot-starter-web:3.0.0")
  32. testLibrary("org.springframework.boot:spring-boot-starter-security:3.0.0")
  33. }
  34. // spring 6 requires java 17
  35. otelJava {
  36. minJavaVersionSupported.set(JavaVersion.VERSION_17)
  37. }
  38. tasks.withType<Test>().configureEach {
  39. // TODO run tests both with and without experimental span attributes
  40. jvmArgs("-Dotel.instrumentation.spring-webmvc.experimental-span-attributes=true")
  41. // required on jdk17
  42. jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
  43. jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
  44. systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
  45. }