我在thrift中创建了一个简单的Calculator服务,作为OSGI中的一个包。 src / lib包含所有依赖的jar,它们已包含在pom.xml
中<dependency>
<groupId>commons-lang-2.4</groupId>
<artifactId>commons-lang-2.4</artifactId>
<scope>system</scope>
<version>2.4</version>
<systemPath>${basedir}\src\lib\commons-lang-2.4.jar</systemPath>
</dependency>
<dependency>
<groupId>httpcore-4.1.3</groupId>
<artifactId>httpcore-4.1.3</artifactId>
<scope>system</scope>
<version>4.1.3</version>
<systemPath>${basedir}\src\lib\httpcore-4.1.3.jar</systemPath>
</dependency>
<dependency>
<groupId>httpclient-4.0-alpha4</groupId>
<artifactId>httpclient-4.0-alpha4</artifactId>
<scope>system</scope>
<version>4.0</version>
<systemPath>${basedir}\src\lib\httpclient-4.0-alpha4.jar</systemPath>
</dependency>
<dependency>
<groupId>org.apache.thrift-0.9.0</groupId>
<artifactId>org.apache.thrift-0.9.0</artifactId>
<scope>system</scope>
<version>0.9.0</version>
<systemPath>${basedir}\src\lib\org.apache.thrift-0.9.0.jar</systemPath>
</dependency>
</dependencies>
导入的包也引用了:
<Import-Package>
org.apache.commons.logging,
org.apache.felix.dm,
org.apache.thrift,
org.apache.thrift.async,
org.apache.thrift.meta_data,
org.apache.thrift.protocol,
org.apache.thrift.scheme,
org.apache.thrift.server,
org.apache.thrift.transport
......
它编译得很好但是捆绑拒绝出现:
!消息框架事件错误 !堆栈0 org.osgi.framework.BundleException:无法解析Bundle“org.thrift.northbound_0.4.0:SNAPSHOT [95]”。原因:缺少约束导入包:org.apache.thift; version =“[0.9.0,1.0.0)”
关于我缺少什么的任何指示?