build.gradle.kts 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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("[3.1.0.RELEASE,6)")
  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("javax.servlet:javax.servlet-api:3.0.1")
  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:3.1.0.RELEASE")
  22. compileOnly("javax.servlet:javax.servlet-api:3.1.0")
  23. // Include servlet instrumentation for verifying the tomcat requests
  24. testInstrumentation(project(":instrumentation:servlet:servlet-3.0:javaagent"))
  25. testInstrumentation(project(":instrumentation:servlet:servlet-javax-common:javaagent"))
  26. testInstrumentation(project(":instrumentation:tomcat:tomcat-7.0:javaagent"))
  27. testInstrumentation(project(":instrumentation:spring:spring-web:spring-web-3.1:javaagent"))
  28. testImplementation(project(":instrumentation:spring:spring-webmvc:spring-webmvc-common:testing"))
  29. testLibrary("org.springframework.boot:spring-boot-starter-test:1.5.17.RELEASE")
  30. testLibrary("org.springframework.boot:spring-boot-starter-web:1.5.17.RELEASE")
  31. testLibrary("org.springframework.boot:spring-boot-starter-security:1.5.17.RELEASE")
  32. latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+")
  33. latestDepTestLibrary("org.springframework.boot:spring-boot-starter-web:2.+")
  34. latestDepTestLibrary("org.springframework.boot:spring-boot-starter-security:2.+")
  35. }
  36. tasks.withType<Test>().configureEach {
  37. // TODO run tests both with and without experimental span attributes
  38. jvmArgs("-Dotel.instrumentation.spring-webmvc.experimental-span-attributes=true")
  39. // required on jdk17
  40. jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
  41. jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
  42. }
  43. configurations.testRuntimeClasspath {
  44. resolutionStrategy {
  45. // requires old logback (and therefore also old slf4j)
  46. force("ch.qos.logback:logback-classic:1.2.11")
  47. force("org.slf4j:slf4j-api:1.7.36")
  48. }
  49. }