Fix: MNG-3943

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@733036 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Britton Isbell 2009-01-09 13:42:37 +00:00
parent b4931fef14
commit 647a0112cc
2 changed files with 7 additions and 4 deletions

View File

@ -76,6 +76,8 @@ public final class ArtifactModelContainerFactory
private String classifier;
private String uri;
private List<ModelProperty> properties;
private static String findBaseUriFrom( List<ModelProperty> modelProperties )
@ -95,7 +97,7 @@ public final class ArtifactModelContainerFactory
{
this.properties = new ArrayList<ModelProperty>( properties );
this.properties = Collections.unmodifiableList( this.properties );
String uri = findBaseUriFrom( this.properties );
uri = findBaseUriFrom( this.properties );
for ( ModelProperty mp : this.properties )
{
@ -193,7 +195,8 @@ public final class ArtifactModelContainerFactory
if ( c.groupId.equals( groupId ) && c.artifactId.equals( artifactId ) && c.type.equals( type )
&& c.classifier.equals( classifier ))
{
if ( c.version.equals( version ) || version.equals("") || c.version.equals(""))
if ( uri.startsWith(ProjectUri.Build.Plugins.xUri) || c.version.equals( version )
|| version.equals("") || c.version.equals(""))
{
return ModelContainerAction.JOIN;
}

View File

@ -166,14 +166,14 @@ public class PomConstructionTest
assertEquals( 4, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
}
/* FIXME: cf. MNG-3943
/* FIXME: cf. MNG-3943*/
public void testMergeOfPluginExecutionsWhenChildAndParentUseDifferentPluginVersions()
throws Exception
{
PomTestWrapper pom = buildPom( "plugin-exec-merging-version-insensitive/sub" );
assertEquals( 4, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
}
//*/
public void testInterpolationWithXmlMarkup()
throws Exception