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

building from the middle pom of a (parent,child,grandchild) heirarchy fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-alpha-1, 2.0.4, 2.0.5
    • 3.0-alpha-1
    • POM
    • None
    • Patch

    Description

      Given a heirerchy of projects - parent, child, grandchild - with <parent> and <module> links between them in the normal way:

      Attempting to start a build from the middle of the heirarchy - ie, the "child" - causes maven to attempt to download the parent from the repository - even if the version in the filesystem is correct in terms of

      {artifact,group,version}

      .

      The problem appears to be that the ProjectBuilder first reads the child pom, and caches the result (but not the parent pom). The reactor then makes the ProjectBuilder read the grandchild pom, and hence the child pom (which now comes from the cache), and the parent pom (which it can't find).

      This is much easier demonstrated than explained :/

      The attached patch fixes the problem by making sure that all the projects in the heirarchy (including the parent) are added to the cache. It also includes a test case to demonstrate the problem.

      Attachments

        1. maven-project-middlepom.patch
          5 kB
          Richard van der Hoff

        Issue Links

          Activity

            People

              jdcasey John Dennis Casey
              richvdh Richard van der Hoff
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: