Apply exclusions to existing war entries
Update `RepackageMojo` and supporting classes so that `exclusions` on the repackage goal apply to both the contributed libraries and any existing jar entries already contained in the original war. Prior to this commit, exclusions would apply to contributed jars (for example, those in `WEB-INF/lib-provided`) but not jars that were packaged directly into `WEB-INF/lib` by the war plugin Fixes gh-15808 Co-authored-by: Phillip Webb <pwebb@vmware.com>
This commit is contained in:
committed by
Phillip Webb
parent
4d694ddaa8
commit
b790c82732
@@ -198,7 +198,7 @@ abstract class ArchiveCommand extends OptionParsingCommand {
|
||||
List<Library> libraries = new ArrayList<>();
|
||||
for (URL dependency : dependencies) {
|
||||
File file = new File(dependency.toURI());
|
||||
libraries.add(new Library(file, getLibraryScope(file)));
|
||||
libraries.add(new Library(null, file, getLibraryScope(file), null, false, false, true));
|
||||
}
|
||||
return libraries;
|
||||
}
|
||||
@@ -256,7 +256,7 @@ abstract class ArchiveCommand extends OptionParsingCommand {
|
||||
List<Library> libraries = new ArrayList<>();
|
||||
for (MatchedResource entry : entries) {
|
||||
if (entry.isRoot()) {
|
||||
libraries.add(new Library(entry.getFile(), LibraryScope.COMPILE));
|
||||
libraries.add(new Library(null, entry.getFile(), LibraryScope.COMPILE, null, false, false, true));
|
||||
}
|
||||
else {
|
||||
writeClasspathEntry(writer, entry);
|
||||
|
||||
Reference in New Issue
Block a user