You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2019/01/01 21:47:21 UTC
[maven-scm] 05/05: Don't mutate src/test/resources
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch SCM-318
in repository https://gitbox.apache.org/repos/asf/maven-scm.git
commit 45530f620ce3f365b4aaf8d244036da03de3ed61
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Tue Jan 1 22:21:38 2019 +0100
Don't mutate src/test/resources
---
.../test/java/org/apache/maven/scm/plugin/UntagMojoTest.java | 11 +----------
.../src/test/resources/mojos/untag/checkout-tag.xml | 4 ++--
maven-scm-plugin/src/test/resources/mojos/untag/checkout.xml | 4 ++--
maven-scm-plugin/src/test/resources/mojos/untag/tag.xml | 4 ++--
maven-scm-plugin/src/test/resources/mojos/untag/untag.xml | 4 ++--
5 files changed, 9 insertions(+), 18 deletions(-)
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 63527dc..07ac9ed 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
@@ -34,8 +34,6 @@ public class UntagMojoTest
File repository;
- File assertionDir;
-
protected void setUp()
throws Exception
{
@@ -43,17 +41,10 @@ public class UntagMojoTest
checkoutDir = getTestFile( "target/checkout" );
- FileUtils.forceDelete( checkoutDir );
-
repository = getTestFile( "target/repository" );
- FileUtils.forceDelete( repository );
-
- assertionDir = getTestFile( "target/assert" );
-
- FileUtils.forceDelete( assertionDir );
- GitScmTestUtils.initRepo( "src/test/resources/git", checkoutDir, assertionDir );
+ GitScmTestUtils.initRepo( "src/test/resources/git", repository, checkoutDir );
CheckoutMojo checkoutMojo = (CheckoutMojo) lookupMojo( "checkout", getTestFile(
"src/test/resources/mojos/untag/checkout.xml" ) );
diff --git a/maven-scm-plugin/src/test/resources/mojos/untag/checkout-tag.xml b/maven-scm-plugin/src/test/resources/mojos/untag/checkout-tag.xml
index cbfad7b..cbf1c57 100644
--- a/maven-scm-plugin/src/test/resources/mojos/untag/checkout-tag.xml
+++ b/maven-scm-plugin/src/test/resources/mojos/untag/checkout-tag.xml
@@ -28,9 +28,9 @@
<connectionType>connection</connectionType>
<scmVersion>mytag</scmVersion>
<scmVersionType>tag</scmVersionType>
- <connectionUrl>scm:git:file:///${basedir}/src/test/resources/git</connectionUrl>
+ <connectionUrl>scm:git:file:///${basedir}/target/repository</connectionUrl>
</configuration>
</plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
diff --git a/maven-scm-plugin/src/test/resources/mojos/untag/checkout.xml b/maven-scm-plugin/src/test/resources/mojos/untag/checkout.xml
index 60ca181..e29441d 100644
--- a/maven-scm-plugin/src/test/resources/mojos/untag/checkout.xml
+++ b/maven-scm-plugin/src/test/resources/mojos/untag/checkout.xml
@@ -26,9 +26,9 @@
<settings implementation="org.apache.maven.settings.Settings"/>
<checkoutDirectory>target/tags/mytag</checkoutDirectory>
<connectionType>connection</connectionType>
- <connectionUrl>scm:git:file:///${basedir}/src/test/resources/git</connectionUrl>
+ <connectionUrl>scm:git:file:///${basedir}/target/repository</connectionUrl>
</configuration>
</plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
diff --git a/maven-scm-plugin/src/test/resources/mojos/untag/tag.xml b/maven-scm-plugin/src/test/resources/mojos/untag/tag.xml
index e23c55b..91e2359 100644
--- a/maven-scm-plugin/src/test/resources/mojos/untag/tag.xml
+++ b/maven-scm-plugin/src/test/resources/mojos/untag/tag.xml
@@ -24,7 +24,7 @@
<artifactId>maven-scm-plugin</artifactId>
<configuration>
<settings implementation="org.apache.maven.settings.Settings"/>
- <connectionUrl>scm:git:file:///${basedir}/src/test/resources/git</connectionUrl>
+ <connectionUrl>scm:git:file:///${basedir}/target/repository</connectionUrl>
<connectionType>connection</connectionType>
<tag>mytag</tag>
<pushChanges>true</pushChanges>
@@ -32,4 +32,4 @@
</plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
diff --git a/maven-scm-plugin/src/test/resources/mojos/untag/untag.xml b/maven-scm-plugin/src/test/resources/mojos/untag/untag.xml
index e23c55b..91e2359 100644
--- a/maven-scm-plugin/src/test/resources/mojos/untag/untag.xml
+++ b/maven-scm-plugin/src/test/resources/mojos/untag/untag.xml
@@ -24,7 +24,7 @@
<artifactId>maven-scm-plugin</artifactId>
<configuration>
<settings implementation="org.apache.maven.settings.Settings"/>
- <connectionUrl>scm:git:file:///${basedir}/src/test/resources/git</connectionUrl>
+ <connectionUrl>scm:git:file:///${basedir}/target/repository</connectionUrl>
<connectionType>connection</connectionType>
<tag>mytag</tag>
<pushChanges>true</pushChanges>
@@ -32,4 +32,4 @@
</plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>