我正在编写要使用openstack4j的ODL应用程序。加载功能时遇到以下问题:
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。
所以我在impl pom中尝试了以下技巧:
<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静态添加到捆绑包中,但是它不起作用。我该怎么办?
谢谢。
答案 0 :(得分:0)
所以jackson-coreutil依赖于比odlparent(22)更旧的番石榴版本。也许有更新版本的jackson-coreutil?如果没有,那么我认为您需要安装较早的16.x guava版本才能满足jackson-coreutil。希望版本16.x和22可以和平共处在同一karaf容器中。如果您嵌入openstack4j依赖项,则还可以尝试嵌入guava 16.x或将Embed-Transitive设置为true,前提是假设openstack4j将其以可传递方式拉入。