Maven
  1. Maven
  2. MNG-4740

Maven hangs with big aggregators with lots of inter-modules dependencies

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0-beta-1
    • Fix Version/s: 3.0-beta-2
    • Component/s: Bootstrap & Build
    • Labels:
      None
    • Flags:
      Patch

      Description

      Hello,

      On my main aggregator (~280 modules, lots of inter-modules dependencies), I noticed that since 3.0-beta-1, maven hangs after displaying the list of modules to build. The problem was not occurring with alpha-7.

      After investigation, it seems that with the introduction of parallel build in beta-1, the whole list of module dependencies is computed at the beginning of the build (see http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ProjectSegment.java?r1=931884&r2=935334&diff_format=h)

      It turns out that this calculation, done inside DefaultProjectDependencyGraph, is very unefficient : if a module is referenced n times, its dependencies will be computed n times. The attached patch solves the problem by computing the dependency tree for a given projectId only once.

      1. hangs.patch
        1 kB
        Vincent Latombe

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        1d 10h 20m 1 Benjamin Bentmann 27/Jul/10 15:09
        Mark Thomas made changes -
        Workflow jira [ 12951382 ] Default workflow, editable Closed status [ 12987649 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 21:45:26 UTC 2015 [ 1428270326204 ]
        Mark Thomas made changes -
        Patch Submitted Yes [ 10763 ]
        Flags Patch [ 10430 ]
        Mark Thomas made changes -
        Workflow jira [ 12715016 ] Default workflow, editable Closed status [ 12754615 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 08:49:45 UTC 2015 [ 1428223785911 ]
        Benjamin Bentmann made changes -
        Field Original Value New Value
        Resolution Fixed [ 1 ]
        Fix Version/s 3.0-beta-2 [ 16090 ]
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Benjamin Bentmann [ bentmann ]
        Hide
        Benjamin Bentmann added a comment -

        Applied in r979808, thanks!

        Show
        Benjamin Bentmann added a comment - Applied in r979808 , thanks!
        Vincent Latombe created issue -

          People

          • Assignee:
            Benjamin Bentmann
            Reporter:
            Vincent Latombe
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development