This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-war-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new de899e4 [MWAR-643] Use a file set for directory archiving
de899e4 is described below
commit de899e4f47399ae6a04afb46e9fd0b708c4fb4a1
Author: Efe Gökdemir <[email protected]>
AuthorDate: Thu Sep 24 07:13:11 2026 +0300
[MWAR-643] Use a file set for directory archiving
---
.../apache/maven/plugins/war/packaging/AbstractWarPackagingTask.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/src/main/java/org/apache/maven/plugins/war/packaging/AbstractWarPackagingTask.java
b/src/main/java/org/apache/maven/plugins/war/packaging/AbstractWarPackagingTask.java
index 88df489..6529c1f 100644
---
a/src/main/java/org/apache/maven/plugins/war/packaging/AbstractWarPackagingTask.java
+++
b/src/main/java/org/apache/maven/plugins/war/packaging/AbstractWarPackagingTask.java
@@ -35,6 +35,7 @@ import org.codehaus.plexus.archiver.ArchiverException;
import org.codehaus.plexus.archiver.UnArchiver;
import org.codehaus.plexus.archiver.jar.JarArchiver;
import org.codehaus.plexus.archiver.manager.NoSuchArchiverException;
+import org.codehaus.plexus.archiver.util.DefaultFileSet;
import org.codehaus.plexus.interpolation.InterpolationException;
import org.codehaus.plexus.util.DirectoryScanner;
import org.codehaus.plexus.util.FileUtils;
@@ -333,7 +334,9 @@ public abstract class AbstractWarPackagingTask implements
WarPackagingTask {
try {
JarArchiver archiver = context.getJarArchiver();
- archiver.addDirectory(source);
+ DefaultFileSet fileSet = new DefaultFileSet();
+ fileSet.setDirectory(source);
+ archiver.addFileSet(fileSet);
archiver.setDestFile(destination);
archiver.createArchive();
} catch (ArchiverException e) {