fixed support for EJB client libraries
This commit is contained in:
@@ -108,25 +108,27 @@ public class WildflyArtifactExtractor {
|
||||
if (this.getLog().isDebugEnabled())
|
||||
this.getLog().debug("Formulated artifact effective POM [" + artifact + "]: " + model.getId());
|
||||
|
||||
switch (model.getPackaging().toLowerCase()) {
|
||||
case "ear":
|
||||
case "war":
|
||||
case "ejb":
|
||||
this.getLog().debug("Discovered deployable artifact [" + artifact + "]: " + model.getId());
|
||||
|
||||
WildflyDeployable deployable = new WildflyDeployable();
|
||||
deployable.id = artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getClassifier();
|
||||
deployable.version = artifact.getVersion();
|
||||
deployable.type = model.getPackaging();
|
||||
|
||||
Map<String, String> props = new HashMap<>();
|
||||
props.put("id", deployable.id);
|
||||
props.put("version", deployable.version);
|
||||
props.put("type", deployable.type);
|
||||
artifact.setProperties(props);
|
||||
|
||||
return deployable;
|
||||
default:
|
||||
if (!"client".equals(artifact.getClassifier())) {
|
||||
switch (model.getPackaging().toLowerCase()) {
|
||||
case "ear":
|
||||
case "war":
|
||||
case "ejb":
|
||||
this.getLog().debug("Discovered deployable artifact [" + artifact + "]: " + model.getId());
|
||||
|
||||
WildflyDeployable deployable = new WildflyDeployable();
|
||||
deployable.id = artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getClassifier();
|
||||
deployable.version = artifact.getVersion();
|
||||
deployable.type = model.getPackaging();
|
||||
|
||||
Map<String, String> props = new HashMap<>();
|
||||
props.put("id", deployable.id);
|
||||
props.put("version", deployable.version);
|
||||
props.put("type", deployable.type);
|
||||
artifact.setProperties(props);
|
||||
|
||||
return deployable;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
Properties modelProps = model.getProperties();
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user