java - Pax 运行者出错

标签 java maven osgi equinox pax-runner

我正在使用 Maven pax 插件来启动 equinox 容器,我的 osgi 包应该在其中部署。由于 pax runner 默认启动 felix 容器,我已经明确给出了启动 equinox 容器的说明。这是我在 POM 文件中的 pax 插件配置

<plugin>
                <groupId>org.ops4j</groupId>
                <artifactId>maven-pax-plugin</artifactId>
                <version>1.4</version>
                <configuration>
                    <runnner>1.4.0</runnner>
                    <framework>equinox</framework>
                    <provision>
                        <param>--log=debug</param> 
                            <param>--definitionURL=file:C:\Users\661447\Desktop\Prime Workspace\OSGiDmHelloWorldProvider\platform.xml</param>               

                    </provision>
                </configuration>
            </plugin>

我也明确给出了平台定义。这是我的 platform.xml 文件

<platform>
    <name>Equinox 3.7.0</name>
    <system>
        http://mirror.netcologne.de/eclipse/equinox/drops/R-3.7-201106131736/org.eclipse.osgi_3.7.0.v20110613.jar
    </system>
    <profile name="minimal" default="true">
        <bundle>
            <name>OSGi Services</name>
            <url>
                http://mirror.netcologne.de/eclipse/equinox/drops/R-3.7-201106131736/org.eclipse.osgi.services_3.3.0.v20110513.jar
            </url>
        </bundle>
    </profile>
</platform>

现在,当我尝试通过命令"mvn install pax:provision" 安装我的包时,出现以下错误

 -> Preparing framework [Equinox 3.8.1]
 -> loading definition from url file:C:/Users/661447/Desktop/Prime Workspace/OSG
iDmHelloWorldProvider/platform.xml
 -> Using platform definition [org.ops4j.pax.runner.platform.internal.PlatformDe
finitionImpl@a10ea2]
 -> Using working directory [runner]
 -> Downloading bundles...
 -> Download system package
 -> Downloading [http://mirror.netcologne.de/eclipse/equinox/drops/R-3.7-2011061
31736/org.eclipse.osgi_3.7.0.v20110613.jar]
 -> Creating new file at destination: C:\Users\661447\Desktop\Prime Workspace\OS
GiDmHelloWorldProvider\runner\bundles\-31806645.jar
 -> Equinox 3.7.0 : connecting...
         ___
        /  /
       /  / Oops, there has been a problem!
      /  /
     /__/   org.ops4j.pax.runner.platform.PlatformException: [http://mirror.netc
ologne.de/eclipse/equinox/drops/R-3.7-201106131736/org.eclipse.osgi_3.7.0.v20110
613.jar] could not be downloaded
    ___
   /__/

 -> Exception caught during execution:
java.lang.RuntimeException: org.ops4j.pax.runner.platform.PlatformException: [ht
tp://mirror.netcologne.de/eclipse/equinox/drops/R-3.7-201106131736/org.eclipse.o
sgi_3.7.0.v20110613.jar] could not be downloaded

有人能帮帮我吗?提前致谢

最佳答案

如果您使用代理,您必须为 pax-runner 定义代理系统属性:http.proxyHosthttp.proxyPort。 Pax-Runner 使用代理属性来解析/下载用 http(s) url 描述的 Artifact 。

关于java - Pax 运行者出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15540104/

相关文章:

java - Spring Boot 部署看不到 .class 文件

oracle - Clojure Lein 找不到 Oracle JDBC 驱动程序

java - 当注释注入(inject)器刚刚出现为空时,如何调试它们?

java - 日期时间解析器出现格式错误

java - 当前哪些 Java 代码覆盖率工具可以从测试的角度显示覆盖率?

java - Java中的Tensorflow : inferenceInterface.获取转换为多维数组

spring - 为 ORACLE 创建启用 OSGi 的 jar(用于 Spring Roo - ORACLE db 集成)

java - OSGi DB 访问的高级架构布局是什么?

java - 删除字符串的一部分之后的所有内容

java - 如何通过互联网将 Python 脚本中的数据发送到 Android 应用程序,反之亦然。