diff --git a/src/test/java/org/codehaus/mojo/versions/SetScmTagMojoTest.java b/src/test/java/org/codehaus/mojo/versions/SetScmTagMojoTest.java
index db8fae6aef..ebe2d50833 100644
--- a/src/test/java/org/codehaus/mojo/versions/SetScmTagMojoTest.java
+++ b/src/test/java/org/codehaus/mojo/versions/SetScmTagMojoTest.java
@@ -23,7 +23,9 @@
import java.nio.file.Path;
import java.nio.file.Paths;
-import org.codehaus.mojo.versions.utils.BaseMojoTestCase;
+import org.apache.maven.plugin.testing.AbstractMojoTestCase;
+import org.apache.maven.plugin.testing.MojoRule;
+import org.junit.Rule;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
@@ -35,13 +37,16 @@
*
* @author Andrzej Jarmoniuk
*/
-public class SetScmTagMojoTest extends BaseMojoTestCase
+public class SetScmTagMojoTest extends AbstractMojoTestCase
{
+ @Rule
+ public MojoRule mojoRule = new MojoRule( this );
+
@Test
public void testNewScmValues() throws Exception
{
- Path pomFile = Paths.get( "target/test-classes/org/codehaus/mojo/set-scm-tag/issue-342-pom.xml" );
- createMojo( "set-scm-tag", pomFile.toString() )
+ Path pomFile = Paths.get( "target/test-classes/org/codehaus/mojo/set-scm-tag/pom.xml" );
+ mojoRule.lookupConfiguredMojo( pomFile.toFile().getParentFile(), "set-scm-tag" )
.execute();
String output = String.join( "", Files.readAllLines( pomFile ) )
.replaceAll( "\\s*", "" );
diff --git a/src/test/resources/org/codehaus/mojo/set-scm-tag/issue-342-pom.xml b/src/test/resources/org/codehaus/mojo/set-scm-tag/issue-342-pom.xml
deleted file mode 100644
index 681851f29a..0000000000
--- a/src/test/resources/org/codehaus/mojo/set-scm-tag/issue-342-pom.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
- 4.0.0
- default-group
- default-artifact
- 1.0
- pom
-
-
-
-
-
-
- versions-maven-plugin
-
- newTag
- connection
- developerConnection
- url
-
-
-
-
-
\ No newline at end of file
diff --git a/src/test/resources/org/codehaus/mojo/set-scm-tag/pom.xml b/src/test/resources/org/codehaus/mojo/set-scm-tag/pom.xml
index 681851f29a..b09f6b1e34 100644
--- a/src/test/resources/org/codehaus/mojo/set-scm-tag/pom.xml
+++ b/src/test/resources/org/codehaus/mojo/set-scm-tag/pom.xml
@@ -1,3 +1,22 @@
+
+
4.0.0
@@ -11,7 +30,9 @@
+ org.codehaus.mojo
versions-maven-plugin
+ ${project.version}
newTag
connection