【发布时间】:2015-04-19 19:15:20
【问题描述】:
我正在尝试使用 felix 执行 OSGI 包。但是,我什至无法启动捆绑包。我的 shell 命令出错了。
这是包的 pom.xml:
<project>
<modelVersion>4.0.0</modelVersion>
<packaging>bundle</packaging>
<groupId>gateway</groupId>
<artifactId>home.interfaces</artifactId>
<version>1.0.0</version>
<name>Interface Service Provider</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.0.1</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>
${pom.artifactId}
</Bundle-SymbolicName>
<Export-Package>
temp;pres
</Export-Package>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-ipojo-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<goals>
<goal>ipojo-bundle</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
这是命令外壳中的错误:
Welcome to Felix
================
-> ps
START LEVEL 1
ID State Level Name
[ 0] [Active ] [ 0] System Bundle (2.0.4)
[ 1] [Active ] [ 1] Apache Felix Bundle Repository (1.4.3)
[ 2] [Active ] [ 1] Apache Felix Shell Service (1.4.2)
[ 3] [Active ] [ 1] Apache Felix Shell TUI (1.4.1)
[ 4] [Installed ] [ 1] Interface Service Provider (1.0.0)
[ 5] [Installed ] [ 1] Presence Service Provider (1.0.0)
[ 6] [Installed ] [ 1] Temperature Service Provider (1.0.0)
[ 7] [Installed ] [ 1] Analyser Service (1.0.0)
-> start 4
org.osgi.framework.BundleException: Unresolved constraint in bundle home.interfa
ces [4]: package; (&(package=org.osgi.service.cm)(version>=1.2.0))
->
这是什么错误,我该如何解决?
【问题讨论】:
标签: java osgi bundle apache-felix