mirror of https://github.com/apache/maven.git
Fix for IT 3827. On joins between model containers during the applying of plugin management, transform rule was reversing the plugin config element order. Now do a reverse sort prior to join, so elements end up in correct order.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@713429 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cac8f6eedf
commit
bf5d38a186
|
@ -184,7 +184,9 @@ public final class PomClassicTransformer
|
||||||
ModelContainerAction action = dependencyContainer.containerAction( managementContainer );
|
ModelContainerAction action = dependencyContainer.containerAction( managementContainer );
|
||||||
if ( action.equals( ModelContainerAction.JOIN ) || action.equals( ModelContainerAction.DELETE ) )
|
if ( action.equals( ModelContainerAction.JOIN ) || action.equals( ModelContainerAction.DELETE ) )
|
||||||
{
|
{
|
||||||
source.join( dependencyContainer, managementContainer );
|
ModelContainer reverseSortedContainer = new ArtifactModelContainerFactory().create(
|
||||||
|
ModelTransformerContext.sort(dependencyContainer.getProperties(), ProjectUri.Build.Plugins.Plugin.xUri) );
|
||||||
|
source.join( reverseSortedContainer, managementContainer );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -340,7 +340,7 @@ public final class ModelTransformerContext
|
||||||
* @param baseUri the base URI of every model property
|
* @param baseUri the base URI of every model property
|
||||||
* @return sorted list of model properties
|
* @return sorted list of model properties
|
||||||
*/
|
*/
|
||||||
protected static List<ModelProperty> sort( List<ModelProperty> properties, String baseUri )
|
public static List<ModelProperty> sort( List<ModelProperty> properties, String baseUri )
|
||||||
{
|
{
|
||||||
if ( properties == null )
|
if ( properties == null )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue