diff --git a/maven-plugins/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java b/maven-plugins/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java index 20364c42d9..57e35d3516 100644 --- a/maven-plugins/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java +++ b/maven-plugins/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java @@ -93,6 +93,14 @@ public class SurefirePlugin */ private List excludes = new ArrayList( Collections.singletonList( "**/Abstract*Test.java" ) ); + /** + * The project whose project files to create. + * + * @parameter expression="${project}" + * @required + */ + private MavenProject project; + /** * @parameter expression="${localRepository}" * @required @@ -110,6 +118,11 @@ public class SurefirePlugin public void execute() throws MojoExecutionException { + if ( "pom".equals( project.getPackaging() ) ) + { + return; + } + // ---------------------------------------------------------------------- // Setup the surefire booter // ----------------------------------------------------------------------