diff --git a/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/BranchMojoTest.java b/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/BranchMojoTest.java
index ef788478..33d27e7f 100644
--- a/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/BranchMojoTest.java
+++ b/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/BranchMojoTest.java
@@ -27,6 +27,9 @@
import java.io.File;
+import static org.apache.maven.scm.provider.svn.SvnScmTestUtils.SVN_COMMAND_LINE;
+import static org.apache.maven.scm.provider.svn.SvnScmTestUtils.SVNADMIN_COMMAND_LINE;
+
/**
* @author Emmanuel Venisse
*
@@ -51,11 +54,7 @@ protected void setUp()
FileUtils.forceDelete( repository );
- if ( !ScmTestCase.isSystemCmd( SvnScmTestUtils.SVNADMIN_COMMAND_LINE ) )
- {
- ScmTestCase.printSystemCmdUnavail( SvnScmTestUtils.SVNADMIN_COMMAND_LINE, "setUp" );
- return;
- }
+ ScmTestCase.checkScmPresence( SVNADMIN_COMMAND_LINE );
SvnScmTestUtils.initializeRepository( repository );
@@ -76,11 +75,7 @@ protected void setUp()
public void testBranch()
throws Exception
{
- if ( !ScmTestCase.isSystemCmd( SvnScmTestUtils.SVN_COMMAND_LINE ) )
- {
- ScmTestCase.printSystemCmdUnavail( SvnScmTestUtils.SVN_COMMAND_LINE, getName() );
- return;
- }
+ ScmTestCase.checkScmPresence( SVN_COMMAND_LINE );
BranchMojo mojo =
(BranchMojo) lookupMojo( "branch", getTestFile( "src/test/resources/mojos/branch/branch.xml" ) );
diff --git a/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/ChangeLogMojoTest.java b/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/ChangeLogMojoTest.java
index 3fc881eb..1280e2ed 100644
--- a/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/ChangeLogMojoTest.java
+++ b/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/ChangeLogMojoTest.java
@@ -28,6 +28,9 @@
import java.io.File;
+import static org.apache.maven.scm.provider.svn.SvnScmTestUtils.SVNADMIN_COMMAND_LINE;
+import static org.apache.maven.scm.provider.svn.SvnScmTestUtils.SVN_COMMAND_LINE;
+
/**
* @author Emmanuel Venisse
*
@@ -46,11 +49,7 @@ protected void setUp()
FileUtils.forceDelete( repository );
- if ( !ScmTestCase.isSystemCmd( SvnScmTestUtils.SVNADMIN_COMMAND_LINE ) )
- {
- ScmTestCase.printSystemCmdUnavail( SvnScmTestUtils.SVNADMIN_COMMAND_LINE, "setUp" );
- return;
- }
+ ScmTestCase.checkScmPresence( SVNADMIN_COMMAND_LINE );
SvnScmTestUtils.initializeRepository( repository );
}
@@ -58,11 +57,7 @@ protected void setUp()
public void testChangeLog()
throws Exception
{
- if ( !ScmTestCase.isSystemCmd( SvnScmTestUtils.SVN_COMMAND_LINE ) )
- {
- ScmTestCase.printSystemCmdUnavail( SvnScmTestUtils.SVN_COMMAND_LINE, getName() );
- return;
- }
+ ScmTestCase.checkScmPresence( SVN_COMMAND_LINE );
ChangeLogMojo mojo = (ChangeLogMojo) lookupMojo( "changelog", getTestFile(
"src/test/resources/mojos/changelog/changelog.xml" ) );
@@ -80,11 +75,7 @@ public void testChangeLog()
public void testChangeLogWithParameters()
throws Exception
{
- if ( !ScmTestCase.isSystemCmd( SvnScmTestUtils.SVN_COMMAND_LINE ) )
- {
- ScmTestCase.printSystemCmdUnavail( SvnScmTestUtils.SVN_COMMAND_LINE, getName() );
- return;
- }
+ ScmTestCase.checkScmPresence( SVN_COMMAND_LINE );
ChangeLogMojo mojo = (ChangeLogMojo) lookupMojo( "changelog", getTestFile(
"src/test/resources/mojos/changelog/changelogWithParameters.xml" ) );
diff --git a/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/CheckoutMojoTest.java b/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/CheckoutMojoTest.java
index d106a208..9dbe5fd5 100644
--- a/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/CheckoutMojoTest.java
+++ b/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/CheckoutMojoTest.java
@@ -29,6 +29,9 @@
import java.io.File;
+import static org.apache.maven.scm.provider.svn.SvnScmTestUtils.SVN_COMMAND_LINE;
+import static org.apache.maven.scm.provider.svn.SvnScmTestUtils.SVNADMIN_COMMAND_LINE;
+
/**
* @author Emmanuel Venisse
*
@@ -71,11 +74,7 @@ public void testSkipCheckoutWhenCheckoutDirectoryExistsAndSkip()
public void testSkipCheckoutWithConnectionUrl()
throws Exception
{
- if ( !ScmTestCase.isSystemCmd( SvnScmTestUtils.SVNADMIN_COMMAND_LINE ) )
- {
- ScmTestCase.printSystemCmdUnavail( SvnScmTestUtils.SVNADMIN_COMMAND_LINE, getName() );
- return;
- }
+ ScmTestCase.checkScmPresence( SVNADMIN_COMMAND_LINE );
FileUtils.forceDelete( checkoutDir );
@@ -119,6 +118,8 @@ public void testSkipCheckoutWithoutConnectionUrl()
public void testUseExport()
throws Exception
{
+ ScmTestCase.checkScmPresence( SVN_COMMAND_LINE );
+
FileUtils.forceDelete( checkoutDir );
checkoutDir.mkdirs();
@@ -137,6 +138,8 @@ public void testUseExport()
public void testExcludeInclude()
throws Exception
{
+ ScmTestCase.checkScmPresence( SVNADMIN_COMMAND_LINE );
+
FileUtils.forceDelete( checkoutDir );
checkoutDir.mkdirs();
diff --git a/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/ExportMojoTest.java b/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/ExportMojoTest.java
index 3f90514d..8261e620 100644
--- a/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/ExportMojoTest.java
+++ b/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/ExportMojoTest.java
@@ -6,9 +6,9 @@
* copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
@@ -18,9 +18,12 @@
import java.io.File;
import org.apache.maven.plugin.testing.AbstractMojoTestCase;
+import org.apache.maven.scm.ScmTestCase;
import org.apache.maven.scm.provider.svn.SvnScmTestUtils;
import org.codehaus.plexus.util.FileUtils;
+import static org.apache.maven.scm.provider.svn.SvnScmTestUtils.SVNADMIN_COMMAND_LINE;
+
/**
*
*/
@@ -46,6 +49,8 @@ protected void setUp()
public void testExport()
throws Exception
{
+ ScmTestCase.checkScmPresence( SVNADMIN_COMMAND_LINE );
+
SvnScmTestUtils.initializeRepository( repository );
ExportMojo mojo = (ExportMojo) lookupMojo( "export", getTestFile( "src/test/resources/mojos/export/export.xml" ) );
@@ -77,8 +82,10 @@ public void testSkipExportIfExists()
public void testExcludeInclude()
throws Exception
{
+ ScmTestCase.checkScmPresence( SVNADMIN_COMMAND_LINE );
+
SvnScmTestUtils.initializeRepository( repository );
-
+
exportDir.mkdirs();
ExportMojo mojo = (ExportMojo) lookupMojo(
diff --git a/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/StatusMojoTest.java b/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/StatusMojoTest.java
index 37b401ec..844eb341 100644
--- a/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/StatusMojoTest.java
+++ b/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/StatusMojoTest.java
@@ -21,10 +21,11 @@
import org.apache.maven.plugin.testing.AbstractMojoTestCase;
import org.apache.maven.scm.ScmTestCase;
-import org.apache.maven.scm.provider.svn.SvnScmTestUtils;
import java.io.File;
+import static org.apache.maven.scm.provider.svn.SvnScmTestUtils.SVN_COMMAND_LINE;
+
/**
* @author Emmanuel Venisse
*
@@ -35,11 +36,7 @@
public void testStatusMojo()
throws Exception
{
- if ( !ScmTestCase.isSystemCmd( SvnScmTestUtils.SVN_COMMAND_LINE ) )
- {
- ScmTestCase.printSystemCmdUnavail( SvnScmTestUtils.SVN_COMMAND_LINE, getName() );
- return;
- }
+ ScmTestCase.checkScmPresence( SVN_COMMAND_LINE );
StatusMojo mojo =
(StatusMojo) lookupMojo( "status", getTestFile( "src/test/resources/mojos/status/status.xml" ) );
diff --git a/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/TagMojoTest.java b/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/TagMojoTest.java
index f08a27d3..15a7a3e6 100644
--- a/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/TagMojoTest.java
+++ b/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/TagMojoTest.java
@@ -23,10 +23,11 @@
import org.apache.maven.scm.ScmTestCase;
import org.apache.maven.scm.provider.svn.SvnScmTestUtils;
import org.codehaus.plexus.util.FileUtils;
-import org.junit.Assume;
import java.io.File;
+import static org.apache.maven.scm.provider.svn.SvnScmTestUtils.SVNADMIN_COMMAND_LINE;
+
/**
* @author Emmanuel Venisse
*
@@ -51,7 +52,7 @@ protected void setUp()
FileUtils.forceDelete( repository );
- Assume.assumeTrue( ScmTestCase.isSystemCmd( SvnScmTestUtils.SVNADMIN_COMMAND_LINE ) );
+ ScmTestCase.checkScmPresence( SVNADMIN_COMMAND_LINE );
SvnScmTestUtils.initializeRepository( repository );
diff --git a/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/UntagMojoTest.java b/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/UntagMojoTest.java
index 07ac9edd..34b489c0 100644
--- a/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/UntagMojoTest.java
+++ b/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/UntagMojoTest.java
@@ -23,10 +23,13 @@
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.testing.AbstractMojoTestCase;
+import org.apache.maven.scm.ScmTestCase;
import org.apache.maven.scm.provider.git.GitScmTestUtils;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.StringUtils;
+import static org.apache.maven.scm.provider.git.GitScmTestUtils.GIT_COMMAND_LINE;
+
public class UntagMojoTest
extends AbstractMojoTestCase
{
@@ -37,13 +40,13 @@
protected void setUp()
throws Exception
{
+ ScmTestCase.checkScmPresence( GIT_COMMAND_LINE );
super.setUp();
checkoutDir = getTestFile( "target/checkout" );
repository = getTestFile( "target/repository" );
-
GitScmTestUtils.initRepo( "src/test/resources/git", repository, checkoutDir );
CheckoutMojo checkoutMojo = (CheckoutMojo) lookupMojo( "checkout", getTestFile(
@@ -66,6 +69,8 @@ protected void setUp()
public void testUntag()
throws Exception
{
+ ScmTestCase.checkScmPresence( GIT_COMMAND_LINE );
+
TagMojo tagMojo = (TagMojo) lookupMojo( "tag", getTestFile( "src/test/resources/mojos/untag/tag.xml" ) );
tagMojo.setWorkingDirectory( checkoutDir );
tagMojo.setConnectionUrl( getConnectionLocalAddress( tagMojo ) );
diff --git a/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/UpdateMojoTest.java b/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/UpdateMojoTest.java
index 83081f12..786ec103 100644
--- a/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/UpdateMojoTest.java
+++ b/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/UpdateMojoTest.java
@@ -27,6 +27,8 @@
import java.io.File;
+import static org.apache.maven.scm.provider.svn.SvnScmTestUtils.SVNADMIN_COMMAND_LINE;
+
/**
* @author Emmanuel Venisse
*
@@ -53,11 +55,7 @@ protected void setUp()
public void testSkipCheckoutWithConnectionUrl()
throws Exception
{
- if ( !ScmTestCase.isSystemCmd( SvnScmTestUtils.SVNADMIN_COMMAND_LINE ) )
- {
- ScmTestCase.printSystemCmdUnavail( SvnScmTestUtils.SVNADMIN_COMMAND_LINE, getName() );
- return;
- }
+ ScmTestCase.checkScmPresence( SVNADMIN_COMMAND_LINE );
SvnScmTestUtils.initializeRepository( repository );