Closed diversit closed 11 months ago
thanks @diversit ! will give it a quick try and then merge this.
This works as expected with Keycloak 22 :+1: However, I can also confirm that it does not work in older versions: java.lang.NoClassDefFoundError: jakarta/ws/rs/WebApplicationException
.
So v4.0.0 with an explicit note makes sense.
For compatibility with KC22: replaced Java EE with Jakarta EE. Test: replaced obsolete 'com.github.stefanbirker:system-rules' dependency with a similar library 'uk.org.webcompere:system-stubs-junit4'.
Note: this change might NOT be compatible with KC < 22.x !
Motivation
Metrics not compatible with Keycloak 22 due to change from Java EE to Jakarta EE. https://github.com/aerogear/keycloak-metrics-spi/issues/168
What
Replaces Java EE imports with Jakarta EE imports. No further code changes.
Why
Keycloak 22 replaced Java EE with Jakarta EE making this library not compatible anymore, throwing a ClassNotFoundException at startup.
How
Replaces Java EE imports with Jakarta EE imports. No further code changes.
For test had to replace the old (and obsolete?)
system-rules
dependency with a more current version byuk.org.compere
due to module issues since Keycloak 22 now also is just for Java 17 (Java 11 compatibility was dropped).Updating the dependency fixed this issue.
Verification Steps
Checklist:
Progress
Additional Notes
Due to the changes in KC 22 (dropped Java 11 compatibility, change from Java EE to Jakarta EE), these changes are likely not compatible with KC versions < 22.x.