From 83c2ba498d5b37110ad9827dc96f33a3bb4140ad Mon Sep 17 00:00:00 2001 From: Britton Isbell Date: Mon, 22 Sep 2008 20:36:35 +0000 Subject: [PATCH] Fixed problem with inheriting versions of artifacts. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@697979 13f79535-47bb-0310-9956-ffa450edef68 --- .../builder/ArtifactModelContainerFactory.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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 c490c6ce9f..5de7601f0b 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 @@ -165,9 +165,23 @@ public final class ArtifactModelContainerFactory return ModelContainerAction.NOP; } } - return ModelContainerAction.DELETE;//TODO Verify - PluginManagement Section may make versions equal + return ModelContainerAction.JOIN; + } + if ( version == null ) + { + if ( c.version == null ) + { + if ( c.type.equals( type ) ) + { + return ModelContainerAction.JOIN; + } + else + { + return ModelContainerAction.NOP; + } + } + return ModelContainerAction.JOIN; } - if ( c.version.equals( version ) ) { if ( c.type.equals( type ) )