From 267dcf5d02d0e526cfb87f37338b3cfec045d0c4 Mon Sep 17 00:00:00 2001 From: Emmanuel Venisse Date: Fri, 8 Jul 2005 13:01:15 +0000 Subject: [PATCH] [MNG-562] Implement -Dmaven.test.skip=true git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@209755 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/maven/test/SurefirePlugin.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 fb6d05eb72..16a4695d31 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 @@ -44,6 +44,11 @@ import java.util.StringTokenizer; public class SurefirePlugin extends AbstractMojo { + /** + * Set this to 'true' to bypass unit tests entirely. Its use is NOT RECOMMENDED, but quite convenient on occasion. + * @parameter expression=${maven.test.skip}" + */ + private boolean skip; /** * @parameter expression="${basedir}" @@ -124,6 +129,13 @@ public class SurefirePlugin public void execute() throws MojoExecutionException { + if ( skip ) + { + getLog().info( "Tests are skipped." ); + + return; + } + // ---------------------------------------------------------------------- // Setup the surefire booter // ----------------------------------------------------------------------