0

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

一个功能看起来像这样。注意 guava 14.0.1 被列为捆绑包。

 <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”依赖项都在那个番石榴包中。具有适合该范围的版本。

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

4

1 回答 1

1

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

于 2013-07-24T19:23:38.260 回答