From 80903fa4d1725d80e583f4deda3fc1067c2d880d Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Fri, 21 May 2010 12:11:53 +0000 Subject: [PATCH] [MNG-4684] distributionManagment section in profiles do not override default one (maven 3 regression) git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@946980 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/maven/model/merge/MavenModelMerger.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java b/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java index b8a42a3e19..63ff03ad6c 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java @@ -345,7 +345,7 @@ public class MavenModelMerger if ( src != null ) { DeploymentRepository tgt = target.getRepository(); - if ( tgt == null ) + if ( sourceDominant || tgt == null ) { tgt = new DeploymentRepository(); target.setRepository( tgt ); @@ -363,7 +363,7 @@ public class MavenModelMerger if ( src != null ) { DeploymentRepository tgt = target.getSnapshotRepository(); - if ( tgt == null ) + if ( sourceDominant || tgt == null ) { tgt = new DeploymentRepository(); target.setSnapshotRepository( tgt ); @@ -380,7 +380,7 @@ public class MavenModelMerger if ( src != null ) { Site tgt = target.getSite(); - if ( tgt == null ) + if ( sourceDominant || tgt == null ) { tgt = new Site(); target.setSite( tgt );