You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2025/11/23 19:39:52 UTC

(maven-source-plugin) branch def created (now c847c9a)

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

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


      at c847c9a  Don't add default empty list to excludes

This branch includes the following new commits:

     new c847c9a  Don't add default empty list to excludes

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.



(maven-source-plugin) 01/01: Don't add default empty list to excludes

Posted by el...@apache.org.
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 <el...@ibiblio.org>
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]);
     }