[MDEP-411] if useRepositoryLayout, don't copy pom to output root since it has been done in the repo during artifact install
git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1481292 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/maven/plugin/dependency/CopyDependenciesMojo.java b/src/main/java/org/apache/maven/plugin/dependency/CopyDependenciesMojo.java
index abe06c9..6aef33e 100644
--- a/src/main/java/org/apache/maven/plugin/dependency/CopyDependenciesMojo.java
+++ b/src/main/java/org/apache/maven/plugin/dependency/CopyDependenciesMojo.java
@@ -136,7 +136,7 @@
getLog().info( artifact.getFile().getName() + " already exists in destination." );
}
- if ( isCopyPom() )
+ if ( isCopyPom() && !useRepositoryLayout )
{
copyPoms( getOutputDirectory(), artifacts, this.stripVersion );
copyPoms( getOutputDirectory(), skippedArtifacts,
@@ -144,6 +144,12 @@
}
}
+ /**
+ * install the artifact and the corresponding pom if copyPoms=true
+ *
+ * @param artifact
+ * @param targetRepository
+ */
private void installArtifact( Artifact artifact, ArtifactRepository targetRepository )
{
try