title: Running JUnit tests on eclipse-test-plugins from maven
body: <p>I have a maven3 multi-module RCP eclipse project. I want to run JUnit tests from maven. The modules that have JUnit tests are eclipse-plugins. I've tried to run them using <code>Tycho Surefire Plugin</code> by adding this at pom file:</p>
  
  <pre><code>    &lt;packaging&gt;eclipse-test-plugin&lt;/packaging&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.12&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
    &lt;build&gt;
      &lt;sourceDirectory&gt;src/test&lt;/sourceDirectory&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.eclipse.tycho&lt;/groupId&gt;
          &lt;artifactId&gt;tycho-surefire-plugin&lt;/artifactId&gt;
          &lt;version&gt;0.24.0&lt;/version&gt;
          &lt;configuration&gt;
            &lt;includes&gt;
                &lt;include&gt;**/*Test.java&lt;/include&gt;
            &lt;/includes&gt;
            &lt;useUIHarness&gt;false&lt;/useUIHarness&gt;
            &lt;providerHint&gt;junit4&lt;/providerHint&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>With <code>mvn test</code> the tests are not triggered. Only the classes are compiled.
  With <code>mvn verify</code> I get the following error:</p>
  
  <blockquote>
    <p>-------------------------------------------------------  T E S T S
    ------------------------------------------------------- An error has occurred. See the log file
    E:\Git\EF8_Toolcenter_repository_custom\de.audi.eftc.platform.contact\target\work\data.metadata.log.</p>
    
    <p>[ERROR] Failed to execute goal
    org.eclipse.tycho:tycho-surefire-plugin:0.24.0:test (default-test) on
    project xxxx.contact: An unexpected error occured while launching the
    test runtime (return code 13). See log for details. -> [Help 1]</p>
  </blockquote>
  
  <p>The log contains:</p>
  
  <blockquote>
    <p>!SESSION 2019-03-05 11:31:23.457
    ----------------------------------------------- eclipse.buildId=unknown java.version=1.8.0_191 java.vendor=Oracle
    Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32,
    NL=en_US Framework arguments:  -application
    org.eclipse.tycho.surefire.osgibooter.headlesstest -testproperties
    xxxx\target\surefire.properties
    Command-line arguments:  -data
    xxxx\target\work\data
    -application org.eclipse.tycho.surefire.osgibooter.headlesstest -testproperties 
    xxxx\target\surefire.properties</p>
    
    <p>!ENTRY org.eclipse.tycho.surefire.junit4 2 0 2019-03-05 11:31:24.892
    !MESSAGE Could not resolve module: org.eclipse.tycho.surefire.junit4
    [134]   Unresolved requirement: Import-Package: junit.framework;
    version="3.0.0"   Unresolved requirement: Import-Package:
    junit.framework; version="3.0.0"</p>
    
    <p>!ENTRY org.eclipse.osgi 4 0 2019-03-05 11:31:24.893 !MESSAGE
    Application error !STACK 1
    org.apache.maven.surefire.util.SurefireReflectionException:
    java.lang.ClassNotFoundException:
    org.apache.maven.surefire.junit4.JUnit4Provider   at
    org.apache.maven.surefire.util.ReflectionUtils.loadClass(ReflectionUtils.java:251)
      at
    org.apache.maven.surefire.util.ReflectionUtils.instantiateOneArg(ReflectionUtils.java:128)
      at
    org.apache.maven.surefire.booter.SurefireReflector.instantiateProvider(SurefireReflector.java:235)
      at
    org.apache.maven.surefire.booter.ProviderFactory.createProvider(ProviderFactory.java:113)
      at
    org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:78)
      at
    org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:91)
      at
    org.eclipse.tycho.surefire.osgibooter.HeadlessTestApplication.run(HeadlessTestApplication.java:21)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)     at
    org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
      at
    org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
      at
    org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
      at
    org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
      at
    org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
      at
    org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)     at
    org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:656)  at
    org.eclipse.equinox.launcher.Main.basicRun(Main.java:592)     at
    org.eclipse.equinox.launcher.Main.run(Main.java:1498)     at
    org.eclipse.equinox.launcher.Main.main(Main.java:1471) Caused by:
    java.lang.ClassNotFoundException:
    org.apache.maven.surefire.junit4.JUnit4Provider   at
    org.eclipse.tycho.surefire.osgibooter.CombinedClassLoader.findClass(CombinedClassLoader.java:37)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)    at
    java.lang.ClassLoader.loadClass(ClassLoader.java:357)     at
    org.apache.maven.surefire.util.ReflectionUtils.loadClass(ReflectionUtils.java:243)
      ... 24 more</p>
  </blockquote>
  
  <p>What am I doing wrong?
  Thank you in advance!</p>