build.gradle.kts 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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,]")
  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. compileOnly("org.springframework:spring-webmvc:3.1.0.RELEASE")
  21. compileOnly("javax.servlet:javax.servlet-api:3.1.0")
  22. // compileOnly("org.springframework:spring-webmvc:2.5.6")
  23. // compileOnly("javax.servlet:servlet-api:2.4")
  24. // Include servlet instrumentation for verifying the tomcat requests
  25. testInstrumentation(project(":instrumentation:servlet:servlet-3.0:javaagent"))
  26. testInstrumentation(project(":instrumentation:servlet:servlet-javax-common:javaagent"))
  27. testInstrumentation(project(":instrumentation:tomcat:tomcat-7.0:javaagent"))
  28. testInstrumentation(project(":instrumentation:spring:spring-web-3.1:javaagent"))
  29. testImplementation("javax.validation:validation-api:1.1.0.Final")
  30. testImplementation("org.hibernate:hibernate-validator:5.4.2.Final")
  31. testImplementation("org.spockframework:spock-spring")
  32. testLibrary("org.springframework.boot:spring-boot-starter-test:1.5.17.RELEASE")
  33. testLibrary("org.springframework.boot:spring-boot-starter-web:1.5.17.RELEASE")
  34. testLibrary("org.springframework.boot:spring-boot-starter-security:1.5.17.RELEASE")
  35. testImplementation("org.springframework.security.oauth:spring-security-oauth2:2.0.16.RELEASE")
  36. // For spring security
  37. testImplementation("jakarta.xml.bind:jakarta.xml.bind-api:2.3.2")
  38. testImplementation("org.glassfish.jaxb:jaxb-runtime:2.3.2")
  39. }
  40. tasks.withType<Test>().configureEach {
  41. // TODO run tests both with and without experimental span attributes
  42. jvmArgs("-Dotel.instrumentation.spring-webmvc.experimental-span-attributes=true")
  43. // required on jdk17
  44. jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
  45. jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
  46. }