diff --git a/src/main/java/com/inteligr8/wildfly/maven/WildflyArtifactExtractor.java b/src/main/java/com/inteligr8/wildfly/maven/WildflyArtifactExtractor.java index 2a49e6e..2001c0a 100644 --- a/src/main/java/com/inteligr8/wildfly/maven/WildflyArtifactExtractor.java +++ b/src/main/java/com/inteligr8/wildfly/maven/WildflyArtifactExtractor.java @@ -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 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 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(); diff --git a/src/main/java/com/inteligr8/wildfly/maven/goal/CopyDeploymentResourcesGoal.java b/src/main/java/com/inteligr8/wildfly/maven/goal/CopyDeploymentResourcesGoal.java index 17d9f97..2fb3c01 100644 --- a/src/main/java/com/inteligr8/wildfly/maven/goal/CopyDeploymentResourcesGoal.java +++ b/src/main/java/com/inteligr8/wildfly/maven/goal/CopyDeploymentResourcesGoal.java @@ -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 {