-
Notifications
You must be signed in to change notification settings - Fork 89
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
Dynamically apply Add-Opens
directives from MANIFEST.MF
#322
Conversation
src/main/java/org/jenkinsci/maven/plugins/hpi/AbstractJenkinsMojo.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jenkinsci/maven/plugins/hpi/InitializeMojo.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. BTW how does this sort of thing get integration-tested? Does running existing plugin-pom
ITs using Java 17 suffice?
I will write some tests once all these changes are merged and dependencies are updated. Right now there are too many dependencies on unmerged/unreleased PRs to be able to write tests easily. |
Currently, people testing with Java 17 must add an awkward
-DargLine=
directive with theAdd-Opens
modules from the core version they are testing. This PR applies a trick to dynamically set this based on the values inMANIFEST.MF
.With this in place, anyone with a sufficiently recent core (2.341+), test harness (1721.v385389722736+), and
maven-hpi-plugin
(this PR) should be able to effortlessly do Java 17 testing and indeed enable Java 17 in theirJenkinsfile
. Once this is merged, I will try to do a release and wrap this and the test harness change into a new plugin POM release so that the requirement just becomes "core 2.341+ and plugin POM 4.40+".Tested with
workflow-job
and Java 17: