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

slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-ear-plugin.git

commit 1da4a4bc5097252392796de0e3cbb2ba5a2908b2
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Sun Nov 8 11:19:52 2026 +0000

    Remove the maven-shared-utils dependency
    
    The ear source excludes are now a constant in EarMojo with the same 
patterns, and the IT helper uses plexus-utils FileUtils.
    
    Part of apache/maven-shared-utils#452
---
 pom.xml                                            |  5 --
 .../java/org/apache/maven/plugins/ear/EarMojo.java | 64 +++++++++++++++++++++-
 .../maven/plugins/ear/it/AbstractEarPluginIT.java  |  2 +-
 3 files changed, 63 insertions(+), 8 deletions(-)

diff --git a/pom.xml b/pom.xml
index 02e28ce..f87baaa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -156,11 +156,6 @@
       <artifactId>plexus-interpolation</artifactId>
       <version>1.30.0</version>
     </dependency>
-    <dependency>
-      <groupId>org.apache.maven.shared</groupId>
-      <artifactId>maven-shared-utils</artifactId>
-      <version>3.5.0</version>
-    </dependency>
     <dependency>
       <groupId>javax.inject</groupId>
       <artifactId>javax.inject</artifactId>
diff --git a/src/main/java/org/apache/maven/plugins/ear/EarMojo.java 
b/src/main/java/org/apache/maven/plugins/ear/EarMojo.java
index 7d4d3ed..20d99f4 100644
--- a/src/main/java/org/apache/maven/plugins/ear/EarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/ear/EarMojo.java
@@ -63,7 +63,6 @@ import org.apache.maven.shared.filtering.MavenFileFilter;
 import org.apache.maven.shared.filtering.MavenFilteringException;
 import org.apache.maven.shared.filtering.MavenResourcesExecution;
 import org.apache.maven.shared.filtering.MavenResourcesFiltering;
-import org.apache.maven.shared.utils.io.FileUtils;
 import org.codehaus.plexus.archiver.ArchiverException;
 import org.codehaus.plexus.archiver.UnArchiver;
 import org.codehaus.plexus.archiver.ear.EarArchiver;
@@ -89,6 +88,67 @@ import org.codehaus.plexus.util.StringUtils;
         threadSafe = true,
         requiresDependencyResolution = ResolutionScope.TEST)
 public class EarMojo extends AbstractEarMojo {
+    /**
+     * Patterns excluded when copying the ear source directory: version 
control metadata and editor leftovers.
+     */
+    private static final String[] DEFAULT_EXCLUDES = {
+        // Miscellaneous typical temporary files
+        "**/*~",
+        "**/#*#",
+        "**/.#*",
+        "**/%*%",
+        "**/._*",
+
+        // CVS
+        "**/CVS",
+        "**/CVS/**",
+        "**/.cvsignore",
+
+        // Subversion
+        "**/.svn",
+        "**/.svn/**",
+
+        // Arch
+        "**/.arch-ids",
+        "**/.arch-ids/**",
+
+        // Bazaar
+        "**/.bzr",
+        "**/.bzr/**",
+
+        // SurroundSCM
+        "**/.MySCMServerInfo",
+
+        // Mac
+        "**/.DS_Store",
+
+        // Serena Dimensions Version 10
+        "**/.metadata",
+        "**/.metadata/**",
+
+        // Mercurial
+        "**/.hg",
+        "**/.hg/**",
+
+        // git
+        "**/.git",
+        "**/.git/**",
+
+        // BitKeeper
+        "**/BitKeeper",
+        "**/BitKeeper/**",
+        "**/ChangeSet",
+        "**/ChangeSet/**",
+
+        // darcs
+        "**/_darcs",
+        "**/_darcs/**",
+        "**/.darcsrepo",
+        "**/.darcsrepo/**",
+        "**/-darcs-backup*",
+        "**/.darcs-temp-mail"
+    };
+
     /**
      * Default file name mapping used by artifacts located in local repository.
      */
@@ -496,7 +556,7 @@ public class EarMojo extends AbstractEarMojo {
      * @return an array of tokens to exclude
      */
     protected String[] getExcludes() {
-        List<String> excludeList = new 
ArrayList<>(FileUtils.getDefaultExcludesAsList());
+        List<String> excludeList = new 
ArrayList<>(Arrays.asList(DEFAULT_EXCLUDES));
         if (earSourceExcludes != null && !"".equals(earSourceExcludes)) {
             
excludeList.addAll(Arrays.asList(StringUtils.split(earSourceExcludes, ",")));
         }
diff --git 
a/src/test/java/org/apache/maven/plugins/ear/it/AbstractEarPluginIT.java 
b/src/test/java/org/apache/maven/plugins/ear/it/AbstractEarPluginIT.java
index f1aac05..ecfd080 100644
--- a/src/test/java/org/apache/maven/plugins/ear/it/AbstractEarPluginIT.java
+++ b/src/test/java/org/apache/maven/plugins/ear/it/AbstractEarPluginIT.java
@@ -46,7 +46,7 @@ import org.apache.maven.executor.ExecutorHelper;
 import org.apache.maven.executor.ExecutorRequest;
 import org.apache.maven.executor.ExecutorResult;
 import org.apache.maven.plugins.ear.util.ResourceEntityResolver;
-import org.apache.maven.shared.utils.io.FileUtils;
+import org.codehaus.plexus.util.FileUtils;
 import org.junit.jupiter.api.Assertions;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.DefaultHandler;

Reply via email to