xml-apis JAR 文件是否必要?



我正在使用一个(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.

您可以将 xml-apis 定义为项目的 pom 中的显式依赖项.xml范围为"提供"。然后,它将不是运行时依赖项的一部分。

相关内容

最新更新