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

Migrate example to StaplerRequest2 & StaplerResponse2 #620

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

ahmed-kamal2004
Copy link
Contributor

  • Migrate from StaplerRequest and StaplerResponse to "StaplerRequest2" and "StaplerResponse2" as the earlier are deprceated now.
  • Update the pom.xml dependencies preventing conflicts with new migrations and making pom.xml up to date.

Testing done

  • here is a screenshot testing "/hello" after migration
    Screenshot from 2025-01-02 03-25-54

@krisstern
Copy link
Member

@jenkinsci/lib-jenkins-stapler-support-developers please review

@jglick jglick changed the title Migrate to StaplerRequest2 & StaplerResponse2 Migrate example to StaplerRequest2 & StaplerResponse2 Jan 2, 2025
@jglick jglick merged commit 515e042 into jenkinsci:master Jan 2, 2025
14 checks passed
@@ -24,7 +31,7 @@
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>5.0.0</version>
<version>6.1.0</version>
Copy link
Member

Choose a reason for hiding this comment

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

This is Jakarta EE 11, while this repository is currently on Java EE 9.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for comment, I change it in a new pull request
but to make it clear, should change the version only or the whole dependency ?
because based on that commit
994adb3
the migration is towards Jakarta EE 9, thanks🙏🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

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

after returning to the mentioned commit, I found that I should have left the version to be 5.0.0, please tell me if I wrong.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, this should have been left at 5.0.0 (EE 9). When the repository is upgraded to e.g. EE 10 in the future (cf. #617), we can upgrade it then.

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.

4 participants