build.gradle.kts 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. pass {
  6. group.set("org.apache.camel")
  7. module.set("camel-core")
  8. versions.set("[2.19,3)")
  9. assertInverse.set(true)
  10. }
  11. }
  12. val camelversion = "2.20.1" // first version that the tests pass on
  13. dependencies {
  14. library("org.apache.camel:camel-core:$camelversion")
  15. implementation("io.opentelemetry.contrib:opentelemetry-aws-xray-propagator")
  16. // without adding this dependency, javadoc fails:
  17. // warning: unknown enum constant XmlAccessType.PROPERTY
  18. // reason: class file for javax.xml.bind.annotation.XmlAccessType not found
  19. // due to usage of org.apache.camel.model.RouteDefinition in CamelTracingService
  20. // which has jaxb class-level annotations
  21. compileOnly("javax.xml.bind:jaxb-api:2.3.1")
  22. compileOnly("com.google.auto.value:auto-value-annotations")
  23. annotationProcessor("com.google.auto.value:auto-value")
  24. testInstrumentation(project(":instrumentation:apache-httpclient:apache-httpclient-2.0:javaagent"))
  25. testInstrumentation(project(":instrumentation:servlet:servlet-3.0:javaagent"))
  26. testInstrumentation(project(":instrumentation:aws-sdk:aws-sdk-1.11:javaagent"))
  27. testLibrary("org.apache.camel:camel-spring-boot-starter:$camelversion")
  28. testLibrary("org.apache.camel:camel-jetty-starter:$camelversion")
  29. testLibrary("org.apache.camel:camel-http-starter:$camelversion")
  30. testLibrary("org.apache.camel:camel-jaxb-starter:$camelversion")
  31. testLibrary("org.apache.camel:camel-undertow:$camelversion")
  32. testLibrary("org.apache.camel:camel-aws:$camelversion")
  33. testLibrary("org.apache.camel:camel-cassandraql:$camelversion")
  34. testImplementation("org.springframework.boot:spring-boot-starter-test:1.5.17.RELEASE")
  35. testImplementation("org.springframework.boot:spring-boot-starter:1.5.17.RELEASE")
  36. testImplementation("org.spockframework:spock-spring")
  37. testImplementation("javax.xml.bind:jaxb-api:2.3.1")
  38. testImplementation("org.elasticmq:elasticmq-rest-sqs_2.12:1.0.0")
  39. testImplementation("org.testcontainers:localstack")
  40. testImplementation("org.testcontainers:cassandra")
  41. latestDepTestLibrary("org.apache.camel:camel-core:2.+") // documented limitation
  42. latestDepTestLibrary("org.apache.camel:camel-spring-boot-starter:2.+") // documented limitation
  43. latestDepTestLibrary("org.apache.camel:camel-jetty-starter:2.+") // documented limitation
  44. latestDepTestLibrary("org.apache.camel:camel-http-starter:2.+") // documented limitation
  45. latestDepTestLibrary("org.apache.camel:camel-jaxb-starter:2.+") // documented limitation
  46. latestDepTestLibrary("org.apache.camel:camel-undertow:2.+") // documented limitation
  47. latestDepTestLibrary("org.apache.camel:camel-aws:2.+") // documented limitation
  48. latestDepTestLibrary("org.apache.camel:camel-cassandraql:2.+") // documented limitation
  49. }
  50. tasks {
  51. withType<Test>().configureEach {
  52. // TODO run tests both with and without experimental span attributes
  53. jvmArgs("-Dotel.instrumentation.apache-camel.experimental-span-attributes=true")
  54. jvmArgs("-Dotel.instrumentation.aws-sdk.experimental-span-attributes=true")
  55. // TODO: fix camel instrumentation so that it uses semantic attributes extractors
  56. jvmArgs("-Dotel.instrumentation.experimental.span-suppression-strategy=span-kind")
  57. // required on jdk17
  58. jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
  59. jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
  60. }
  61. }
  62. configurations.testRuntimeClasspath {
  63. resolutionStrategy {
  64. // requires old logback (and therefore also old slf4j)
  65. force("ch.qos.logback:logback-classic:1.2.11")
  66. force("org.slf4j:slf4j-api:1.7.36")
  67. }
  68. }