为什么从 JAXB 参考实现中删除了 AnnotationReader? [英] Why has AnnotationReader been removed from JAXB reference implementation?
问题描述
com.sun.xml.bind.v2.model.annotation.AnnotationReader
类是 jaxb-impl 2.1.6 的一部分,但在 2.1.7 中已被删除.有人知道为什么吗?
The class com.sun.xml.bind.v2.model.annotation.AnnotationReader
was part of jaxb-impl 2.1.6, but has been removed in 2.1.7. Does anybody know why?
推荐答案
JAXB 工件在 2.2.11
中进行了重组,因此在 jaxb-runtime
和jaxb 核心
.AnnotationReader
不是唯一的.主要原因是(可能)由于依赖结构需要重新排列一些类的 mavenisation.
JAXB artifacts were restructured in 2.2.11
so a few classes were moved between jaxb-runtime
and jaxb-core
. AnnotationReader
is not the only one. The main reason is (probably) the mavenisation which required rearranging a few classes due to dependency structure.
不幸的是,旧的工件 com.sun.xml.bind:*
有一点错误的依赖结构,所以如果你只是使用 jaxb-impl
之前你还需要jaxb 核心
.如果这是您的问题,您应该转到新的 org.glassfish.jaxb:*
工件,因为它们具有正确的结构.org.glassfish.jaxb:jaxb-core
是 org.glassfish.jaxb:jaxb-runtime
的依赖项,它取代了旧的 org.glassfish.jaxb:jaxb-impl
.
Unfortunately the old artifacts com.sun.xml.bind:*
has a bit wrong dependency structure so if you just used jaxb-impl
before you'd also need jaxb-core
. If this was your problem you should move to the new org.glassfish.jaxb:*
artifacts as they have the right structure. org.glassfish.jaxb:jaxb-core
is a dependency of org.glassfish.jaxb:jaxb-runtime
which replaces the old org.glassfish.jaxb:jaxb-impl
.
另见:
我应该使用哪些工件在我的 Maven 项目中使用 JAXB RI?
这篇关于为什么从 JAXB 参考实现中删除了 AnnotationReader?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!