【问题标题】:Pax-Exam How to install bundles to containerPax-Exam 如何将捆绑包安装到容器中
【发布时间】:2015-08-18 04:38:30
【问题描述】:

如何将包从本地 m2 存储库安装到 Pax-Exam 容器?..

我可以通过提供文件 URL 进行安装。

@Configuration
public Option[] config() {

    return options(
                  bundle("file:///home/sample/Desktop/sample.jar"),
                  junitBundles()
    );

但这不是可扩展的解决方案。那么如何告诉 Pax-Exam 从本地 m2 存储库安装捆绑包呢?

【问题讨论】:

    标签: junit osgi pax-exam


    【解决方案1】:

    Pax 考试有一个配置选项 mavenBundle 可以帮助解决这个问题。它还支持使用 pom 中的版本。所以你在java源码中不需要它。

    See Configuration using Maven Plugin

    【讨论】:

    • 它会先搜索本地repo。
    • 感谢 Christian 的澄清和回答。
    【解决方案2】:

    找到了答案。抱歉打扰了。

    bundle("mvn:org.sample.bundle/bundle-id/version")

    https://ops4j1.jira.com/wiki/display/paxurl/Mvn+Protocol#MvnProtocol-local

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-01-12
      • 2018-12-22
      • 2015-05-22
      • 2014-03-17
      • 2016-06-19
      • 2012-08-14
      • 1970-01-01
      相关资源
      最近更新 更多