removed deployable copy

This commit is contained in:
2024-03-11 22:46:14 -04:00
parent a75429ea40
commit d6c69768de

View File

@@ -16,9 +16,10 @@ package com.inteligr8.wildfly.maven.goal;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
import org.apache.maven.plugin.MojoExecutionException; 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.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.plugins.annotations.Parameter;
@@ -40,6 +41,8 @@ public class CopyDeploymentResourcesGoal extends AbstractDeploymentGoal {
private File libDirectory; private File libDirectory;
private List<String> manifestClassPath = new LinkedList<>();
@Override @Override
protected void executePre() throws MojoExecutionException { protected void executePre() throws MojoExecutionException {
if (this.isWebApp()) { if (this.isWebApp()) {
@@ -50,27 +53,11 @@ 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 @Override
protected void handleDependency(Dependency dependency) throws MojoExecutionException { protected void handleDependency(Dependency dependency) throws MojoExecutionException {
try { try {
FileUtils.copyFileToDirectory(dependency.getArtifact().getFile(), this.libDirectory); FileUtils.copyFileToDirectory(dependency.getArtifact().getFile(), this.libDirectory);
this.manifestClassPath.add(this.libPath + "/" + dependency.getArtifact().getFile().getName());
} catch (IOException ie) { } catch (IOException ie) {
throw new MojoExecutionException("An I/O related issue occurred", ie); throw new MojoExecutionException("An I/O related issue occurred", ie);
} }
@@ -85,6 +72,7 @@ public class CopyDeploymentResourcesGoal extends AbstractDeploymentGoal {
@Override @Override
public void executePost() throws MojoExecutionException { public void executePost() throws MojoExecutionException {
} }
} }