micronaut-projects / micronaut-build

Common Gradle build scripts
Apache License 2.0
18 stars 14 forks source link

Unable to download toolchain matching these requirements: {languageVersion=8, vendor=any, implementation=vendor-specific} on Apple M1 #323

Closed donbeave closed 1 year ago

donbeave commented 2 years ago

Hello!

On Apple M1 this project fails as it is unable to download Java 8 SDK for aarch64, which is not available for this architecture. It also affected some other modules, which include these plugins, for example, micronaut-security's javadoc task failed as well because of the same reason:

Execution failed for task ':javadoc'.
> Error while evaluating property 'javadocTool' of task ':javadoc'
   > Failed to query the value of task ':javadoc' property 'javadocTool'.
      > Unable to download toolchain matching these requirements: {languageVersion=8, vendor=any, implementation=vendor-specific}
         > Unable to download toolchain. This might indicate that the combination (version, architecture, release/early access, ...) for the requested JDK is not available.
            > Could not read 'https://api.adoptopenjdk.net/v3/binary/latest/8/ga/mac/aarch64/jdk/hotspot/normal/adoptopenjdk' as it does not exist.

I think the workable solution is to use OpenJDK 17 toolchain with -release option.

donbeave commented 1 year ago

Closing it, the 6.0.0 version is moved to Java 17 baseline: https://github.com/micronaut-projects/micronaut-build/wiki/Upgrade-guide#upgrading-to-micronaut-build-60x