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:16 UTC

[maven-scm] branch SCM-318 updated (4946751 -> 45530f6)

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch SCM-318
in repository https://gitbox.apache.org/repos/asf/maven-scm.git.


    from 4946751  [SCM-318] Allow tags to be removed with Git implementation
     new 51e3011  Remove obsolete author tag
     new 8d2f2fc  formatting
     new 3c8a654  Align assertion with other tests
     new 5fac6ec  Init default Git user
     new 45530f6  Don't mutate src/test/resources

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/maven/scm/plugin/UntagMojoTest.java | 29 ++++++++--------------
 .../test/resources/mojos/untag/checkout-tag.xml    |  4 +--
 .../src/test/resources/mojos/untag/checkout.xml    |  4 +--
 .../src/test/resources/mojos/untag/tag.xml         |  4 +--
 .../src/test/resources/mojos/untag/untag.xml       |  4 +--
 5 files changed, 19 insertions(+), 26 deletions(-)


[maven-scm] 02/05: formatting

Posted by mi...@apache.org.
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 8d2f2fc08fa0c24da3b9e5dcaf804b5a8646d045
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Tue Jan 1 21:51:53 2019 +0100

    formatting
---
 .../src/test/java/org/apache/maven/scm/plugin/UntagMojoTest.java      | 4 ++--
 1 file changed, 2 insertions(+), 2 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 be214ee..3c1d58d 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
@@ -104,12 +104,12 @@ public class UntagMojoTest
             checkoutMojo.execute();
             fail( "checkoutMojo should have failed to check out deleted tag" );
         }
-        catch (Exception expected)
+        catch ( Exception expected )
         {
         }
     }
 
-    private String getConnectionLocalAddress(AbstractScmMojo mojo)
+    private String getConnectionLocalAddress( AbstractScmMojo mojo )
     {
         String connectionUrl = mojo.getConnectionUrl();
         connectionUrl = StringUtils.replace( connectionUrl, "${basedir}", getBasedir() );


[maven-scm] 05/05: Don't mutate src/test/resources

Posted by mi...@apache.org.
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>


[maven-scm] 04/05: Init default Git user

Posted by mi...@apache.org.
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 5fac6ec84704cfa0502d80702532b601627e9202
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Tue Jan 1 22:20:43 2019 +0100

    Init default Git user
---
 .../src/test/java/org/apache/maven/scm/plugin/UntagMojoTest.java      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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 7774c05..63527dc 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
@@ -67,12 +67,14 @@ public class UntagMojoTest
         checkoutMojo.setCheckoutDirectory( checkoutDir );
 
         checkoutMojo.execute();
+
+        // Add a default user to the config
+        GitScmTestUtils.setDefaultUser( checkoutDir );
     }
 
     public void testUntag()
         throws Exception
     {
-
         TagMojo tagMojo = (TagMojo) lookupMojo( "tag", getTestFile( "src/test/resources/mojos/untag/tag.xml" ) );
         tagMojo.setWorkingDirectory( checkoutDir );
         tagMojo.setConnectionUrl( getConnectionLocalAddress( tagMojo ) );


[maven-scm] 01/05: Remove obsolete author tag

Posted by mi...@apache.org.
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 51e3011f61c7697edc64b205a2ff550e4c199a78
Author: Chris Hennick <49...@users.noreply.github.com>
AuthorDate: Sun Dec 30 23:04:57 2018 -0800

    Remove obsolete author tag
---
 .../src/test/java/org/apache/maven/scm/plugin/UntagMojoTest.java      | 4 ----
 1 file changed, 4 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 d7e1313..be214ee 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
@@ -25,10 +25,6 @@ import org.apache.maven.scm.provider.git.GitScmTestUtils;
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.StringUtils;
 
-/**
- * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
- *
- */
 public class UntagMojoTest
     extends AbstractMojoTestCase
 {


[maven-scm] 03/05: Align assertion with other tests

Posted by mi...@apache.org.
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 3c8a654ac91ba162793ba20cf4b1a92c8eeac68e
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Tue Jan 1 22:20:11 2019 +0100

    Align assertion with other tests
---
 .../src/test/java/org/apache/maven/scm/plugin/UntagMojoTest.java  | 8 ++++++--
 1 file changed, 6 insertions(+), 2 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 3c1d58d..7774c05 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
@@ -20,6 +20,8 @@ package org.apache.maven.scm.plugin;
  */
 
 import java.io.File;
+
+import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.testing.AbstractMojoTestCase;
 import org.apache.maven.scm.provider.git.GitScmTestUtils;
 import org.codehaus.plexus.util.FileUtils;
@@ -102,10 +104,12 @@ public class UntagMojoTest
         try
         {
             checkoutMojo.execute();
-            fail( "checkoutMojo should have failed to check out deleted tag" );
+
+            fail( "mojo execution must fail." );
         }
-        catch ( Exception expected )
+        catch ( MojoExecutionException e )
         {
+            assertTrue( true );
         }
     }