From 4a8d9fdb2a652dd2eaef262be4a8ac5d3a54da68 Mon Sep 17 00:00:00 2001 From: Nikita Salnikov-Tarnovski Date: Mon, 18 May 2020 20:27:07 +0300 Subject: [PATCH] Update docs about needing java 11 to build --- CONTRIBUTING.md | 7 +++---- instrumentation/akka-http-10.0/akka-http-10.0.gradle | 3 ++- instrumentation/java-concurrent/java-concurrent.gradle | 3 ++- instrumentation/jaxrs/jaxrs-2.0/jaxrs-2.0.gradle | 3 ++- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4a09a5772ab9..48eca5082d6b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,10 +3,9 @@ Pull requests for bug fixes are welcome, but before submitting new features or changes to current functionality [open an issue](https://github.com/open-telemetry/opentelemetry-auto-instr-java/issues/new) and discuss your ideas or propose the changes you wish to make. After a resolution is reached a PR can be submitted for review. -In order to fully build and test this whole repository you need the following: -* Installed both JDK 8 and 9. -* Java 8 should be set as default: `java -version` should give you version 8. -* Defined environment variables `JAVA_8_HOME` and `JAVA_9_HOME` which point to the corresponding java homes. +In order to build and test this whole repository you need JDK 11+. +Some instrumentations and tests may put constraints on which java versions they support. +See [Executing tests with specific java version](#Executing tests with specific java version) below. ### Plugin structure OpenTelemetry Auto Instrumentation java agent's jar can logically be divided into 3 parts. diff --git a/instrumentation/akka-http-10.0/akka-http-10.0.gradle b/instrumentation/akka-http-10.0/akka-http-10.0.gradle index ef4e70df9673..afa5fb12422c 100644 --- a/instrumentation/akka-http-10.0/akka-http-10.0.gradle +++ b/instrumentation/akka-http-10.0/akka-http-10.0.gradle @@ -112,6 +112,7 @@ compileLatestDepTestGroovy { // They all use the same constraints as the main test source set. lagomTest { onlyIf { - executable == toExecutable(findJavaHome(JavaVersion.VERSION_1_8)) + String java8Home = findJavaHome(JavaVersion.VERSION_1_8) + java8Home != null && executable == toExecutable(java8Home) } } diff --git a/instrumentation/java-concurrent/java-concurrent.gradle b/instrumentation/java-concurrent/java-concurrent.gradle index be5d476c19da..afae81659fe0 100644 --- a/instrumentation/java-concurrent/java-concurrent.gradle +++ b/instrumentation/java-concurrent/java-concurrent.gradle @@ -40,6 +40,7 @@ test.dependsOn slickTest // force this one test to run on java8 only slickTest { onlyIf { - executable == toExecutable(findJavaHome(JavaVersion.VERSION_1_8)) + String java8Home = findJavaHome(JavaVersion.VERSION_1_8) + java8Home != null && executable == toExecutable(java8Home) } } diff --git a/instrumentation/jaxrs/jaxrs-2.0/jaxrs-2.0.gradle b/instrumentation/jaxrs/jaxrs-2.0/jaxrs-2.0.gradle index 64a2c6ba7843..74cc42506e42 100644 --- a/instrumentation/jaxrs/jaxrs-2.0/jaxrs-2.0.gradle +++ b/instrumentation/jaxrs/jaxrs-2.0/jaxrs-2.0.gradle @@ -56,6 +56,7 @@ test.dependsOn resteasy31Test // force this one test to run on java8 only resteasy31Test { onlyIf { - executable == toExecutable(findJavaHome(JavaVersion.VERSION_1_8)) + String java8Home = findJavaHome(JavaVersion.VERSION_1_8) + java8Home != null && executable == toExecutable(java8Home) } }