我正在编写一个ODL应用程序,我想在其中使用openstack4j。当我加载功能时,我遇到了以下问题:
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。
因此,我在我的实现中尝试了以下技巧:
<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可以静态地添加到包中,但它不起作用。我该如何继续呢?
谢谢。
发布于 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。
https://stackoverflow.com/questions/51469499
复制相似问题