0

我正在运行 pax-provision 来创建一个 helloworld OSGI 应用程序。在 pom.xml 我添加了以下配置

    <plugin>
                    <groupId>org.ops4j</groupId>
                    <artifactId>maven-pax-plugin</artifactId>
                    <version>1.5</version>
                    <configuration>
                        <!--
                         | some example Pax-Runner settings
                        -->
                        <provision>
                            <param>--platform=equinox</param>
                            <param>--profiles=minimal</param>
                             <param>--version=3.3.2</param>
                            <param>--log=DEBUG</param>
                            <param>--bcp/p=file:///C:/mavenrepo/org/eclipse/equinox/simpleconfigurator/1.0.400/simpleconfigurator-1.0.400.jar</param>
                            <param>--bcp/p=file:///.</param>
                        </provision>
                    </configuration>
                    <executions>
                        <!--
                         | uncomment to auto-generate IDE files
                         -->
                        <execution>
                            <id>ide-support</id>
                            <goals>
                                <goal>eclipse</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

EclipseStarter 文件是 simpleconfigurator jar 文件的一部分,它是类路径。以下是开始前的日志:

 -> Using class org.ops4j.pax.runner.platform.DefaultJavaRunner [org.eclipse.core.runtime.adaptor.EclipseStarter]
 -> VM options:          [[-Dosgi.install.area=equinox]]
 -> Classpath:           [[bundles/org.eclipse.equinox.simpleconfigurator_1.0.400.v20130327-2119.jar, bundles/-855037795_0.0.0.jar, bundles/org.apache.felix.gogo.shell_0.10.0.jar]]
 -> Platform options:    [[-console, -configuration, equinox]]
 -> Java home:           [C:\Java\jdk1.6.0_22]
 -> Working dir:         [runner]
 -> Environment options: [null]
 -> Start command line [[C:\Java\jdk1.6.0_22/bin/java, -Dosgi.install.area=equinox, -cp, bundles/org.eclipse.equinox.simpleconfigurator_1.0.400.v20130327-2119.jar;bundles/-855037795_0.0.0.jar;bundles/org.apache.felix.gogo.shell_0.10.0.jar, org.eclipse.core.runtime.adaptor.EclipseStarter, -console, -configuration, equinox]]
 -> Starting platform process.
 -> Wrapping stream I/O.
 -> Added shutdown hook.
 -> Runner has successfully finished his job!
 -> Waiting for framework exit.
java.lang.NoClassDefFoundError: org/eclipse/core/runtime/adaptor/EclipseStarter

我无法向其提供 jar 文件,因此无法获得 osgi> 提示。

4

1 回答 1

0

该问题已通过放置条目解决

链接\:classpath\:runner-links/org.eclipse.osgi-3.3.2.link=org.eclipse.osgi_3.3.2.R33x_v20080105.jar 链接\:classpath\:runner-links/org.apache.felix.gogo .shell-0.10.0=org.apache.felix.gogo.shell_0.10.0.jar

在 runner/bundles/downloaded_bundles.properties 文件中。此外,org.eclipse.osgi_3.3.2.R33x_v20080105.jar 被放置在 bundles 目录中

于 2013-08-01T10:58:57.817 回答