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 2022/05/22 08:16:04 UTC

[maven-scm] branch SCM-943 updated (da7b2d4dc -> bbd23dcfa)

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

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


 discard da7b2d4dc [SCM-943] scm:check-local-modification does not support excludes
     new bbd23dcfa [SCM-943] scm:check-local-modification does not support excludes

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (da7b2d4dc)
            \
             N -- N -- N   refs/heads/SCM-943 (bbd23dcfa)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 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:


[maven-scm] 01/01: [SCM-943] scm:check-local-modification does not support excludes

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit bbd23dcfa9fced2c5a2f91abb47be1c4a660e6ea
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Thu May 19 22:03:55 2022 +0200

    [SCM-943] scm:check-local-modification does not support excludes
    
    This closes #138
---
 .../scm/plugin/CheckLocalModificationsMojo.java     | 21 +++++++--------------
 1 file changed, 7 insertions(+), 14 deletions(-)

diff --git a/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckLocalModificationsMojo.java b/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckLocalModificationsMojo.java
index df106c6e0..c48569d0c 100644
--- a/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckLocalModificationsMojo.java
+++ b/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckLocalModificationsMojo.java
@@ -19,13 +19,12 @@ package org.apache.maven.scm.plugin;
  * under the License.
  */
 
-import java.io.File;
+import java.io.IOException;
 
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.scm.ScmException;
-import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.command.status.StatusScmResult;
 import org.apache.maven.scm.repository.ScmRepository;
 
@@ -45,19 +44,13 @@ public class CheckLocalModificationsMojo
      */
     @Parameter( property = "scm.checkLocalModification.errorMessage",
                     defaultValue = "The build will stop as there is local modifications" )
-    private String errorMessage; 
-    
+    private String errorMessage;
+
     /**
      * Skip the check for local modifications if set to {@code true}.
-     */    
+     */
     @Parameter( property = "scm.checkLocalModification.skip", defaultValue = "false" )
     private boolean skip;
-    
-    /**
-     * current directory
-     */     
-    @Parameter( defaultValue = "${basedir}", readonly = true )
-    private File baseDirectory;
 
     public void execute()
         throws MojoExecutionException
@@ -74,9 +67,9 @@ public class CheckLocalModificationsMojo
         try
         {
             ScmRepository repository = getScmRepository();
-            result = getScmManager().status( repository, new ScmFileSet( baseDirectory ) );
+            result = getScmManager().status( repository, getFileSet() );
         }
-        catch ( ScmException e )
+        catch ( IOException | ScmException e )
         {
             throw new MojoExecutionException( e.getMessage(), e );
         }
@@ -94,5 +87,5 @@ public class CheckLocalModificationsMojo
         }
 
     }
-    
+
 }