Maven 2 & 3

Dependecy order is lost

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: 2.0.4
  • Fix Version/s: None
  • Component/s: Dependencies
  • Labels:
    None
  • Complexity:
    Intermediate
  • Number of attachments :
    0

Description

in org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler:

private void assembleDependencyInheritance( Model child, Model parent )
{
Map depsMap = new HashMap();

List deps = parent.getDependencies();

if ( deps != null )
{
for ( Iterator it = deps.iterator(); it.hasNext(); )
{ Dependency dependency = (Dependency) it.next(); depsMap.put( dependency.getManagementKey(), dependency ); }
}

deps = child.getDependencies();

if ( deps != null )
{
for ( Iterator it = deps.iterator(); it.hasNext(); )
{ Dependency dependency = (Dependency) it.next(); depsMap.put( dependency.getManagementKey(), dependency ); } }
}

child.setDependencies( new ArrayList( depsMap.values() ) );
}

This method mixes up the order of the dependenies due to the use of the Map.

Issue Links

Activity

There are no comments yet on this issue.

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: