fixed support for EJB client libraries

This commit is contained in:
2024-03-09 16:29:26 -05:00
parent 6b5dfddd71
commit c4385d11b4
2 changed files with 39 additions and 19 deletions

View File

@@ -108,6 +108,7 @@ public class WildflyArtifactExtractor {
if (this.getLog().isDebugEnabled())
this.getLog().debug("Formulated artifact effective POM [" + artifact + "]: " + model.getId());
if (!"client".equals(artifact.getClassifier())) {
switch (model.getPackaging().toLowerCase()) {
case "ear":
case "war":
@@ -128,6 +129,7 @@ public class WildflyArtifactExtractor {
return deployable;
default:
}
}
Properties modelProps = model.getProperties();
String moduleId = modelProps.getProperty("wildfly.module.id");

View File

@@ -18,6 +18,7 @@ import java.io.File;
import java.io.IOException;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
@@ -49,6 +50,23 @@ public class CopyDeploymentResourcesGoal extends AbstractDeploymentGoal {
}
}
@Override
protected void handleDeployableDependency(Dependency dependency) throws MojoExecutionException, MojoFailureException {
String type = dependency.getArtifact().getProperties().get("type");
if ("ejb".equals(type)) {
}
try {
FileUtils.copyFileToDirectory(dependency.getArtifact().getFile(), this.libDirectory);
} catch (IOException ie) {
throw new MojoExecutionException("An I/O related issue occurred", ie);
}
if (this.getLog().isInfoEnabled())
this.getLog().info("Copied resource artifact: " + dependency.getArtifact());
}
@Override
protected void handleDependency(Dependency dependency) throws MojoExecutionException {
try {