@@ -201,7 +201,7 @@ protected void copyArtifact(
201
201
* @param theUseBaseVersion specifies if the baseVersion of the artifact should be used instead of the version.
202
202
* @param removeClassifier specifies if the classifier should be removed from the file name when copying.
203
203
* @throws MojoExecutionException with a message if an error occurs.
204
- * @see CopyUtil#copyFile(File , File)
204
+ * @see CopyUtil#copyArtifactFile(Artifact , File)
205
205
* @see DependencyUtil#getFormattedOutputDirectory(boolean, boolean, boolean, boolean, boolean, boolean, File, Artifact)
206
206
*/
207
207
protected void copyArtifact (
@@ -227,9 +227,10 @@ protected void copyArtifact(
227
227
File destFile = new File (destDir , destFileName );
228
228
229
229
try {
230
- copyUtil .copyFile (artifact . getFile () , destFile );
230
+ copyUtil .copyArtifactFile (artifact , destFile );
231
231
} catch (IOException e ) {
232
- throw new MojoExecutionException ("Failed copy " + artifact .getFile () + " to " + destFile , e );
232
+ throw new MojoExecutionException (
233
+ "Failed to copy artifact '" + artifact + "' (" + artifact .getFile () + ") to " + destFile , e );
233
234
}
234
235
}
235
236
@@ -271,10 +272,12 @@ public void copyPoms(File destDir, Set<Artifact> artifacts, boolean removeVersio
271
272
pomArtifact , removeVersion , prependGroupId , useBaseVersion , removeClassifier ));
272
273
if (!pomDestFile .exists ()) {
273
274
try {
274
- copyUtil .copyFile (pomArtifact . getFile () , pomDestFile );
275
+ copyUtil .copyArtifactFile (pomArtifact , pomDestFile );
275
276
} catch (IOException e ) {
276
277
throw new MojoExecutionException (
277
- "Failed copy " + pomArtifact .getFile () + " to " + pomDestFile , e );
278
+ "Failed to copy artifact '" + pomArtifact + "' (" + pomArtifact .getFile () + ") to "
279
+ + pomDestFile ,
280
+ e );
278
281
}
279
282
}
280
283
}
0 commit comments