Class CopyUtil
- java.lang.Object
-
- org.apache.maven.plugins.dependency.utils.CopyUtil
-
@Named @Singleton public class CopyUtil extends java.lang.ObjectProvide a copyFile method in one place.- Since:
- 3.7.0
-
-
Field Summary
Fields Modifier and Type Field Description private org.sonatype.plexus.build.incremental.BuildContextbuildContextprivate org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description CopyUtil(org.sonatype.plexus.build.incremental.BuildContext buildContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopyArtifactFile(org.apache.maven.artifact.Artifact sourceArtifact, java.io.File destination)Copies the artifact (file)voidcopyFile(java.io.File source, java.io.File destination)Copies a file to a destination and refreshes the build context for the new file.
-
-
-
Method Detail
-
copyArtifactFile
public void copyArtifactFile(org.apache.maven.artifact.Artifact sourceArtifact, java.io.File destination) throws java.io.IOException, org.apache.maven.plugin.MojoExecutionExceptionCopies the artifact (file)- Parameters:
sourceArtifact- the artifact (file) to copydestination- file name of destination file- Throws:
java.io.IOException- if copy has failedorg.apache.maven.plugin.MojoExecutionException- if artifact file is a directory (which has not been packaged yet)- Since:
- 3.7.0
-
copyFile
public void copyFile(java.io.File source, java.io.File destination) throws java.io.IOExceptionCopies a file to a destination and refreshes the build context for the new file.- Parameters:
source- the source file to copydestination- the destination file- Throws:
java.io.IOException- if copy has failed- Since:
- 3.2.0
-
-