build.gradle.kts 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. val versions: Map<String, String> by project
  14. dependencies {
  15. library("org.apache.camel:camel-core:$camelversion")
  16. implementation("io.opentelemetry:opentelemetry-extension-aws")
  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. testLibrary("org.apache.camel:camel-spring-boot-starter:$camelversion")
  29. testLibrary("org.apache.camel:camel-jetty-starter:$camelversion")
  30. testLibrary("org.apache.camel:camel-http-starter:$camelversion")
  31. testLibrary("org.apache.camel:camel-jaxb-starter:$camelversion")
  32. testLibrary("org.apache.camel:camel-undertow:$camelversion")
  33. testLibrary("org.apache.camel:camel-aws:$camelversion")
  34. testLibrary("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("org.spockframework:spock-spring:${versions["org.spockframework"]}")
  38. testImplementation("javax.xml.bind:jaxb-api:2.3.1")
  39. testImplementation("org.elasticmq:elasticmq-rest-sqs_2.12:1.0.0")
  40. testImplementation("org.testcontainers:localstack")
  41. testImplementation("org.testcontainers:cassandra")
  42. latestDepTestLibrary("org.apache.camel:camel-core:2.+") // documented limitation
  43. latestDepTestLibrary("org.apache.camel:camel-spring-boot-starter:2.+") // documented limitation
  44. latestDepTestLibrary("org.apache.camel:camel-jetty-starter:2.+") // documented limitation
  45. latestDepTestLibrary("org.apache.camel:camel-http-starter:2.+") // documented limitation
  46. latestDepTestLibrary("org.apache.camel:camel-jaxb-starter:2.+") // documented limitation
  47. latestDepTestLibrary("org.apache.camel:camel-undertow:2.+") // documented limitation
  48. latestDepTestLibrary("org.apache.camel:camel-aws:2.+") // documented limitation
  49. latestDepTestLibrary("org.apache.camel:camel-cassandraql:2.+") // documented limitation
  50. }
  51. tasks {
  52. withType<Test>().configureEach {
  53. // TODO run tests both with and without experimental span attributes
  54. jvmArgs("-Dotel.instrumentation.apache-camel.experimental-span-attributes=true")
  55. jvmArgs("-Dotel.instrumentation.aws-sdk.experimental-span-attributes=true")
  56. // TODO: fix camel instrumentation so that it uses semantic attributes extractors
  57. jvmArgs("-Dotel.instrumentation.experimental.span-suppression-strategy=span-kind")
  58. // required on jdk17
  59. jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
  60. jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
  61. }
  62. }