Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-2541

Dependecy order is lost

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.0.4
    • Fix Version/s: None
    • Component/s: Dependencies
    • Labels:
      None

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                carlos Carlos Sanchez Gonzalez
                Reporter:
                gtilley Gareth Tilley
              • Votes:
                1 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: