【发布时间】:2017-07-13 15:55:33
【问题描述】:
我正在使用一个(Maven)依赖项,它本身依赖于xml-apis。不幸的是,这个包的存在现在会在我们的 OSGi 环境中引起冲突(如果它应该相关,请参见下文)。
查看 JAR 内容,我发现无论如何似乎都存在于当前 JRE 中的类。所以,我的问题是:排除这种依赖是否安全?
总的来说:是否有任何关于类的官方文档,这些类曾经是独立的依赖项,现在已集成到 JRE 中?
当创建的 xml-apis 包存在时,这里提到的 OSGi 错误:
Bundle was not resolved because of a uses contraint violation.
org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource my.company.plugin [osgi.identity; osgi.identity="my.company.plugin"; type="osgi.bundle"; version:Version="2.0.0.201707131542"; singleton:="true"] because it is exposed to package 'javax.xml.transform' from resources org.eclipse.osgi [osgi.identity; type="osgi.bundle"; version:Version="3.11.1.v20160708-1632"; osgi.identity="org.eclipse.osgi"; singleton:="true"] and xml-apis [osgi.identity; type="osgi.bundle"; version:Version="1.4.1.bnd-vA0Q7A"; osgi.identity="xml-apis"] via two dependency chains.
【问题讨论】:
标签: java maven dependencies