Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails with Gradle 7.6 and mrjars plugin on CircleCI #3549

Closed
shakuzen opened this issue Nov 28, 2022 · 3 comments
Closed

Build fails with Gradle 7.6 and mrjars plugin on CircleCI #3549

shakuzen opened this issue Nov 28, 2022 · 3 comments
Labels
build A change in our build-system

Comments

@shakuzen
Copy link
Member

shakuzen commented Nov 28, 2022

See, for example, https://app.circleci.com/pipelines/github/micrometer-metrics/micrometer/3636/workflows/30833aec-3bf4-40c6-9b7b-d2c77fe0f732/jobs/19392 (or Gradle Enterprise https://ge.micrometer.io/s/vxhaweu5wfjhm)

Execution failed for task ':micrometer-registry-azure-monitor:downloadDependencies'.
> Could not resolve all dependencies for configuration ':micrometer-registry-azure-monitor:testCompileClasspath'.
   > Failed to calculate the value of task ':micrometer-test:compileJava11Java' property 'javaCompiler'.
      > Unable to download toolchain matching the requirements ({languageVersion=11, vendor=any, implementation=vendor-specific}) from 'https://api.adoptium.net/v3/binary/latest/11/ga/linux/x64/jdk/hotspot/normal/eclipse'.
         > Could not copy file '/home/********/.gradle/jdks/OpenJDK11U-jdk_x64_linux_hotspot_11/jdk-11.0.17+8/legal/jdk.crypto.ec/ecc.md' to '/home/********/.gradle/jdks/eclipse_adoptium-11-amd64-linux/jdk-11.0.17+8/legal/jdk.crypto.ec/ecc.md'.
            > /home/********/.gradle/jdks/eclipse_adoptium-11-amd64-linux/jdk-11.0.17+8/legal/jdk.crypto.ec/ecc.md (Permission denied)

This started happening on the 1.10.x and main branches after upgrading to Gradle 7.6. Prior maintenance branches do not use the mrjars plugin, which is why I think they are unaffected. The version of mrjars did not change, however, so I suspect the default vendor the JDK is being downloaded from changed in Gradle 7.6. It's strange that downloading from adoptium would not work on CircleCI, though. It's also worth noting that we should not need to download a JDK on our CI build because we are always using the latest JDK available, which is capable of compiling 11-compatible source code for the multi-release jar. This happens because the mrjars plugin sets the compiler to languageVersion=11 for 11-compatible source sets.

I've confirmed that reverting the Gradle upgrade makes the CI build pass again.

@shakuzen shakuzen added the build A change in our build-system label Nov 28, 2022
@shakuzen
Copy link
Member Author

It looks like the issue may have already been reported to Gradle as gradle/gradle#22796.

@jonatan-ivanov
Copy link
Member

Once Gradle 7.6.1 we should also upgrade to Java 19, basically reverting this: #3612

@shakuzen
Copy link
Member Author

Superseded by #3644

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build A change in our build-system
Projects
None yet
Development

No branches or pull requests

2 participants