Skip to content

Commit c847c9a

Browse files
committed
Don't add default empty list to excludes
1 parent f3a5cf9 commit c847c9a

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@
5656
public abstract class AbstractSourceJarMojo implements Mojo {
5757
private static final String[] DEFAULT_INCLUDES = new String[] {"**/**"};
5858

59-
private static final String[] DEFAULT_EXCLUDES = new String[] {};
60-
6159
/**
6260
* List of files to include. Specified as fileset patterns which are relative to the input directory whose contents
6361
* is being packaged into the JAR.
@@ -542,7 +540,7 @@ private String[] getCombinedIncludes(List<String> additionalIncludes) {
542540

543541
/**
544542
* Combines the user parameter {@link #excludes}, the default excludes from plexus FileUtils, and the contents of
545-
* the parameter addionalExcludes.
543+
* the parameter additionalExcludes.
546544
*
547545
* @param additionalExcludes Additional excludes to add to the array
548546
* @return The combined list of excludes.
@@ -562,10 +560,6 @@ private String[] getCombinedExcludes(List<String> additionalExcludes) {
562560
combinedExcludes.addAll(additionalExcludes);
563561
}
564562

565-
if (combinedExcludes.isEmpty()) {
566-
combinedExcludes.addAll(Arrays.asList(DEFAULT_EXCLUDES));
567-
}
568-
569563
return combinedExcludes.toArray(new String[0]);
570564
}
571565

0 commit comments

Comments
 (0)