-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Hello:
I download opentemeletry-java-instrumentation 2.10.0 Release Code,I used jdk17 、Gradle 8.10.2 built failed with error like this:
Failed to apply plugin 'otel.bom-conventions'.
A problem occurred configuring project ':instrumentation:grpc-1.6:testing'.
> Could not create task ':instrumentation:grpc-1.6:testing:compileJava'.
> Failed to calculate the value of task ':instrumentation:grpc-1.6:testing:compileJava' property 'javaCompiler'.
> Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=21, vendor=any vendor, implementation=vendor-specific} for MAC_OS on aarch64.
> No matching toolchain could be found in the locally installed toolchains or the configured toolchain download repositories. Some toolchain resolvers had provisioning failures: foojay (Unable to download toolchain matching the requirements ({languageVersion=21, vendor=any vendor, implementation=vendor-specific}) from 'https://api.foojay.io/disco/v3.0/ids/72915572a39ae90aa12762ce54c2e276/redirect', due to: Could not HEAD 'https://github.sheincorp.cn/adoptium/temurin21-binaries/releases/download/jdk-21.0.5+11/OpenJDK21U-jdk_aarch64_mac_hotspot_21.0.5_11.tar.gz'.).
JDK Version:
java version "17.0.12" 2024-07-16 LTS
Java(TM) SE Runtime Environment (build 17.0.12+8-LTS-286)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.12+8-LTS-286, mixed mode, sharing)
Gradle Version:
Gradle 8.10.2
Build time: 2024-09-23 21:28:39 UTC
Revision: 415adb9e06a516c44b391edff552fd42139443f7
Kotlin: 1.9.24
Groovy: 3.0.22
Ant: Apache Ant(TM) version 1.10.14 compiled on August 16 2023
Launcher JVM: 17.0.12 (Oracle Corporation 17.0.12+8-LTS-286)
Daemon JVM: /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home (no JDK specified, using current Java home)
OS: Mac OS X 14.7 aarch64
I try to set toolchain like this:
plugins {
id("java")
}
subprojects {
apply(plugin = "java")
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
}
But another error happpened like this:
-
Where:
Build file '/Users/10245597/open-source/opentelemetry-java-instrumentation-2.10.0/dependencyManagement/build.gradle.kts' line: 1 -
What went wrong:
An exception occurred applying plugin request [id: 'org.gradle.java-platform']
Failed to apply plugin 'org.gradle.java-platform'.
The "java-platform" plugin cannot be applied together with the "java" (or "java-library") plugin. A project is either a platform or a library but cannot be both at the same time.