Skip to content

Jakarta classes support for jaxb2-basics #162

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

Closed
yurii20041 opened this issue Jan 3, 2023 · 20 comments
Closed

Jakarta classes support for jaxb2-basics #162

yurii20041 opened this issue Jan 3, 2023 · 20 comments

Comments

@yurii20041
Copy link

Hi,
jaxb2-basics isn't compatible with Jakarta EE 9 classes provided by Spring 6.
E.g. JAXBEqualsStrategy uses javax.xml.bind.JAXBElement inside the logic that isn't compatible with the latest Spring version.

I'm wondering, if you have any plan to fix it?
Thanks!

@patrodyne
Copy link

patrodyne commented Jan 17, 2023

My fork at hisrc-basicjaxb replaces the javax.xml.bind imports with their newer jakarta.xml.bind equivalents. My fork's releases, starting with v2.0.0 in the Maven Central Repository, support the Jakarta EE XML Binding, Specification v3.0.

Note: If you are interested then be sure to review that project's readme for changes to package names and namespaces. If you have questions about my fork, please post any questions over there.

@yurii20041
Copy link
Author

Hi @patrodyne,
Unfortunately, I can't find the mentioned 2.0.0 version for hisrc-basicjaxb in the maven central repo:
https://repo1.maven.org/maven2/org/patrodyne/jvnet/hisrc-basicjaxb/

I'm looking forward to your clarification.
Thanks!

@patrodyne
Copy link

No problem, see Clarification of hisrc-basicjaxb-plugins.

@laurentschoelens
Copy link
Collaborator

Hi @yurii20041
PR provided for this : #165
Feel free to comment

@proclos
Copy link

proclos commented Mar 16, 2023

I just used this fork of your project with JAXB version 4.0.2 (Jakarta):
https://github.com/qantasloyalty/lsl-jaxb3-basics

Though it claims only version 3 support, it seems to work also for version 4 already.
I tried it out in the scope of quarkus3, Alpha5.

Maybe you can/want to reintegrate this fork?

@laurentschoelens
Copy link
Collaborator

@proclos : thanks for your comment. I think that people should have done PR with their forks (I've seen many forks from the original @highsource work from both jaxb-basics and jaxb-plugin).

Since jaxb 3 and jaxb 4 are not so different (jaxb 4 has jdk11 baseline), the artefact should just work for both.

@mattrpav will soon migrate both jaxb2-basics and plugin to jakarta jaxb support I think

@linuxmin
Copy link

Any updates on this? @laurentschoelens @mattrpav

@laurentschoelens
Copy link
Collaborator

Hi @linuxmin : sorry but I just provided the PR, I'm not official contributor in highsource projects.
@mattrpav : If I can help on this, or do some rework, just tell me, I'd be glad to help more on this migrations.

@mattrpav
Copy link
Collaborator

Hey @laurentschoelens @linuxmin - hoping to get to this shortly. We need it with ActiveMQ as well. I have been tied up getting jakarta work going over there as well. Thanks for the patience. For sure, we'll get this going.

Questions:

  1. I think we should cleanup the package names (remove version # and _). Does anyone see any issues with package names changing? My thinking is that these classes get added in via generation and aren't used directly. Also, the previous classes had jaxb2 in the name so that would justify supporting a change imo. Thoughts?

  2. Along those lines, going to see about tidying up the maven gav to org.jvnet.jaxb (no vers number in the groupId). If we need multi-version we can handle that in the artifactId. Any issues?

Thanks!
Matt

@linuxmin
Copy link

linuxmin commented Apr 4, 2023

@mattrpav Thanks for the quick answer, that's good news! Very much appreciate your work for ActiveMQ too, as we need the Jakarta Client as well for migration to the Jakarta namespace. Keep up the good work!

@laurentschoelens
Copy link
Collaborator

laurentschoelens commented Apr 4, 2023

Hey @laurentschoelens @linuxmin - hoping to get to this shortly. We need it with ActiveMQ as well. I have been tied up getting jakarta work going over there as well. Thanks for the patience. For sure, we'll get this going.

Questions:

  1. I think we should cleanup the package names (remove version # and _). Does anyone see any issues with package names changing? My thinking is that these classes get added in via generation and aren't used directly. Also, the previous classes had jaxb2 in the name so that would justify supporting a change imo. Thoughts?

That what I made by changing package name to jaxb3_basics. If you want me to do the refacto to jaxbbasics package name, tell me, I can rework on this

  1. Along those lines, going to see about tidying up the maven gav to org.jvnet.jaxb (no vers number in the groupId). If we need multi-version we can handle that in the artifactId. Any issues?

No issues on this too.

Thanks! Matt

@timomeinen
Copy link

Any news on the planned migration plan?

In the meanwhile I am using hisrc-basicjaxb-plugins from @patrodyne and it works nicely.

@laurentschoelens
Copy link
Collaborator

Hi @timomeinen : work is still in progress
Hope to get well soon.

@marinkobabic
Copy link

Hi @laurentschoelens @mattrpav what is the actual state here? Should we wait for the new version or look for an alternate solution?

@laurentschoelens
Copy link
Collaborator

Hi @marinkobabic
We merged jaxb2-basics in main repo jaxb-tools (which is former maven-jaxb2-plugin).
We're working on bugfixes on v2.3 version of jaxb and then move on to provide the first version of v3 jaxb jakarta version

If you need jakarta support before official release, see this comment which propose a quickwin by replacing javax package import by jakarta ones after generation : highsource/jaxb-tools#233 (comment)

Tested OK and jaxb-basics-runtime doesn't have jaxb 2.3 dependencies in my opinion so it's OK.

@marinkobabic
Copy link

@laurentschoelens thanks for the feedback. Is my understanding correct: Your suggestion is to go with the version 0.13.1 and to replace javax package imports until you have the official version?

Any idea when roughly the official version v2.3 will be available?

@laurentschoelens
Copy link
Collaborator

@laurentschoelens thanks for the feedback. Is my understanding correct: Your suggestion is to go with the version 0.13.1 and to replace javax package imports until you have the official version?

Any idea when roughly the official version v2.3 will be available?

I don't clearly understand your answer.
My suggestion is to use jaxb-maven-plugin with actual jaxb-basics release and add the ant part as suggested my previous comment to make generated code goes from javax to jakarta
If you're not using maven-jaxb2-plugin, I don't know if actual version of jaxb-basics can do the job.
Could you share more context on this one ? What kind of plugin are you using and what kind of error do you encounter ?

@laurentschoelens
Copy link
Collaborator

laurentschoelens commented Oct 7, 2023

@linuxmin / @yurii20041 / @proclos / @marinkobabic and @timomeinen : we did release v2 / v3 / v4 versions of jaxb-tools recently with jakarta support

@laurentschoelens
Copy link
Collaborator

Fixed in https://github.com/highsource/jaxb-tools/releases/tag/3.0.0 and https://github.com/highsource/jaxb-tools/releases/tag/4.0.0

@david0
Copy link

david0 commented Feb 29, 2024

Great that a way has been found to continue Alexeys legacy!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants