Skip to content

Commit d7107da

Browse files
committed
[SCM-943] scm:check-local-modification does not support excludes
1 parent bf86295 commit d7107da

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckLocalModificationsMojo.java

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@
1919
* under the License.
2020
*/
2121

22-
import java.io.File;
22+
import java.io.IOException;
2323

2424
import org.apache.maven.plugin.MojoExecutionException;
2525
import org.apache.maven.plugins.annotations.Mojo;
2626
import org.apache.maven.plugins.annotations.Parameter;
2727
import org.apache.maven.scm.ScmException;
28-
import org.apache.maven.scm.ScmFileSet;
2928
import org.apache.maven.scm.command.status.StatusScmResult;
3029
import org.apache.maven.scm.repository.ScmRepository;
3130

@@ -45,19 +44,13 @@ public class CheckLocalModificationsMojo
4544
*/
4645
@Parameter( property = "scm.checkLocalModification.errorMessage",
4746
defaultValue = "The build will stop as there is local modifications" )
48-
private String errorMessage;
49-
47+
private String errorMessage;
48+
5049
/**
5150
* Skip the check for local modifications if set to {@code true}.
52-
*/
51+
*/
5352
@Parameter( property = "scm.checkLocalModification.skip", defaultValue = "false" )
5453
private boolean skip;
55-
56-
/**
57-
* current directory
58-
*/
59-
@Parameter( defaultValue = "${basedir}", readonly = true )
60-
private File baseDirectory;
6154

6255
public void execute()
6356
throws MojoExecutionException
@@ -74,9 +67,9 @@ public void execute()
7467
try
7568
{
7669
ScmRepository repository = getScmRepository();
77-
result = getScmManager().status( repository, new ScmFileSet( baseDirectory ) );
70+
result = getScmManager().status( repository, getFileSet() );
7871
}
79-
catch ( ScmException e )
72+
catch ( IOException | ScmException e )
8073
{
8174
throw new MojoExecutionException( e.getMessage(), e );
8275
}
@@ -94,5 +87,5 @@ public void execute()
9487
}
9588

9689
}
97-
90+
9891
}

0 commit comments

Comments
 (0)