-
Notifications
You must be signed in to change notification settings - Fork 95
don't download JDK 17 during build #264
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
Comments
The solution suggested above has one downside: it will no longer be possible to run tests in CI against JDK 8 and 11. |
Another possible solution, one that I've been trying to avoid, is to use Maven toolchains. It is unfriendly to contributors, but may be the best we can do (unless we're willing to abandon running tests with older JDKs...). |
Another option may be to run the JDK 17 build/tests (emitting Java 8 bytecode), and attach the |
That would be doable, but would require extracting the tests to a separate module, or doing some other hacks to convince Maven to run tests against code that wasn't built in the current Maven reactor... |
You should be able to only run a subset of the packages and it will use the artifacts in the local repo for the dependency. As long as the |
I think I have a reasonable solution: if "current" JDK is < 17, don't change anything (keep downloading JDK 17 during build). If "current" JDK is >= 17, use the "current" JDK to build everything. Also, add tests to verify that Jandex bytecode is indeed Java 8. This way, downstreams can build using JDK 17 and no extra JDK will be downloaded. Perhaps we should do that in the release build, too. |
One thing to look out for is that newer JDKs are dropping support in Javac to build older bytecode more aggressively than before. |
I've read https://openjdk.org/jeps/182 and found the recent announcement that JDK 20 drops support for |
The current Jandex 3 codebase is meant to be built with JDK 8 and downloads JDK 17 during build for the purpose of the
test-data
module. This is hostile to downstream rebuilds in an air-gapped environment.There are several possible solutions. The best one is probably to use JDK 17 to build the entire project and make sure that the
core
andmaven-plugin
are configured to emit Java 8 bytecode. Perhaps we should even add automated tests to make sure that the class files actually are Java 8 bytecode.The text was updated successfully, but these errors were encountered: