1

我创建了一个Eclipse插件,并把它转换到Maven和用于第谷的转换,现在我的项目结构如下无法构建maven的eclipse插件单元测试

-test-plugin-master 
--com.test.plugin 
    --com.plugin.feature 
    --com.plugin.p2updatesite 
    --com.plugin.unitest 

我加入了里面所有的依赖性我的父项目,当我maven干净,并安装所有的插件功能和更新网站工作正常,但单元测试失败,我的Eclipse插件。

Time to load bundles: 827 
    !SESSION 2014-11-05 13:18:05.028 ----------------------------------------------- 
eclipse.buildId=unknown 
java.version=1.6.0_21 
    java.vendor=Sun Microsystems Inc. 
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US 
Framework arguments: -application org.eclipse.tycho.surefire.osgibooter.headlesstest -  
testproperties C:\Users\obulis\git\xxx\test-plugin- 
master\com.plugin.unittest\target\surefire.properties 
Command-line arguments: -debug -consolelog -data C:\Users\obulis\git\xxx\test-pluin-  
master\com.plugin.unittest\target\work\data -application  
org.eclipse.tycho.surefire.osgibooter.headlesstest -testproperties C:\Users\obulis\git\xxx\ttest- 
plugin-master\com.plugin.unittest\target\surefire.properties 

!ENTRY org.eclipse.osgi 2 0 2014-11-05 13:18:08.047 
!MESSAGE One or more bundles are not resolved because the following root constraints are not 
resolved: 
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-11-05 13:18:08.047 
!MESSAGE Bundle [email protected]:file:../../../xxx/target/xxx-1.0.0-SNAPSHOT.jar was not  
resolved. 
!SUBENTRY 2 xxx 2 0 2014-11-05 13:18:08.047 
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=JavaSE) 
(version=1.6))(&(osgi.ee=JavaSE)(version=1.7)))". 
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-11-05 13:18:08.047 
    reference:file:../../../../../../.m2/repository/p2/osgi/bundle/com.plugin.antlr/1.0.0/com.plu  
    gin.antlr-1.0.0.jar was not resolved. 
!SUBENTRY 2 com.plugin.antlr 2 0 2014-11-05 13:18:08.047 
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE) 
(version=1.7))". 

    !ENTRY org.eclipse.osgi 2 0 2014-11-05 13:18:08.047 
    !MESSAGE The following is a complete list of bundles which are not resolved, see the prior log  
    entry for the root cause if it exists: 
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-11-05 13:18:08.047 
!MESSAGE Bundle com.plugin.unittest_1.0.0.qualifier [1] was not resolved. 
!SUBENTRY 2 com.plugin.unittest 2 0 2014-11-05 13:18:08.047 
!MESSAGE Missing host xxx_1.0.0. 
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-11-05 13:18:08.047 
!MESSAGE Bundle xxx_1.0.0.v20141105-0652 [2] was not resolved. 
    !SUBENTRY 2 xxx 2 0 2014-11-05 13:18:08.047 
!MESSAGE Missing required bundle com.plugin.antlr_1.0.0. 
SUBENTRY 2 xxx 2 0 2014-11-05 13:18:08.047 
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=JavaSE) 
(version=1.6))(&(osgi.ee=JavaSE)(version=1.7)))". 
    !SUBENTRY 1 org.eclipse.osgi 2 0 2014-11-05 13:18:08.047 
!MESSAGE Bundle com.plugin.antlr_1.0.0 [95] was not resolved. 
    !SUBENTRY 2 com.plugin.antlr 2 0 2014-11-05 13:18:08.047 
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE) 
    (version=1.7))". 
    Starting application: 3050 

    !ENTRY org.eclipse.osgi 2 0 2014-11-05 13:18:08.203 
!MESSA GE One or more bundles are not resolved because the following root constraints are not 
    resolved: 
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-11-05 13:18:08.203 
!MESSAGE Bundle [email protected]:file:../../../xxx/target/xxx-1.0.0-SNAPSHOT.jar was not 
    resolved. 
    !SUBENTRY 2 test-automation-plugin 2 0 2014-11-05 13:18:08.203 
    !MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=JavaSE) 
    (version=1.6))(&(osgi.ee=JavaSE)(version=1.7)))". 
    !SUBENTRY 1 org.eclipse.osgi 2 0 2014-11-05 13:18:08.203 
    !MESSAGE Bundle 
    :file:../../../../../../.m2/repository/p2/osgi/bundle/com.plugin.antlr/1.0.0/com.plu   
    gin.antlr-1.0.0.jar was not resolved. 
    !SUBENTRY 2 com.plugin.antlr 2 0 2014-11-05 13:18:08.203 
    !MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE) 
    (version=1.7))". 

    !ENTRY org.eclipse.osgi 2 0 2014-11-05 13:18:08.219 
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log  
    entry for the root cause if it exists: 
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-11-05 13:18:08.219 
!MESSAGE Bundle com.plugin.unittest_1.0.0.qualifier [1] was not resolved. 
!SUBENTRY 2 com.plugin.unittest 2 0 2014-11-05 13:18:08.219 
!MESSAGE Missing host xxx_1.0.0. 
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-11-05 13:18:08.219 
!MESSAGE Bundle xxx_1.0.0.v20141105-0652 [2] was not resolved. 
!SUBENTRY 2 xxx 2 0 2014-11-05 13:18:08.219 
    !MESSAGE Missing required bundle com.plugin.antlr_1.0.0. 
    !SUBENTRY 2 xxx 2 0 2014-11-05 13:18:08.219 
    !MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(& 
    (osgi.ee=JavaSE) 
    (version=1.6))(&(osgi.ee=JavaSE)(version=1.7)))". 
     !SUBENTRY 1 org.eclipse.osgi 2 0 2014-11-05 13:18:08.219 
!MESSAGE Bundle com.plugin.antlr_1.0.0 [95] was not resolved. 
    !SUBENTRY 2 com.plugin.antlr 2 0 2014-11-05 13:18:08.219 
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE) 
(version=1.7))". 

!ENTRY org.eclipse.osgi 4 0 2014-11-05 13:18:08.234 
!MESSAGE Application error 
!STACK 1 
java.lang.RuntimeException: Bundle com.plugin.unittest is not found 

的com.plugin.antlr是我已经在我的插件添加的依赖及其版本是广告获得成功......它工作在Java SE-6,7。

但我现在不是为什么com.plugin.unittest dint找到依赖关系..在这里tenter代码`hanks提前。

回答

1

最后,我发现答案不是因为我的代码..它因为我的日食我试图改变窗口 - >首选项 - > java->安装jre javase-1.7 ..然后我maven干净,并安装它的作品:) 谢谢:)