当使用tycho-surefire-plugin执行JUnit测试时,tycho会分配一个equinox运行时.在极少数情况下,可能会发生OSGi测试运行时中的某些bundle无法解析/启动(例如,包使用冲突).如果您阅读调试日志(maven CLI选项-X),您会发现类似的内容
!ENTRY org.eclipse.osgi 2 0 2012-10-08 16:41:31.635
!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 2012-10-08 16:41:31.635
An error has occurred. See the log file
C:\mytestproject.tests\target\work\configuration\1349705136008.log.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12:03.181s
[INFO] Finished at: Mon Oct 08 16:17:16 CEST 2012
[INFO] Final Memory: 20M/309M
[INFO] …Run Code Online (Sandbox Code Playgroud) tycho ×1