-
Notifications
You must be signed in to change notification settings - Fork 928
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
introduce jakarta version of artemis-cdi-client #5479
base: main
Are you sure you want to change the base?
Conversation
This looks like you manually copied the code to the new module and then changed it. None of the other -jakarta modules, such as artemis-jakarta-client which this relies on, were implemented that way with their own committed sources. Instead, the new module brings in the related original javax module code itself during the build and transforms it. That way, one set of code exists to update (or mostly not, in the case of artemis-cdi-client) and there is no need to synchronize changes or scope for them to diverge. If creating this module then it should ideally be implemented the same way, especially as the original module is so rarely updated, mentioned, or seemingly used that discussing deleting even it came up last month just before you popped up asking about it (seemingly the first to do so). |
- we have to remove the `@Override` annotation here because otherwise the compilation of artemis-cdi-jakarta-client will fail due to those methods no longer being a part of jakarta ee 9+
Thanks for the feedback! I wasn't aware of how this transformation was done in the other modules. As far as I can tell using the transformer plugin worked, with two exceptions.
I have never worked with this transformer plugin before though, so it would be great if someone could take another look, maybe there is a better solution. |
I have never worked with the plugin either but had a dig and found that the plugin actually should process the ServiceLoader services file, and looking at it with debug logging it actually does do so and even indicates that the name should be updated, but then it just copies it with the original name. Looking closer at how the plugin works, its really just some glue and it is the Eclipse Transformer doing the main work underneath. I had a look there and found the ServiceLoader processing, and looking at the changes to that file it looks like it specifically had a fix that seems like it is around this issue (eclipse-transformer/transformer@c2207ce) of not updating the file because it only needs renamed and has no change to the content. Unfortunately, the plugin is a bit old and is using an older version of the transformer. Trying to have the build use newer versions with the fix above, it seems they aren't compatible. Given it is just one file, I don't think its worth switching out to a different newer plugin just to get this working seamlessly. Your workaround of just adding the new services file directly seems fine for this specific case. However I also don't think we should leave the incorrect services file around. Running an execution of the maven-clean-plugin during the generate-sources phase, just after the transform is done, to delete the copy is probably the simplest thing for now. E.g:
|
The new module should probably be named The new module should be added to the bom. This change needs a Jira raised: https://issues.apache.org/jira/browse/ARTEMIS which should then be referenced in the PR title (see most other PRs except dependabot's). The commits should be squashed, and the Jira referenced in the commit message (see existing commit history) |
This PR introduces
artemis-cdi-jakarta-client
, a Jakarta (i.e. Jakarta EE 9+) equivalent ofartemis-cdi-client
. The new module is based onartemis-cdi-client
with all necessary changes to make it jakarta-compatible. No other changes were made. You can review the individual steps in the commit history.I will also post about this on the dev mailing list and would appreciate any feedback.