I've used the archetype from the tycho-eclipse-plugin-archetype to create a simple Eclipse plug-in with a working integration test project. Except... it doesn't.
When I start any test as "JUnit Plug-in Test" I get the following exception:
!ENTRY org.eclipse.osgi 2 0 2016-01-07 14:43:35.734
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2016-01-07 14:43:35.734
!MESSAGE Bundle initial@reference:file:../../../../../../../Users/MyName/.eclipse/org.eclipse.platform_4.5.1_2043537226_win32_win32_x86_64/plugins/org.eclipse.pde.junit.runtime_3.4.500.v20150423-1241.jar/ was not resolved.
!SUBENTRY 2 org.eclipse.pde.junit.runtime 2 0 2016-01-07 14:43:35.734
!MESSAGE Missing required bundle org.eclipse.core.runtime_[3.11.0,4.0.0).
(And some similar messages for other plug-ins.)
Which is weird, because my target platform contains org.eclipse.pde.junit.runtime
3.4.300, not 3.4.500, which requires org.eclipse.core.runtime
version [3.3.0,4.0.0). The run configuration for the test case agrees with that version and attests "No problems were detected."
So from the fact that the path contains "/org.eclipse.platform_4.5.1" I assume that it takes the currently running Eclipse target platform, even though there's another set in the workspace and in the run configuration.
How do I change JUnit plug-in tests to take the currently active target platform?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…