Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-2736

Inefficient build order for Maven2 projects

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: maven-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      We're using Maven 2 to build our modules. I've created the projects in
      Hudson and set a build trigger to build whenever a SNAPSHOT dependency
      is built. Unfortunately, it doesn't appear to do this in a
      breadth-first dependency order.

      i.e.

      All of our projects bar one have as a parent our company wide pom,
      which defines repositories, profiles, etc.

      If this project is built, it kicks of a build for the world, but lots
      of them are built repeatedly.

      e.g. Project Common contains our common POM.

      Project Alpha depends on Project Gamma and Project Common.
      Project Gamma depends on Project Common only.

      If Project Common gets built, Project Alpha seems to get built next
      (due to alphabetic ordering somewhere?), then Project Gamma is built,
      and the Project Alpha is built again, since Project Gamma has just
      been built.

      When we have 20 projects, this gets a little inefficient, with certain
      projects being built 3 or 4 times when they really only should be
      built once.

        Attachments

        1. maven-plugin.hpi
          2.20 MB
        2. patch.txt
          19 kB
        3. patch.txt
          18 kB
        4. patch V1.2.diff
          14 kB
        5. patch V1.3.diff
          20 kB

          Issue Links

            Activity

            Hide
            abayer Andrew Bayer added a comment -

            I think I've got this actually fixed! It's still not entirely perfect (I'm
            running into some strangeness in Hudson's logic for determining
            upstream/downstream dependencies in the first place, but that's a separate
            issue), but it's working. This'll be live in 1.317.

            Show
            abayer Andrew Bayer added a comment - I think I've got this actually fixed! It's still not entirely perfect (I'm running into some strangeness in Hudson's logic for determining upstream/downstream dependencies in the first place, but that's a separate issue), but it's working. This'll be live in 1.317.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : abayer
            Path:
            trunk/www/changelog.html
            http://fisheye4.cenqua.com/changelog/hudson/?cs=19981
            Log:
            JENKINS-2736 Updating changelog for issue 2736

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : abayer Path: trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=19981 Log: JENKINS-2736 Updating changelog for issue 2736
            Hide
            abayer Andrew Bayer added a comment -

            Additional testing on one Maven project with multiple modules, using the "build
            modules in parallel" option, has shown it to still be a little overeager in
            kicking off builds - I'm still trying to nail down exactly why.

            Show
            abayer Andrew Bayer added a comment - Additional testing on one Maven project with multiple modules, using the "build modules in parallel" option, has shown it to still be a little overeager in kicking off builds - I'm still trying to nail down exactly why.
            Hide
            abayer Andrew Bayer added a comment -

            Ah. It was because I copied in the wrong private build. Whoopsie. All is good.

            Show
            abayer Andrew Bayer added a comment - Ah. It was because I copied in the wrong private build. Whoopsie. All is good.
            Hide
            abayer Andrew Bayer added a comment -

            Fixed in 1.317.

            Show
            abayer Andrew Bayer added a comment - Fixed in 1.317.

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                jabley jabley
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: