Skip to content

Commit

Permalink
[MDEP-956] Silence artifact copying
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo committed Oct 12, 2024
1 parent 706f200 commit 2ea4d05
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugin.MojoExecutionException;
import org.codehaus.plexus.util.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonatype.plexus.build.incremental.BuildContext;

/**
Expand All @@ -41,8 +39,6 @@
@Singleton
public class CopyUtil {

private final Logger logger = LoggerFactory.getLogger(CopyUtil.class);

private final BuildContext buildContext;

@Inject
Expand All @@ -51,18 +47,16 @@ public CopyUtil(BuildContext buildContext) {
}

/**
* Does the actual copy of the artifact (file) and logging.
* Copies the artifact (file).
*
* @param sourceArtifact represents the artifact (file) to copy.
* @param destination file name of destination file.
* @param sourceArtifact represents the artifact (file) to copy
* @param destination file name of destination file
* @throws IOException if copy has failed
* @throws MojoExecutionException if artifact file is a directory (which has not been packaged yet)
*
* @since 3.7.0
*/
public void copyArtifactFile(Artifact sourceArtifact, File destination) throws IOException, MojoExecutionException {
logger.info("Copying artifact '{}' ({}) to {}", sourceArtifact, sourceArtifact.getFile(), destination);

File source = sourceArtifact.getFile();
if (source.isDirectory()) {
// usual case is a future jar packaging, but there are special cases: classifier and other packaging
Expand Down

0 comments on commit 2ea4d05

Please sign in to comment.