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

elharo pushed a commit to branch def
in repository https://gitbox.apache.org/repos/asf/maven-source-plugin.git

commit c847c9ac2a88a5e7087066d1905c7dce5d4d6464
Author: Elliotte Rusty Harold <[email protected]>
AuthorDate: Sun Nov 23 13:39:38 2025 -0600

    Don't add default empty list to excludes
---
 .../org/apache/maven/plugins/source/AbstractSourceJarMojo.java    | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git 
a/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java 
b/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java
index d8f1747..5d56ac1 100644
--- a/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java
@@ -56,8 +56,6 @@ import org.codehaus.plexus.util.FileUtils;
 public abstract class AbstractSourceJarMojo implements Mojo {
     private static final String[] DEFAULT_INCLUDES = new String[] {"**/**"};
 
-    private static final String[] DEFAULT_EXCLUDES = new String[] {};
-
     /**
      * List of files to include. Specified as fileset patterns which are 
relative to the input directory whose contents
      * is being packaged into the JAR.
@@ -542,7 +540,7 @@ public abstract class AbstractSourceJarMojo implements Mojo 
{
 
     /**
      * Combines the user parameter {@link #excludes}, the default excludes 
from plexus FileUtils, and the contents of
-     * the parameter addionalExcludes.
+     * the parameter additionalExcludes.
      *
      * @param additionalExcludes Additional excludes to add to the array
      * @return The combined list of excludes.
@@ -562,10 +560,6 @@ public abstract class AbstractSourceJarMojo implements 
Mojo {
             combinedExcludes.addAll(additionalExcludes);
         }
 
-        if (combinedExcludes.isEmpty()) {
-            combinedExcludes.addAll(Arrays.asList(DEFAULT_EXCLUDES));
-        }
-
         return combinedExcludes.toArray(new String[0]);
     }
 

Reply via email to