Maven+;ODL osgi.willing.package javax

Maven+;ODL osgi.willing.package javax,java,maven,dependencies,karaf,opendaylight,Java,Maven,Dependencies,Karaf,Opendaylight,我目前正在OpenDaylight上开发一个应用程序。我想使用ObjectDB 但是我不能激活我的包 opendaylight-user@root>bundle:diag ntf-impl (171) -------------- Status: Installed Unsatisfied Requirements: osgi.wiring.package; resolution:="mandatory"; filter:="(&(osgi.wiring.package=javax

我目前正在OpenDaylight上开发一个应用程序。我想使用ObjectDB

但是我不能激活我的包

opendaylight-user@root>bundle:diag
ntf-impl (171)
--------------
Status: Installed
Unsatisfied Requirements:
osgi.wiring.package; resolution:="mandatory"; filter:="(&(osgi.wiring.package=javax.jdo.annotations)(&(version>=3.1.0)(!(version>=4.0.0))))"
osgi.wiring.package; resolution:="mandatory"; filter:="(&(osgi.wiring.package=javax.persistence))"
在mvn清洁安装期间

Unresolved constraint in bundle org.opendaylight.ntf.impl [205]: Unable to resolve 205.0: missing requirement [205.0] osgi.wiring.package; (&(osgi.wiring.package=javax.jdo.annotations)(version>=3.1.0)(!(version>=4.0.0)))
我会把我的pom.xml发给你

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

  <parent>
    <groupId>org.opendaylight.controller</groupId>
    <artifactId>config-parent</artifactId>
    <version>0.3.0-SNAPSHOT</version>
    <relativePath/>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <groupId>org.opendaylight.ntf</groupId>
  <artifactId>ntf-impl</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>bundle</packaging>
  <repositories>
        <repository>
            <id>objectdb</id>
            <name>ObjectDB Repository</name>
            <url>http://m2.objectdb.com</url>
        </repository>
    </repositories>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>ntf-api</artifactId>
      <version>${project.version}</version>
    </dependency>
<dependency>
    <groupId>javax.jdo</groupId>
    <artifactId>jdo-api</artifactId>
    <version>3.1</version>
</dependency>
      <dependency>
    <groupId>javax.persistence</groupId>
    <artifactId>persistence-api</artifactId>
    <version>1.0.2</version>
</dependency>
    <dependency>
            <groupId>com.objectdb</groupId>
            <artifactId>objectdb</artifactId>
            <version>2.4.0</version>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

</project>

org.opendaylight.controller
配置父项
0.3.0-快照
4.0.0
org.opendaylight.ntf
ntf impl
1.0-快照
捆
对象数据库
ObjectDB存储库
http://m2.objectdb.com
${project.groupId}
NTFAPI
${project.version}
javax.jdo
jdoapi
3.1
javax.persistence
持久性api
1.0.2
com.objectdb
对象数据库
2.4.0
org.mockito
莫基托所有
测试

我尝试了许多不同的依赖项。有人建议我如何运行此功能吗?

请确保将相关捆绑包添加到功能中的features.xml,例如features/src/main/features/features.xml

我在javax.jms中遇到了一个bundle依赖项错误,我通过在features.xml中添加bundle依赖项修复了该错误,如下所示

  <feature name='odl-odlmq' version='${project.version}' description='OpenDaylight :: odlmq'>
<feature version='${mdsal.version}'>odl-mdsal-broker</feature>
<feature version='${project.version}'>odl-odlmq-api</feature>
<bundle>mvn:org.opendaylight.odlmq/odlmq-impl/${project.version}</bundle>
<bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1</bundle>
<bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
</feature>

odl mdsal经纪人
odl odlmq api
mvn:org.opendaylight.odlmq/odlmq impl/${project.version}
mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
类似地,将javax.jdo的相关捆绑包添加到features.xml中,然后重新构建。生成应成功,错误已解决

或者,为了运行此功能,您可以使用跳过的测试进行构建

$mvn清洁安装-DskipTests

但是,在这种情况下,您以后必须从Karaf手动安装依赖项