Skip to content

Commit

Permalink
Add an exception for COPYRIGHT and NOTICE files in the same way LICEN…
Browse files Browse the repository at this point in the history
…SE is already supported (#1107)
  • Loading branch information
vinnybod committed Apr 26, 2024
1 parent 91984ef commit b4321ee
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public static void main(String[] args) throws IOException {

Map<String, Set<String>> allServices = new TreeMap<>();
Set<String> excludedPaths = readExcludedFileNames(excludes);
Set<String> duplicateExceptions = Set.of("COPYRIGHT", "LICENSE", "NOTICE");

// Ultimately, we want the entries in the output zip to be sorted
// so that we have a deterministic output.
Expand All @@ -131,7 +132,7 @@ public static void main(String[] args) throws IOException {

if ("META-INF/".equals(entry.getName())
|| (!entry.getName().startsWith("META-INF/")
&& !entry.getName().equals("LICENSE")
&& !duplicateExceptions.contains(entry.getName())
&& excludedPaths.contains(entry.getName()))) {
continue;
}
Expand Down

0 comments on commit b4321ee

Please sign in to comment.