-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Supporting jakarta namespace #3836
Comments
This is a quite delicate issue and has not been decided yet, and any comment or contribution in this area are more than welcome, however IMO the best direction and the current plan (no ETA yet) is aiming for support of both The idea is to have parallel releases of original (let's say A more comprehensive solution - again depending on how things evolve - would include refactoring the next major version to introduce a compatibility layer, this would however need much more effort than artifact transformation at build/deploy time. I would say that in any case it's not an option to maintain 2 parallel major release lines for Again and as always contributions are appreciated. |
see also #3849 (comment) |
See my PR #3852 @frantuma I see your reasoning regarding the support of both namespaces and agree that it would be good from a maintainers POV. However I feel that neither transformer nor a compatibility layer are good solutions from a users perspective. JAXB: Clear cut with v3.0.0 I personally would prefer to maintain two major releases for the time being and deprecate the javax version as soon as reasonable. I'm really willing to support you on this, so please let me know if this is a step towards a solution or not. |
@strangelookingnerd thanks a lot for your contribution in this area! We are still identifying the best achievable solution, considering both user experience and maintenance effort, and while I see your point in having 2 "clean" separate release lines until I feel we are more in a position like Jackson's, as its maintainer says in a comment for a slightly related ticket, and their solution seems to address similar problems, until next major release. I can understand that it doesn't look so clean, but I'd say this whole thing has not been really "clean" from the start.. Can you maybe elaborate on I am adding here as reference a set of links related to Jackson work in this area for 2.12 (shading with package renaming and different classifier), even though probably the eclipse transformer tool gets a bit further (e.g. OSGi related changes, etc)
and
and
and |
I feel it's hard to work with the BOMs and transitive dependencies. For example: Maybe I did it all wrong but to my understanding:
still has transitive dependencies to the "non-jakarta" modules and I would not know how they could change that to be fair. Thinking of a clean solution for a transformation to achieve what was done in my PR gives me a major headache. But maybe thats just me. |
This is good feedback, thanks. I will analyze this a bit more and share some thoughts probably next week, whatever additional comment/thought in the meantime is welcome, particularly on further drawbacks of the transform solution. |
Any updates on this? |
Jakarta support is planned for upcoming release, probably within next week; we have also considered @strangelookingnerd input and work on this, and we dropped idea to take Jackson path with The planned solution still makes use of transformers, but providing a separate In the medium term we will probably have the default artifacts supporting Will keep updates in this ticket |
@frantuma This is great news and +1 for the planned solution. Any way I could contribute? |
@strangelookingnerd thanks! I'll ping when I have the PR ready / merged, what will be missing is possibly some (The PR will introduce a new module |
please see #3881 implementing what mentioned above. |
Closing as Jakarta artifacts are available since version 2.1.7, see wiki, maven readme and gradle readme. |
FWTW, Jackson 2.13 drops classifier path and does a full fork instead, so that there are 2 modules on https://github.com/FasterXML/jackson-modules-base/ namely
These live in different Java packages (as well as have different Maven coordinates), so upgrade would not be fully transparent to users; but on plus side both can co-exist if need be. I assume it is also possible to just use (1) and do fancy auto-magic bytecode manipulation. But thought I'd mention the new alternative in case it might be of interest, one Jackson 2.13 gets released (within a month or two). |
@cowtowncoder Thanks for the heads up! Reopening ticket to keep track of work needed when updating to Jackson 2.1.3+ |
The current version of the swagger-jaxrs2-jakarta module is referencing the the jackson module with the 'jakarta' classifier. It seems that the publication of this artifact is revoked, breaking the module. As a workaround, i'm currently ignoring the dependency and manually importing it.
|
@jsikkes not sure what you mean by "revoked"; 2.12.1 (to 2.12.4) version with |
In "io.swagger.core.v3:swagger-core:2.2.9" I see still the dependencies to "javax.validation.constraints" and "javax.xml.bind.annotation" which should be replaced by their "jakarta" counterparts. |
As mentioned in wiki the jackarta artifacts are using the |
Are there any plans to support jakarta namespace (jakarta ee 9) in swagger? With each passing day there are more libraries that have migrated to the jakarta namespace which is incompatible with javax namespace.
The namespace incompatibility will slowly lead to developers having to choose between using swagger or remaining on older versions of libraries that are still compatible with jakarta.
For example, the latest version of Jetty supports Jakarta namespace and is now incompatible with the javax namespace which means that one cannot upgrade to the latest version of Jetty and continue using swagger.
The text was updated successfully, but these errors were encountered: