Add support for JLink plugins
Fixes #602
Following this checklist to help us incorporate your contribution quickly and easily:
- [x] Make sure there is a GitHub issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes.
- [x] Each commit in the pull request should have a meaningful subject line and body.
- [x] Format the pull request title like
[#<num>] - Fixes bug in ApproximateQuantiles, where you replace#<num>with the appropriate GitHub issue. Best practice is to use the GitHub issue title in the pull request title and in the first line of the commit message. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Run
mvn clean verifyto make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [x] You have run the integration tests successfully (
mvn -Prun-its clean verify).
If your pull request is about ~20 lines of code you don't need to sign an Individual Contributor License Agreement if you are unsure please ask on the developers list.
To make clear that you license your contribution under the Apache License Version 2.0, January 2004 you have to acknowledge this by using the following check-box.
-
[x] I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
-
[ ] In any other case, please file an Apache Individual Contributor License Agreement.
Description
This PR add support for the JLink options --generate-cds-archive and --order-resources.
Additionally, it adds the ability to supply additional args to JLink to support undocumented plugins. See #602 for a list of those.
The tests are failing, because some of the introduced plugin options are not available with all JDK vendors. Is there a way to disable tests with some JDKs? I have never seen this test setup before. Maybe I could check in the groovy script, but I don't know, whether this is the right way.
Hi @Til7701 -- you are right, CDS is a hotspot-specific thing, but other Java vendors like IBM may chose to replace hotspot and its CDS with something else -- like Eclipse OpenJ9 as Memory-Management and GC implementation with SCC (shared class cache) as an almost equivalent implementation. Maybe we need something for the tests to be marked as "only run on HotSpot" vs "only run on OpenJ9" based JVMs.
OK, one more thing. The option generate-cds-archive cannot be used before Java 17.
The files you added (e.g. src/it/projects/cli-options/additional-args/invoker.properties) should reflect this. You need to add invoker.java.version = 17+.