找不到带有maven Bundle的Eclipse插件测试

时间:2015-03-27 09:47:04

标签: java eclipse maven plugins

我在一个新的eclipse插件项目中工作,在那里我创建了一个插件测试项目。 我没有测试,但编译无法正常工作。

我有这个错误:

T E S T S

java.lang.RuntimeException: Bundle plugin-test is not found
    at org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.getBundleClassLoader(OsgiSurefireBooter.java:162)
    at org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.createCombinedClassLoader(OsgiSurefireBooter.java:98)
    at org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:91)
    at org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication.runTests(AbstractUITestApplication.java:44)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Testable$1.run(E4Testable.java:73)
    at java.lang.Thread.run(Thread.java:662)

我的插件测试项目的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">
        <modelVersion>4.0.0</modelVersion>
        <parent>
            <groupId>com.example.plugin</groupId>
            <artifactId>plug-parent</artifactId>
            <version>4.0.0</version>
            <relativePath>../pom.xml</relativePath>
        </parent>
        <packaging>eclipse-test-plugin</packaging>
        <!-- <packaging>eclipse-plugin</packaging> -->
        <groupId>com.example.plugin</groupId>
        <artifactId>plugin-test</artifactId>
        <repositories>
            <repository>
                <id>swtbot</id>
                <url>http://download.eclipse.org/technology/swtbot/releases/2.2.1/</url>
                <layout>p2</layout>
            </repository>
        </repositories>
        <dependencies>
            <dependency>
                <groupId>com.example.plugin</groupId>
                <artifactId>plugin</artifactId>
                <version>1.0.0</version>
            </dependency>
        </dependencies>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>target-platform-configuration</artifactId>
                    <version>${tycho-version}</version>
                    <configuration>
                        <dependency-resolution>
                            <extraRequirements>
    <!--                            <requirement> -->
    <!--                                <type>eclipse-plugin</type> -->
    <!--                                <id>xyz-rcp-plugin</id> -->
    <!--                                <versionRange>0.0.0</versionRange> -->
    <!--                            </requirement> -->
                            </extraRequirements>
                        </dependency-resolution>
                    </configuration>
                </plugin>
            </plugins>
            <pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.eclipse.tycho</groupId>
                        <artifactId>tycho-surefire-plugin</artifactId>
                        <version>${tycho-version}</version>
                        <configuration>
                            <useUIHarness>true</useUIHarness>
                            <useUIThread>false</useUIThread>
                            <product>org.eclipse.sdk.ide</product>
                            <application>org.eclipse.ui.ide.workbench</application>
                        </configuration>
                    </plugin>



                    <plugin>
                        <artifactId>maven-clean-plugin</artifactId>
                        <version>2.4.1</version>
                        <configuration>
                            <filesets>
                                <fileset>
                                    <directory>${temporary.directory}</directory>
                                    <directory>/home/{login}/workspaceTestOtherPlugin2/tmp</directory>
                                </fileset>
                            </filesets>
                        </configuration>
                    </plugin>
                </plugins>
            </pluginManagement>
        </build>
        <version>1.0.0</version>
    </project>

你有个主意吗?

先谢谢。

0 个答案:

没有答案