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

Modernize the plugin to java 11 #26

Merged
merged 4 commits into from
Sep 7, 2022

Conversation

AayushSaini101
Copy link
Contributor

Modernize the plugin to java 11.

pom.xml Outdated
~ hpi-plugin.version: The HPI Maven Plugin version used by the plugin..
~ stapler-plugin.version: The Stapler Maven plugin version required by the plugin.
-->
<java.level>8</java.level>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The most recent parent pom no longer requires java.level. I've updated the document to show that correction.

Suggested change
<java.level>8</java.level>

@MarkEWaite
Copy link
Contributor

Thanks very much!

When I use your change, there is a test that fails if I run mvn clean verify. I believe that the test failure can be resolved by using the plugin bill of materials as described in the Contributing to Open Source document and in the pre-release of the tutorial. Would you like to make that change in the pull request to use the plugin bill of materials?

Would you also be willing to add a Jenkinsfile in the pull request so that a job will be available on ci.jenkins.io to monitor this repository?

@MarkEWaite
Copy link
Contributor

@AayushSaini101 I'd be very grateful if you'd be willing to experiment with the tutorial that is being assembled from the "Contributing to Open Source" document. The tutorial pull request is available at jenkins-infra/jenkins.io#4806 .

When the pull request build completes, a preview of the tutorial will be available at https://deploy-preview-4806--jenkins-io-site-pr.netlify.app/doc/developer/ in the section labeled "Improve a Plugin - Tutorial". We expect that the tutorial will have completed review and will be live on https://www.jenkins.io/doc/developer/ before the end of September 2022.

@AayushSaini101
Copy link
Contributor Author

Thanks very much!

When I use your change, there is a test that fails if I run mvn clean verify. I believe that the test failure can be resolved by using the plugin bill of materials as described in the Contributing to Open Source document and in the pre-release of the tutorial. Would you like to make that change in the pull request to use the plugin bill of materials?

Would you also be willing to add a Jenkinsfile in the pull request so that a job will be available on ci.jenkins.io to monitor this repository?

new
@MarkEWaite Thank you very much Sir for reviewing my PR. When I run mvn clean verify. All the test cases passed successfully. Including the <java.level>8</java.level> as well excluding the <java.level>8</java.level>.

@MarkEWaite
Copy link
Contributor

MarkEWaite commented Sep 7, 2022

Thanks for sharing the example. I see the same success on Windows as you see. When I run the tests on a Red Hat Enterprise Linux 8.6 with Java 11.0.16.1, I see the test failure. When I run on a Debian machine, I don't see the test failure. I can't explain why that test would be platform specific. That is quite surprising.

Do you mind if I push the bill of materials change to this branch as a check to confirm that resolves the issue that I am seeing?

The removal of java.level is optional. I suspect it won't be made mandatory for at least a few more releases of the parent pom. No objection from me if you leave it in, though there will be a future release of the parent pom that likely mandates the removal of the java.level property.

@AayushSaini101
Copy link
Contributor Author

Sure, sir, You can push the bill of materials.

Simplify the management of plugin versions for tests by using the plugin
bill of materials to provide version numbers for the test dependencies.

Require Jenkins 2.332.4 because it is a recommended version from
https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/
Test JDK 8, JDK 11, and JDK 17
@MarkEWaite MarkEWaite merged commit 2e98a70 into jenkinsci:master Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants