title: Tests for maven plugins are incompatible with maven 3.0.4
body: <p>I have a simple test for maven plugin:</p>
  
  <pre><code>public class SimpleMavenTest extends AbstractMojoTestCase {
  
      @Override
      protected void setUp() throws Exception {
          super.setUp();
          // code
      }
  
      public void testCase() throws Exception {
          // test case
      }
  
      @Override
      protected void tearDown() throws Exception {
          // code
          super.tearDown();
      }
  }
  </code></pre>
  
  <p>with such <a href="http://maven.apache.org/plugins/maven-surefire-plugin/" rel="noreferrer">maven-surefire-plugin</a> configuration:</p>
  
  <pre><code>&lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
        &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
        &lt;configuration&gt;
          &lt;forkMode&gt;never&lt;/forkMode&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>Until maven 3.0.4 has been released, my SimpleMavenTest run succesfully. But when I run the test using maven 3.0.4, the next error was occurred:</p>
  
  <pre><code>java.lang.IllegalStateException: The internal default plexus-bootstrap.xml is missing. This is highly irregular, your plexus JAR is most likely corrupt.
      at org.codehaus.plexus.DefaultPlexusContainer.initializeConfiguration(DefaultPlexusContainer.java:1052)
      at org.codehaus.plexus.DefaultPlexusContainer.initialize(DefaultPlexusContainer.java:627)
      at org.codehaus.plexus.PlexusTestCase.setUp(PlexusTestCase.java:119)
      at org.apache.maven.plugin.testing.AbstractMojoTestCase.setUp(AbstractMojoTestCase.java:69)
      at org.maven.test.MyMojoTest.setUp(MyMojoTest.java:12)
      at junit.framework.TestCase.runBare(TestCase.java:128)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:120)
      at junit.framework.TestSuite.runTest(TestSuite.java:230)
      at junit.framework.TestSuite.run(TestSuite.java:225)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  </code></pre>
  
  <p>I looked here: <a href="http://maven.apache.org/plugins/maven-surefire-plugin/examples/class-loading.html" rel="noreferrer">http://maven.apache.org/plugins/maven-surefire-plugin/examples/class-loading.html</a> and tried to change <em>maven-surefire-plugin</em> configuration in a such way:</p>
  
  <pre><code>&lt;configuration&gt;
          &lt;forkMode&gt;once&lt;/forkMode&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Everything works fine. But if I make:</p>
  
  <pre><code>&lt;forkMode&gt;never&lt;/forkMode&gt;
  </code></pre>
  
  <p>the above error is occured. It's strange, because on maven 3.0.3 and previous maven versions the test was run without any errors. Any ideas?</p>