英文:
Quarkus and javax libraries
问题
I'm wondering if there is any technical reason behind the fact that Quarkus still relies on javax namespace instead of using the new jakarta namespace.
我想知道Quarkus仍然使用javax命名空间而不是新的jakarta命名空间是否有任何技术原因。
What confuses me more, is that many docs report the usage of Jakarta libraries (e.g. see here https://quarkiverse.github.io/quarkiverse-docs/quarkus-amazon-services/dev/amazon-dynamodb.html#_create_the_quarkusfruits_table) while the corresponding repository (https://github.com/quarkusio/quarkus-quickstarts/blob/main/amazon-dynamodb-quickstart/src/main/java/org/acme/dynamodb/FruitAsyncService.java) shows that in reality, Jakarta libs are not available.
更令我困惑的是,许多文档报告了Jakarta库的使用(例如在这里https://quarkiverse.github.io/quarkiverse-docs/quarkus-amazon-services/dev/amazon-dynamodb.html#_create_the_quarkusfruits_table),而相应的存储库(https://github.com/quarkusio/quarkus-quickstarts/blob/main/amazon-dynamodb-quickstart/src/main/java/org/acme/dynamodb/FruitAsyncService.java)显示实际上Jakarta库是不可用的。
From Jakarta EE 9 was released in 2020, so I guess this should be a change widely embraced by major frameworks like Quarkus.
Jakarta EE 9于2020年发布,所以我想这应该是被主要框架如Quarkus广泛采纳的变化。
I ask this, because I'm importing third party libraries which are using Jakarta namespace and this brings a lot of confusion.
我之所以问这个问题,是因为我正在导入使用Jakarta命名空间的第三方库,这带来了很多混淆。
Maybe there is a way to switch to the new Jakarta namespace that I couldn't see yet. Any way to achieve this?
也许有一种切换到新的Jakarta命名空间的方法,我可能还没有看到。有什么办法可以实现这一点?
英文:
I'm wondering if there is any technical reason behind the fact that Quarkus still relies on javax namespace instead of using the new jakarta namespace.
What confuses me more, is that many docs report the usage of Jakarta libraries (e.g. see here https://quarkiverse.github.io/quarkiverse-docs/quarkus-amazon-services/dev/amazon-dynamodb.html#_create_the_quarkusfruits_table) while the corresponding repository (https://github.com/quarkusio/quarkus-quickstarts/blob/main/amazon-dynamodb-quickstart/src/main/java/org/acme/dynamodb/FruitAsyncService.java) shows that in reality, Jakarta libs are not available.
From Jakarta EE 9 was released in 2020, so I guess this should be a change widely embraced by major frameworks like Quarkus.
I ask this, because I'm importing third party libraries which are using Jakarta namespace and this brings a lot of confusion.
Maybe there is a way to switch to the new Jakarta namespace that I couldn't see yet. Any way to achieve this?
答案1
得分: 2
Quarkus 3 将使用 jakarta 命名空间。
应该很快发布。在那之前,鼓励大家测试我们定期发布的 Alpha 版本。
更多详情请查看 https://quarkus.io/blog/road-to-quarkus-3/
英文:
Quarkus 3 will use the jakarta namespace.
It should be released soon. Until then, folks are encouraged to test the Alpha versions we regularly publish l.
See https://quarkus.io/blog/road-to-quarkus-3/ for more details
答案2
得分: 1
为了对@geoand的回答进行更详细说明,Quarkus尚未使用Jakarta命名空间的原因是,Quarkus平台中包含的所有组件都需要使用jakarta
。否则会混乱不堪!(您在自己的应用程序中也遇到了类似的混乱,因为您的一些依赖项已经迁移,而另一些则没有。)Quarkus中包含的一些库已经能够更快地切换,因此整体工作需要协调。由于从javax
切换到jakarta
是一个破坏性的变更,因此它伴随着Quarkus的主要版本升级。
在查看文档时,搜索引擎将带您去往哪个版本有一些运气成分,但然后您可以选择要查看的文档的版本。这允许您探索即将推出的功能,还可以确保您使用的是适用于您所使用版本的正确文档。对于主要的Quarkus文档,最新的夜间构建文档将是main
,然后您还可以选择Quarkus的发布版本。在更广泛的Quarkiverse中,没有通用的版本控制方案,但在右上角有一个类似的下拉菜单供选择版本。
英文:
To expand a bit on @geoand's answer, the reason Quarkus isn't already using the Jakarta namespace is that all of the components included in the Quarkus platform all need to be using jakarta
. Otherwise it would be a mess! (You're seeing this same mess in your own application, since some of your dependencies have moved and some haven't.) Some libraries included in Quarkus have been able to switch quicker than others, so the overall effort needs coordination. Since the switch from javax
to jakarta
is a breaking change, it's accompanied by a major version bump in Quarkus.
When looking at documentation, there's a bit of luck about which version a search engine will take you to, but then you can select which version's documentation to look at. That allows you to explore upcoming capability, and also make sure you're using the correct docs for the version you're using. For the main quarkus docs the latest nightly build's docs will be main
, and then you can also select Quarkus releases. In the broader Quarkiverse, there's no universal versioning scheme, but there's a similar drop-down for version selection, in the top-right.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论