title: InitilizationError when JunitTest with Maven
body: <p>I'm trying to do some Junit-Test's with Maven3 but always get some initilizationError(some testclass here) when executing test which have JUnit-Annotations (all other tests run fine). When I run the tests in Eclipse all is fine. But running the tests with maven will break.
  My Testproject is packaged as eclipse-plugin.
  I use the maven-osgi-test-plugin.</p>
  
  <p>My testclass is annotated by:</p>
  
  <pre><code>@RunWith(SpringJUnit4ClassRunner.class)
  @ContextConfiguration(locations="classpath:applicationContext.xml")
  @TransactionConfiguration
  public class ArtifactManagerTest extends
      AbstractTransactionalJUnit4SpringContextTests {...
  </code></pre>
  
  <p>For every testclass annotated with @ContextConfiguration there is the classname-test.xml file. In this configuration-file I import the applicationContext-Test.xml by "classpath:"</p>
  
  <p>My pom.xml of the test-plugin looks like:</p>
  
  <pre><code>&lt;groupId&gt;foo.bar&lt;/groupId&gt;
  &lt;artifactId&gt;company.xyz&lt;/artifactId&gt;
  &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;eclipse-test-plugin&lt;/packaging&gt;
  
  &lt;build&gt;
   &lt;plugins&gt;
    &lt;plugin&gt;
     &lt;groupId&gt;org.sonatype.tycho&lt;/groupId&gt;
     &lt;artifactId&gt;maven-osgi-test-plugin&lt;/artifactId&gt;
     &lt;configuration&gt;
      &lt;useUIHarness&gt;true&lt;/useUIHarness&gt;
      &lt;testSuite&gt;company.xyz.test&lt;/testSuite&gt;
      &lt;testClass&gt;company.xyz.AllTests&lt;/testClass&gt;
      &lt;argLine&gt;-Xmx512m&lt;/argLine&gt;
      &lt;bundleStartLevel&gt;
       &lt;bundle&gt;
        &lt;id&gt;org.eclipse.equinox.ds&lt;/id&gt;
        &lt;level&gt;1&lt;/level&gt;
        &lt;autoStart&gt;true&lt;/autoStart&gt;
       &lt;/bundle&gt;
      &lt;/bundleStartLevel&gt;
     &lt;/configuration&gt;
     &lt;inherited&gt;true&lt;/inherited&gt;
    &lt;/plugin&gt;
   &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>The failure output is as follows:</p>
  
  <pre>
  initializationError(company.xyz.ArtifactManagerTest)  Time elapsed: 0 sec  (ParentRunner.java:66)
          at org.junit.runners.BlockJUnit4ClassRunner.(BlockJUnit4ClassRunner.java:59)
          at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.(SpringJUnit4ClassRunner.java:104)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
          at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)
          at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)
          at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
          at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java
  :29)
          at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
          at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:93)
          at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:84)
          at org.junit.runners.Suite.(Suite.java:101)
          at org.junit.runners.Suite.(Suite.java:67)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
          at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:35)
          at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)
          at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
          at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java
  :29)
          at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
          at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:93)
          at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:84)
          at org.junit.runners.Suite.(Suite.java:101)
          at org.junit.runners.Suite.(Suite.java:67)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
          at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:35)
          at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)
          at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
          at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java
  :29)
          at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
          at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
          at org.apache.maven.surefire.junit4.JUnit4TestSet.(JUnit4TestSet.java:45)
          at org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite.createTestSet(JUnit4DirectoryTestSuite.java:56)
          at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:96)
          at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:209)
          at org.apache.maven.surefire.Surefire.run(Surefire.java:156)
          at org.codehaus.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:75)
          at org.codehaus.tycho.surefire.osgibooter.AbstractUITestApplication$1.run(AbstractUITestApplication.java:25)
          at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
          at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
          at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
          at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
          at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
          at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
          at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
          at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
          at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
          at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
          at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
          at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
          at org.codehaus.tycho.surefire.osgibooter.UITestApplication.runApplication(UITestApplication.java:21)
          at org.codehaus.tycho.surefire.osgibooter.AbstractUITestApplication.run(AbstractUITestApplication.java:109)
          at org.codehaus.tycho.surefire.osgibooter.UITestApplication.start(UITestApplication.java:27)
          at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
          at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
          at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
          at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
          at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
          at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
          at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
          at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
  </pre>
  
  <p>In the surefire-reports I see the java.class.path is set to my local maven repository to 'org.eclipse.equinox.launcher-1.1.0.v20100507.jar'</p>
  
  <p>It looks like the classpath isn't set correct, so maven can't find the <code>applicationContext.xml</code>? But how to do this correct?</p>