-
Notifications
You must be signed in to change notification settings - Fork 462
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
Move to Java 11 or Java 17 for next major iteration of gitlab4j-api #817
Comments
So would this mean that you aren’t guaranteeing that it’ll work in Java 8? Or that it won’t run on Java 8 at all? Maybe as a first step go to Java 11, that’s what other libraries are doing. |
Some updates about updating to next major Java LTS. I tried to summarized what I learned about Java end of life and adoption of Java 17 in the industry. Spring 6 baseline will be Java 17+ and Jakarta EE 9. Spring Boot 3 based applications will require a minimum of JDK 17 at runtime. According to JRebel Java Developer Productivity report 2022, According to https://endoflife.date/java
As I don't plan to release a new major release of gitlab4j-api before 2023, I think the next major release will require a minimum of JDK 17. In the meantime, I will continue to support Java 8 and release new version of gitlab4j-api 5.x If you have any concern about the future of gitlab4j-api and especially about a JDK 17 requirement, feel free to add a comment here. References:
|
@jabby Thanks for your great work in maintaining the library! Could you do us a favor to mention these kinds of changes briefly in the changelog when we do a release? Thank you so much!!! |
Thank you for your work! It would be great if you could go for JDK 11 first, but obviously up to you to decide. |
For a library it make sense to go for JDK 11 first, frameworks like Quarkus supports both Java 11 and Java 17 (using JDK 11 as baseline) and even Spring 6 (with JDK 17 as baseline) will be available on Q4 2022, and even then don't expect that the migration to Spring 6 will be massive for at least one year or two. IMHO, if you want to aggressively set the baseline of newer JDK versions my proposal is to follow the latest LTS minus 1 (counting LTS only). To illustrate this:
So what this means is that current baseline could be JDK 11, and when JDK 21 is released (on Sep 2023) then migrate to JDK 17 as baseline, the baseline doesn't mean that a version will not work with newer JDKs (you could potentially use a Java 7 lib in a Java 18 app without issues), it just mean that it will not work on older JDKs. Anyway, this is just my personal opinion and you could choose any baseline you want. |
I would appreciate support for Spring Boot 3. We wanto to support it in our application soon and temporarily use a custom built jar from a fork: https://github.com/b-fein/gitlab4j-api in which we changed the namespace from javax to jakarta. |
Support for Jakarta is crucial. Spring Boot 3 need it. |
This means JDK17 is not supported yet?? |
Any updates/ETA on Spring Boot 3.x support, @jabby? |
@dousp: This lib works perfectly with Java 17. I am using it with Java 17 in standalone scripts like print-groups-and-projects-tree executed with JBang. Or in Quarkus based app like ucascade also using Java 17. |
I tend to agree with @berezovskyi here. One usage I know of this library is in the https://github.com/jenkinsci/gitlab-branch-source-plugin project (cc: @jetersen, @mifitous) Jenkins has set its minimal Java version policy to Java 11, so doing Java 11 for a while might be less disruptive for them. Currently the ideas for the next versions do not really require Java 17. The only thing I could think of is to use records, but no decisions has been made so far. |
Which version do you use?
|
For me, the problem is the WebHookManager. It need a HttpServletRequest, but use javax instead of jakarta. |
My project temporarily uses this repo: derkoe/gitlab4j-api see from here : pr 841 |
But that's not related to the JDK version? |
@jabby are you planning to migrate the library to Java 17? |
Hello, As we are moving our projects to new version of Spring Boot (3.x), it implies also a move to version 17 of jdk. To be compatible with more use cases, I tried to keep compatibility with version 11. Feel free to comment related PR (#943) which has been successfully tested locally (with both jdk 11 and 17) with our use of gitlab api ^^ Have a nice day |
I would love to see at least one version target JDK 11 so if we need to, we can backport and patch it. But yes JDK 17 should not be an issue for Jenkins plugins to adapt and will give users a reason to adopt Java 17. FYI it was only recent that Jenkins switched to requiring Java 11 If you have a look at march numbers: Jenkins Version Stats 2023 March Jenkins have had an increasing number of people getting to update their older servers. The actual usage of https://github.com/jenkinsci/gitlab-branch-source-plugin is coming from the wrapped plugin dependency of this library which is located here: https://plugins.jenkins.io/gitlab-api/ Jenkins has had a tendency to wrap dependency into plugins to avoid class loading issues. You can see the GitLab API plugin adoption here: https://stats.jenkins.io/pluginversions/gitlab-api.html |
So as discussed in #926 we are now working on a On this branch we have decided to require Java 11 as minimal version (using Java 17 will be possible as well) and we will use Jakarta EE components that are using the As I wrote earlier, you can use Java 17 already today with the current version (like |
Please check if the release
So that we know if we are on the good path to prepare the |
With 6.0.0-rc.1, looks good to me with our use cases. |
I do not actively use GitLab so if any kind soul wants to contribute to plugin consumers in Jenkins that would be appreciated. But I would assume the changes would be fine. |
@jmini I tested release 6.0.0-rc.1 and it works for me. |
Hi. I'm trying to set the merge_commit_template using ProjectApi. I've noticed that it was introduced in 6.X Is 6.0.0-rc.4 uploaded to maven central repo? Best regards |
Right now: On the |
As maintainer, I don't want to support Java 8 anymore.
I want to upgrade to a newer LTS version of Java. I'm not sure if I will jump to latest LTS (Java 17) or if I migrate to Java 11 first.
If you use gitlab4j-api, feel free to comment this issue.
The text was updated successfully, but these errors were encountered: