-
Notifications
You must be signed in to change notification settings - Fork 664
WIP: [#8005] Update minimum release/source/target to JDK 21 #1992
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
base: main
Are you sure you want to change the base?
Conversation
jbonofre
left a comment
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.
I think we should update the CI in .githuh/workflows/build.yaml.
|
NB: instead of using WIP in the title, we can use draft PR. |
|
@jbonofre Heads up-- there is a build break in karaf-maven-plugin holding up a clean compile. I'm not familiar with the build process for that plugin. |
|
It's simply because we have dependency not JDK21+ compatible, so we have to update:
The culprit is ASM :) |
asm is latest v9.8? Update: mvn -X debug output confirms the issue is with asm Update 2: Looks like older plugins are pulling it in. I'm running it down now Update 3 (2025/09/02): Currently, a couple tests are failing b/c the jre.properties and config.properties files (with eecap) need to be centralized to a single folder and referenced/copied around for consistency. |
93dcbf5 to
3deadbb
Compare
|
Files containing 'eecap' Property file candidates for consolidation or move to etc/appended-resources to be shared across projects |
|
@mattrpav There are some |
|
I will fix the karaf-maven-pluginn and finalize this one with @mattrpav and @holgerfriedrich |
Thank you! edit: I updated and the build completes! A couple new commits added to the branch. |
|
Great. I need that included to change the Jaas stuff which does no longer run on JDK25. Your commit regarding the javase changes matches the changes I made on my system. 👍 |
|
I merged deps for karaf maven plugin. Rebasing should help too. |
|
The |
|
Just pushed a quick improvement to see if it helps :) |
|
itest/test/../JavaSecurityTest hanging on pax-exam init |
|
Do you think this is related to the SecurityManager? I have the feeling updating the remaining packages will be easier once we get the CI lifted to JDK21. |
|
@holgerfriedrich I tried adding it to the surefire plugin in both places in the pom.xml and the maven cli, but no luck. I believe it must be added at JVM startup to work, and placing it in a static code block would not be early enough in the startup sequence. cli: pom.xml edit: Neither of these worked: JavaSecurityTest: |
|
I have not yet checked how the itests are launched. |
|
Updated the root pom.xml and was able to get the system property on the command line, verified with maven in debug mode. |
|
w00t! I set the JavaSecurityTest to @ignore and everything else passed! If we can solve for the JavaSecurityTest the change set is ready for merge. |
|
Commenting out the 2 tollowing lines in
If not removed, the first line prevents the startup of the container. Looking at the spec for the property show above, it refers to the SecurityManager again. I am not sure if removing those two lines renders the whole test case useless. @jbonofre any recommendation? |
|
@holgerfriedrich that is a good point. We may need to make a ticket to re-enable some sort of security test and also check in w Apache Felix on what the plans are for OSGi security now that the SecurityManager is going away. I’m suggesting this plan:
@jbonofre you good with this plan? |
|
It sounds reasonable to me. I would just suggest to create the ticket now and add link to the ticket in the @ignore message. |
itests/test/src/test/java/org/apache/karaf/itests/JavaSecurityTest.java
Outdated
Show resolved
Hide resolved
|
Ok.. so one idea is to use MRJ and have a separate JaasHelper class that is JDK 21+. The catch would be that we'd have to convert a bunch of classes to use JaasHelper everywhere as the facade to JAAS API. If this works, we may be able to preserve JDK 17 compatibility with Karaf 4.5.0 Specifically these would need to be updated: https://github.com/search?q=repo%3Aapache%2Fkaraf%20AccessController&type=code edit: I think this might be more work that it is worth and confusing for ppl that write custom adapters that use the JAAS API. I don't know of any frameworks that are baseline JDK 17, but have a problem with JDK 21. I think base lining Karaf v4.5.0 to JDK 21 should be ok. If everyone is good, we should merge this PR and then I can start on the JAAS API changes -- or do we want the JAAS API changes on the same PR (separate commits)? |
|
Merging this PR would be highly appreciated. |
|
Hi, is there already a decision how to proceed? |
|
@holgerfriedrich changes have been made already on the The purpose is to have JDK21+ min for Karaf 4.5.x (4.4.x stays as it is). Karaf 4.4.9 is coming (I'm finalizing the prep). 4.5.0 will follow. I will rebase/resume this PR (and others). |
No description provided.