[
https://issues.apache.org/jira/browse/MDEP-932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17909109#comment-17909109
]
Philippe De Neve commented on MDEP-932:
---------------------------------------
In response to my last comment, the silent option has been deprecated for the
next release, cf. commit
[1e203263|https://github.com/apache/maven-dependency-plugin/commit/1e20326392569ef587844b2fd8434ae7d255d639].
> Don't log successful file copies
> --------------------------------
>
> Key: MDEP-932
> URL: https://issues.apache.org/jira/browse/MDEP-932
> Project: Maven Dependency Plugin
> Issue Type: Improvement
> Reporter: Elliotte Rusty Harold
> Assignee: Elliotte Rusty Harold
> Priority: Minor
> Fix For: 3.8.1
>
>
> In AbstractDependencyMojo
> Either a file is copied successfully and no one wants to read this message or
> it fails and an exception is thrown. Either way, the log message simply isn't
> needed and gets in the way of debugging real failures.
> /**
> * Does the actual copy of the file and logging.
> *
> * @param artifact represents the file to copy.
> * @param destFile file name of destination file.
> * @throws MojoExecutionException with a message if an error occurs.
> */
> protected void copyFile(File artifact, File destFile) throws
> MojoExecutionException {
> try {
> getLog().info("Copying "
> + (this.outputAbsoluteArtifactFilename ?
> artifact.getAbsolutePath() : artifact.getName()) + " to "
> + destFile);
> if (artifact.isDirectory()) {
> // usual case is a future jar packaging, but there are
> special cases: classifier and other packaging
> throw new MojoExecutionException("Artifact has not been
> packaged yet. When used on reactor artifact, "
> + "copy should be executed after packaging: see
> MDEP-187.");
> }
> FileUtils.copyFile(artifact, destFile);
> buildContext.refresh(destFile);
> } catch (IOException e) {
> throw new MojoExecutionException("Error copying artifact from " +
> artifact + " to " + destFile, e);
> }
> }
--
This message was sent by Atlassian Jira
(v8.20.10#820010)