From f12437531fcec00311fcb6ca2accbfc53416b2fb Mon Sep 17 00:00:00 2001 From: Britton Isbell Date: Tue, 16 Sep 2008 03:18:57 +0000 Subject: [PATCH] Fix: If a child dependency matches a parent dependency artifactId and groupId AND both parent and child dependency versions are null AND their types are not equal, then it should not join the dependency. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@695717 13f79535-47bb-0310-9956-ffa450edef68 --- .../project/builder/ArtifactModelContainerFactory.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/maven-project/src/main/java/org/apache/maven/project/builder/ArtifactModelContainerFactory.java b/maven-project/src/main/java/org/apache/maven/project/builder/ArtifactModelContainerFactory.java index 03e382cc40..8ed54a9290 100644 --- a/maven-project/src/main/java/org/apache/maven/project/builder/ArtifactModelContainerFactory.java +++ b/maven-project/src/main/java/org/apache/maven/project/builder/ArtifactModelContainerFactory.java @@ -153,7 +153,14 @@ public final class ArtifactModelContainerFactory { if ( version == null ) { - return ModelContainerAction.JOIN; + if ( c.type.equals( type ) ) + { + return ModelContainerAction.JOIN; + } + else + { + return ModelContainerAction.NOP; + } } return ModelContainerAction.DELETE;//TODO Verify - PluginManagement Section may make versions equal }