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

Test with Java 21 #319

Merged
merged 3 commits into from
Nov 20, 2023
Merged

Test with Java 21 #319

merged 3 commits into from
Nov 20, 2023

Conversation

MarkEWaite
Copy link
Contributor

@MarkEWaite MarkEWaite commented Oct 6, 2023

Test with Java 21

Java 21 released Sep 19, 2023. We'd like to announce full support for Java 21 in early October and would like the most used plugins to be compiling and testing with Java 21.

The acceptance test harness and plugin bill of materials tests are already passing with Java 21. This is a further step to improve plugin readiness for use with Java 21 and for development with Java 21.

  • Use parent pom 4.74 and latest bom
  • Test Java 21 and Java 17

Testing done

Confirmed tests pass with Java 21.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

The bom-2.387.x line is no longer being updated.  Let's use the most
recent version of that bom so that the latest set of dependency
updates are included for that line.
@MarkEWaite
Copy link
Contributor Author

MarkEWaite commented Nov 19, 2023

@olivergondza, @aheritier, or @olamy would you be willing to review and merge this? The tests are passing and we'd like to regularly run those tests on Java 21 whenever pull requests are submitted to the repository.

No release is needed, just a merge to the master branch.

@aheritier
Copy link
Member

I prefer to let others review it as I am not involved anymore but take care that when you'll compile the plugin for Java 21 it will require to launch maven builds with Java 21 (Not a problem for it) but for users it might have some impacts if they use the same JVM for the build tools and not a toolchain solution. I think that today with the release parameter of javac it should be smoother and not really an issue to use Java 21 and still target something older for the project you build.

@MarkEWaite
Copy link
Contributor Author

Thanks @aheritier for your comment.

when you'll compile the plugin for Java 21 it will require to launch maven builds with Java 21

As far as I can tell, this pull request does not change that behavior. When a Jenkins controller runs a maven type job with this plugin, it uses the Java version of the controller. We already support Java 11, Java 17, and Java 21 with Jenkins controllers, so the concern you've expressed already exists, even without this change. We warn users of that risk in the plugin documentation.

@olamy
Copy link
Member

olamy commented Nov 20, 2023

I still don't understand why we remove java 11 from the testing matrix as it will be supported by Jenkins for still long time.
but merging it.

@olamy olamy merged commit 74b2a7c into jenkinsci:master Nov 20, 2023
14 checks passed
@MarkEWaite MarkEWaite deleted the test-with-java-21 branch November 20, 2023 02:33
@MarkEWaite
Copy link
Contributor Author

I still don't understand why we remove java 11 from the testing matrix as it will be supported by Jenkins for still long time. but merging it.

The maven plugin is tested every week with Java 11 through the plugin bill of materials.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants