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/22 22:24:11 UTC
(maven-ejb-plugin) branch bu created (now 555eb05)
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a change to branch bu
in repository https://gitbox.apache.org/repos/asf/maven-ejb-plugin.git
at 555eb05 Inline deprecated methods
This branch includes the following new commits:
new 555eb05 Inline deprecated methods
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-ejb-plugin) 01/01: Inline deprecated methods
Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch bu
in repository https://gitbox.apache.org/repos/asf/maven-ejb-plugin.git
commit 555eb059352e921f927bdbe36ec3d857095a26a6
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Sat Nov 22 16:24:00 2025 -0600
Inline deprecated methods
---
src/main/java/org/apache/maven/plugins/ejb/EjbMojo.java | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugins/ejb/EjbMojo.java b/src/main/java/org/apache/maven/plugins/ejb/EjbMojo.java
index 38bf0a9..f5aa1d3 100644
--- a/src/main/java/org/apache/maven/plugins/ejb/EjbMojo.java
+++ b/src/main/java/org/apache/maven/plugins/ejb/EjbMojo.java
@@ -43,11 +43,14 @@ import org.apache.maven.shared.filtering.FilterWrapper;
import org.apache.maven.shared.filtering.MavenFileFilter;
import org.apache.maven.shared.filtering.MavenFilteringException;
import org.apache.maven.shared.filtering.MavenResourcesExecution;
+import org.codehaus.plexus.archiver.AbstractArchiver;
import org.codehaus.plexus.archiver.ArchiverException;
import org.codehaus.plexus.archiver.jar.JarArchiver;
import org.codehaus.plexus.archiver.jar.ManifestException;
import org.codehaus.plexus.util.FileUtils;
+import static org.codehaus.plexus.archiver.util.DefaultFileSet.fileSet;
+
/**
* Build an EJB (and optional client) from the current project.
*
@@ -363,7 +366,10 @@ public class EjbMojo extends AbstractMojo {
IncludesExcludes ie =
new IncludesExcludes(Collections.emptyList(), excludes, DEFAULT_INCLUDES_LIST, defaultExcludes);
- archiver.getArchiver().addDirectory(sourceDirectory, ie.resultingIncludes(), ie.resultingExcludes());
+ AbstractArchiver abstractArchiver = archiver.getArchiver();
+ final String[] includes = ie.resultingIncludes();
+ final String[] excludes1 = ie.resultingExcludes();
+ abstractArchiver.addFileSet(fileSet(sourceDirectory).prefixed("").includeExclude(includes, excludes1));
// FIXME: We should be able to filter more than just the deployment descriptor?
if (deploymentDescriptor.exists()) {
@@ -407,7 +413,10 @@ public class EjbMojo extends AbstractMojo {
IncludesExcludes ie = new IncludesExcludes(
clientIncludes, clientExcludes, DEFAULT_INCLUDES_LIST, DEFAULT_CLIENT_EXCLUDES_LIST);
- clientArchiver.getArchiver().addDirectory(sourceDirectory, ie.resultingIncludes(), ie.resultingExcludes());
+ AbstractArchiver abstractArchiver = clientArchiver.getArchiver();
+ final String[] includes = ie.resultingIncludes();
+ final String[] excludes1 = ie.resultingExcludes();
+ abstractArchiver.addFileSet(fileSet(sourceDirectory).prefixed("").includeExclude(includes, excludes1));
clientArchiver.createArchive(session, project, archive);