gpt4 book ai didi

java - karaf features-maven-plugin add-features-to-repo "Unable to find suitable bundle for dependency"尽管它就在那里

转载 作者:行者123 更新时间:2023-12-01 14:18:52 25 4
gpt4 key购买 nike

我正在尝试使用 features-maven-plugin add-features-to-repo 目标,但遇到了一个奇怪的错误。

其中一个功能如下所示。请注意 guava 14.0.1 被列为 bundle 。

 <feature name='jersey-container-servlet-core' version='2.0'>
<bundle start-level="55">mvn:org.glassfish.jersey.core/jersey-common/2.0</bundle>
<bundle start-level="55">mvn:org.glassfish.hk2.external/asm-all-repackaged/2.1.88</bundle>
<bundle start-level="55">mvn:org.glassfish.hk2/hk2-api/2.1.88</bundle>
<bundle start-level="55">mvn:javax.ws.rs/javax.ws.rs-api/2.0</bundle>
<bundle start-level="55">mvn:org.glassfish.hk2.external/javax.inject/2.1.88</bundle>
<bundle start-level="55">mvn:com.google.guava/guava/14.0.1</bundle>
<bundle start-level="55">mvn:org.glassfish.jersey.core/jersey-client/2.0</bundle>
<bundle start-level="55">mvn:javax.validation/validation-api/1.1.0.Final</bundle>
<bundle start-level="55">mvn:javax.annotation/javax.annotation-api/1.2</bundle>
<bundle start-level="55">mvn:org.glassfish.jersey.core/jersey-server/2.0</bundle>
<bundle start-level="55">mvn:org.glassfish.hk2/hk2-utils/2.1.88</bundle>
<bundle start-level="55">mvn:org.glassfish.hk2.external/cglib/2.1.88</bundle>
<bundle start-level="55">mvn:org.glassfish.hk2/hk2-locator/2.1.88</bundle>
<bundle start-level="55">mvn:org.glassfish.hk2/osgi-resource-locator/1.0.1</bundle>
<bundle start-level="55">mvn:org.glassfish.jersey.containers/jersey-container-servlet-core/2.0</bundle>
</feature>

当这个插件运行时,我收到这些警告:

[INFO]  Generating feature jersey-container-servlet-core from org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.0:compile
[WARNING] Unable to find suitable bundle for dependency com.google.common.collect ([14.0.0,15.0.0)) (required by jersey-container-servlet-core)
[WARNING] Unable to find suitable bundle for dependency com.google.common.util.concurrent ([14.0.0,15.0.0)) (required by jersey-container-servlet-core)
[WARNING] Unable to find suitable bundle for dependency javax.servlet ([2.4.0,4.0.0)) (required by jersey-container-servlet-core)
[WARNING] Unable to find suitable bundle for dependency javax.servlet.http ([2.4.0,4.0.0)) (required by jersey-container-servlet-core)
[WARNING] Unable to find suitable bundle for dependency javax.ws.rs ([2.0.0,3.0.0)) (required by jersey-container-servlet-core)
[WARNING] Unable to find suitable bundle for dependency javax.ws.rs.core ([2.0.0,3.0.0)) (required by jersey-container-servlet-core)
[WARNING] Unable to find suitable bundle for dependency com.google.common.base ([14.0.0,15.0.0)) (required by jersey-common)
[WARNING] Unable to find suitable bundle for dependency com.google.common.collect ([14.0.0,15.0.0)) (required by jersey-common)
[WARNING] Unable to find suitable bundle for dependency com.google.common.net ([14.0.0,15.0.0)) (required by jersey-common)
[WARNING] Unable to find suitable bundle for dependency com.google.common.primitives ([14.0.0,15.0.0)) (required by jersey-common)

例如,所有“com.google.common”依赖项都在该 Guava 包中。具有适合该系列的版本。

我不明白发生了什么事。谢谢

最佳答案

看起来您缺少一些必需的 bundle ,例如您还缺少提供 servlet api 的 bundle 。因此,您很可能需要添加对提供 servlet api 包的 pax-web 功能的依赖项。在我看来,警告消息可能是另一个隐藏的“错误”的结果。

关于java - karaf features-maven-plugin add-features-to-repo "Unable to find suitable bundle for dependency"尽管它就在那里,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17828109/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com