build.gradle.kts 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. description = "camel-2-20"
  14. dependencies {
  15. library("org.apache.camel:camel-core:$camelversion")
  16. implementation("io.opentelemetry.contrib:opentelemetry-aws-xray-propagator")
  17. // without adding this dependency, javadoc fails:
  18. // warning: unknown enum constant XmlAccessType.PROPERTY
  19. // reason: class file for javax.xml.bind.annotation.XmlAccessType not found
  20. // due to usage of org.apache.camel.model.RouteDefinition in CamelTracingService
  21. // which has jaxb class-level annotations
  22. compileOnly("javax.xml.bind:jaxb-api:2.3.1")
  23. compileOnly("com.google.auto.value:auto-value-annotations")
  24. annotationProcessor("com.google.auto.value:auto-value")
  25. testInstrumentation(project(":instrumentation:apache-httpclient:apache-httpclient-2.0:javaagent"))
  26. testInstrumentation(project(":instrumentation:servlet:servlet-3.0:javaagent"))
  27. testInstrumentation(project(":instrumentation:aws-sdk:aws-sdk-1.11:javaagent"))
  28. testImplementation("org.apache.camel:camel-spring-boot-starter:$camelversion")
  29. testImplementation("org.apache.camel:camel-jetty-starter:$camelversion")
  30. testImplementation("org.apache.camel:camel-http-starter:$camelversion")
  31. testImplementation("org.apache.camel:camel-jaxb-starter:$camelversion")
  32. testImplementation("org.apache.camel:camel-undertow:$camelversion")
  33. testImplementation("org.apache.camel:camel-aws:$camelversion")
  34. testImplementation("org.apache.camel:camel-cassandraql:$camelversion")
  35. testImplementation("org.springframework.boot:spring-boot-starter-test:1.5.17.RELEASE")
  36. testImplementation("org.springframework.boot:spring-boot-starter:1.5.17.RELEASE")
  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:cassandra")
  40. testImplementation("org.testcontainers:testcontainers")
  41. testImplementation("org.testcontainers:junit-jupiter")
  42. testImplementation("com.datastax.oss:java-driver-core:4.16.0") {
  43. exclude(group = "io.dropwizard.metrics", module = "metrics-core")
  44. }
  45. latestDepTestLibrary("org.apache.camel:camel-core:2.+") // documented limitation
  46. latestDepTestLibrary("org.apache.camel:camel-spring-boot-starter:2.+") // documented limitation
  47. latestDepTestLibrary("org.apache.camel:camel-jetty-starter:2.+") // documented limitation
  48. latestDepTestLibrary("org.apache.camel:camel-http-starter:2.+") // documented limitation
  49. latestDepTestLibrary("org.apache.camel:camel-jaxb-starter:2.+") // documented limitation
  50. latestDepTestLibrary("org.apache.camel:camel-undertow:2.+") // documented limitation
  51. latestDepTestLibrary("org.apache.camel:camel-aws:2.+") // documented limitation
  52. latestDepTestLibrary("org.apache.camel:camel-cassandraql:2.+") // documented limitation
  53. }
  54. tasks {
  55. withType<Test>().configureEach {
  56. // TODO run tests both with and without experimental span attributes
  57. jvmArgs("-Dotel.instrumentation.camel.experimental-span-attributes=true")
  58. jvmArgs("-Dotel.instrumentation.aws-sdk.experimental-span-attributes=true")
  59. // TODO: fix camel instrumentation so that it uses semantic attributes extractors
  60. jvmArgs("-Dotel.instrumentation.experimental.span-suppression-strategy=span-kind")
  61. // required on jdk17
  62. jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
  63. jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
  64. jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
  65. }
  66. }
  67. configurations.testRuntimeClasspath {
  68. resolutionStrategy {
  69. // requires old logback (and therefore also old slf4j)
  70. force("ch.qos.logback:logback-classic:1.2.11")
  71. force("org.slf4j:slf4j-api:1.7.36")
  72. }
  73. }