Index: pom.xml =================================================================== --- pom.xml (revision 453055) +++ pom.xml (working copy) @@ -73,6 +73,12 @@ joakim@erdfelt.com + + + apache.snapshots + http://people.apache.org/repo/m2-snapshot-repository + + org.apache.maven Index: src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java =================================================================== --- src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java (revision 453055) +++ src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java (working copy) @@ -561,8 +561,19 @@ } else if ( junitArtifact != null ) { - surefireBooter.addTestSuite( "org.apache.maven.surefire.junit.JUnitDirectoryTestSuite", - new Object[]{testClassesDirectory, includes, excludes} ); + String junitDirectoryTestSuite; + + if ( junitArtifact.getBaseVersion().startsWith( "4" ) ) + { + junitDirectoryTestSuite = "org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite"; + } + else + { + junitDirectoryTestSuite = "org.apache.maven.surefire.junit.JUnitDirectoryTestSuite"; + } + + surefireBooter.addTestSuite( junitDirectoryTestSuite, new Object[] { testClassesDirectory, includes, + excludes } ); } else {