【问题标题】:can not find osgi.enroute.iot.pi.provider dependency找不到 osgi.enroute.iot.pi.provider 依赖项
【发布时间】:2017-04-11 21:28:12
【问题描述】:

我正在尝试做这个教程

http://enroute.osgi.org/tutorial_iot/120-exploring.html

但我有一个问题:

osgi.enroute.iot.pi.provider

找不到包,所以我可以解决 bndrun 依赖项:

Unable to resolve <<INITIAL>> version=null:
   missing requirement osgi.enroute.iot.pi.provider

当我尝试使用时

osgi.enroute.iot.pi.command

未找到依赖项:

Unable to resolve <<INITIAL>> version=null:
   missing requirement enroute.iot.raspberry.application  
->  Unable to resolve enroute.iot.raspberry.application version=1.0.0.201611270001:
   missing requirement com.pi4j.system]

我在我的项目构建路径中手动下载并添加了 pi4j,所以我没有更多的 eclipse 问题,但我认为它不是 osgi 的一个好的解决方案,它不能在我的远程 raspberry ssh 控制台上运行......

【问题讨论】:

    标签: raspberry-pi osgi iot enroute


    【解决方案1】:

    感谢来自 osgi 邮件列表的 Daghan 提供了解决方案:

    “osgi.enroute.iot.pi.provider”不再是 enroute 发行版的一部分。请从您的项目中删除手动下载的 pi4j 并执行以下操作:

    1-打开cnf>central.xml

    2- 添加以下内容

    <!-- https://mvnrepository.com/artifact/org.osgi/osgi.enroute.iot.pi.provider -->
    <dependency>
         <groupId>org.osgi</groupId>
        <artifactId>osgi.enroute.iot.pi.provider</artifactId>
        <version>2.0.0</version>
    </dependency>
    

    这解决了我的问题,但树莓派的 include pi4j 依赖项不是最新的,所以我更喜欢添加

    <dependency>
        <groupId>com.pi4j</groupId>
        <artifactId>pi4j-core</artifactId>
        <version>1.1</version>
    </dependency>
    

    现在一切都像魅力一样!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-01-21
      • 2016-10-01
      • 2019-10-28
      • 2020-04-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多