首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >opendaylight:karaf:如何重写父pom的依赖关系

opendaylight:karaf:如何重写父pom的依赖关系
EN

Stack Overflow用户
提问于 2018-07-23 05:44:44
回答 1查看 68关注 0票数 0

我正在编写一个ODL应用程序,我想在其中使用openstack4j。当我加载功能时,我遇到了以下问题:

代码语言:javascript
复制
    Error executing command: Unable to resolve root: missing requirement 
    [root] osgi.identity; osgi.identity=features-vlan; type=karaf.feature; 
    version="[0.1.0,0.1.0]"; filter:="(&(osgi.identity=features-vlan)
    (type=karaf.feature)(version>=0.1.0)(version<=0.1.0))" [caused by:
    Unable to resolve features-vlan/0.1.0: missing requirement [features-
    vlan/0.1.0] osgi.identity; osgi.identity=odl-vlan; type=karaf.feature;
    version="[0.1.0,0.1.0]" [caused by: Unable to resolve odl-vlan/0.1.0: 
    missing requirement [odl-vlan/0.1.0] osgi.identity; 
     osgi.identity=com.github.fge.jackson-coreutils; type=osgi.bundle; 
    version="[1.6.0,1.6.0]"; resolution:=mandatory [caused by: Unable to
    resolve com.github.fge.jackson-coreutils/1.6.0: missing requirement 
    [com.github.fge.jackson-coreutils/1.6.0] osgi.wiring.package; 
    filter:="(&(osgi.wiring.package=com.google.common.base)
    (version>=16.0.0)(!(version>=17.0.0)))"]]]

显然,jackson-coreutils想要版本16.0.0,而有效的pom指定了版本22。

因此,我在我的实现中尝试了以下技巧:

代码语言:javascript
复制
 <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <configuration>
              <instructions>
                <Embed-Dependency>openstack4j;inline=true</Embed-Dependency>
                <!-- same as in bundles4-test/pom.xml: -->
                <Import-Package>*</Import-Package>
              </instructions>
            </configuration>
        </plugin>

我希望依赖项openstack4j可以静态地添加到包中,但它不起作用。我该如何继续呢?

谢谢。

EN

回答 1

Stack Overflow用户

发布于 2018-07-23 06:37:36

因此jackson-coreutil依赖于比odlparent (22)老得多的芭乐版本。也许有更新版本的jackson-coreutil?如果没有,那么我认为您需要安装旧的16.x版本的guava,以满足jackson-coreutil的要求。希望版本16.x和22可以在同一个karaf容器中和平共存。如果您嵌入了openstack4j依赖项,那么也可以尝试嵌入芭乐16.x,或者假设openstack4j将其传递地拉入,则将嵌入传递设置为true。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51469499

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档