From 965dda3fbf3bd3323762b369ff5fde279b1e0b97 Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Wed, 21 Sep 2005 07:36:39 +0000 Subject: [PATCH] PR: MNG-917 don't overwrite dependency artifacts if they were already created git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@290646 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/maven/plugin/DefaultPluginManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java index 847a6bbdec..06c14f5815 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java @@ -1168,7 +1168,11 @@ public class DefaultPluginManager // check this with yourkit as a hot spot. try { - project.setDependencyArtifacts( project.createArtifacts( artifactFactory, null, null ) ); + // Don't recreate if already created - for effeciency, and because clover plugin adds to it + if ( project.getDependencyArtifacts() == null ) + { + project.setDependencyArtifacts( project.createArtifacts( artifactFactory, null, null ) ); + } } catch ( InvalidVersionSpecificationException e ) {