This worked for us:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
<dependencies>
<!-- avoid CNFE in Surefire when looking for JUnitPlatformProvider -->
<dependency>
<artifactId>org.junit</artifactId>
<type>eclipse-plugin</type>
</dependency>
</dependencies>
</configuration>
</plugin>
Mit freundlichen Grüßen / Best regards
Michael Keppler
LTO Release Engineering (ETAS/ESW-CI)
Tel. +49 711 3423-2429 | Fax +49 711 89661-0 |
Michael.Keppler@xxxxxxxx
-----Ursprüngliche Nachricht-----
Von: tycho-user-bounces@xxxxxxxxxxx <tycho-user-bounces@xxxxxxxxxxx> Im Auftrag von Simon Goodall
Gesendet: Donnerstag, 13. August 2020 10:19
An: Tycho user list <tycho-user@xxxxxxxxxxx>
Betreff: [tycho-user] JUnit failure (Tycho 1.5 to 1.7)
I am trying to upgrade to Tycho 1.7.0 from 1.5. However I am stuck on running my unit tests and I am unsure where to go from here as they appear to be tycho/maven related. The two messages that appear to be relevant are;
Could not resolve module: org.eclipse.tycho.surefire.junit55 [196]
org.apache.maven.surefire.util.SurefireReflectionException:
java.lang.ClassNotFoundException:
org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
(full stack traces below)
My application is based on Eclipse 2019-12 with the related Orbit repo
(R20191126223242) and I am running OpenJDK 11 with the majority of tests being JUnit 5 based with a few junit4 swtbot cases. Any suggestions appreciated otherwise I will try to reproduce a minimal example.
Thanks
Simon
!ENTRY org.eclipse.tycho.surefire.junit55 2 0 2020-08-10 12:52:39.554 !MESSAGE Could not resolve module: org.eclipse.tycho.surefire.junit55 [196]
Unresolved requirement: Import-Package: org.junit.runner; version="[4.12.0,5.0.0)"; resolution:="optional"
Unresolved requirement: Import-Package:
org.junit.runner.manipulation; version="[4.12.0,5.0.0)"; resolution:="optional"
Unresolved requirement: Import-Package:
org.junit.runner.notification; version="[4.12.0,5.0.0)"; resolution:="optional"
Unresolved requirement: Import-Package: org.junit.runners.model; version="[4.12.0,5.0.0)"; resolution:="optional"
Unresolved requirement: Import-Package:
org.junit.experimental.categories; version="[4.12.0,5.0.0)"; resolution:="optional"
Unresolved requirement: Import-Package: org.junit.internal.builders; version="[4.12.0,5.0.0)"; resolution:="optional"
Unresolved requirement: Import-Package: org.junit; version="[4.12.0,5.0.0)"; resolution:="optional"
Unresolved requirement: Import-Package: junit.runner
!ENTRY org.eclipse.osgi 4 0 2020-08-10 12:52:39.554 !MESSAGE Application error !STACK 1
org.apache.maven.surefire.util.SurefireReflectionException:
java.lang.ClassNotFoundException:
org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
at org.apache.maven.surefire.util.ReflectionUtils.loadClass(ReflectionUtils.java:249)
at org.apache.maven.surefire.util.ReflectionUtils.instantiateOneArg(ReflectionUtils.java:133)
at org.apache.maven.surefire.booter.SurefireReflector.instantiateProvider(SurefireReflector.java:265)
at org.apache.maven.surefire.booter.ProviderFactory.createProvider(ProviderFactory.java:118)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:83)
at org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:113)
at org.eclipse.tycho.surefire.osgibooter.HeadlessTestApplication.run(HeadlessTestApplication.java:21)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:593)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:205)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Caused by: java.lang.ClassNotFoundException:
org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
at org.eclipse.tycho.surefire.osgibooter.CombinedClassLoader.findClass(CombinedClassLoader.java:37)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at org.apache.maven.surefire.util.ReflectionUtils.loadClass(ReflectionUtils.java:241)
... 24 more
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/tycho-user