Maven
  1. Maven
  2. MNG-757

Transitive dependency resolution ignores custom repositories

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta-1
    • Fix Version/s: 2.0-beta-1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP, Cygwin
    • Complexity:
      Expert
    • Number of attachments :
      3

      Description

      The attached files set the scene:

      • test-repo.zip - expand this into the root context of a local web server on 127.0.0.1:8080 for a test repo
      • projects.zip - expand this for the projects
      • settings.xml - the ~/.m2/settings.xml file

      The scenario is as follows:

      • test-repo contains a single artifact C
      • project B depends on C
      • project A depends on B & defines test-repo
      • settings.xml also defines test-repo

      The build process is:

      • m2 install B (downloads C, installs B ok)
      • m2 install A (finds B and C in local repo, installs A ok)

      Now the problem is if C is then deleted the second step fails - i.e. m2 only looks in the central repo for C and not the custom test-repo, even though test-repo is defined in both A's POM and settings.xml.

      This didn't happen in 2.0-alpha-3 - is this intentional?

      1. settings.xml
        0.3 kB
        Mark Hobson

        Activity

        Hide
        John Casey added a comment -

        what are the details of the regression caused by this fix, do we know? Do we have a test in place to prevent future regressions?

        Show
        John Casey added a comment - what are the details of the regression caused by this fix, do we know? Do we have a test in place to prevent future regressions?
        Hide
        Brett Porter added a comment -

        the details are in MNG-836

        Show
        Brett Porter added a comment - the details are in MNG-836
        Hide
        John Casey added a comment -

        I'm functionally re-adding the code that got rolled back, because I suspect that this was not the root problem. In addition, I'm adding two integration tests: the first, it0068, will verify that MNG-836 is not repeated; the second, it2001, replicates the scenario originally laid out in this issue, and verifies that it works. This last test - it2001 - is complex, and must be run manually by executing test.sh inside the it2001 directory.

        I'm going to commit what I have for this, and if regressions pop up, I guess we'll fix them.

        Show
        John Casey added a comment - I'm functionally re-adding the code that got rolled back, because I suspect that this was not the root problem. In addition, I'm adding two integration tests: the first, it0068, will verify that MNG-836 is not repeated; the second, it2001, replicates the scenario originally laid out in this issue, and verifies that it works. This last test - it2001 - is complex, and must be run manually by executing test.sh inside the it2001 directory. I'm going to commit what I have for this, and if regressions pop up, I guess we'll fix them.
        Hide
        John Casey added a comment -

        I've worked another 3h on this issue, but I'm not at all sure how to log it properly without causing negative time estimation in JIRA...

        Show
        John Casey added a comment - I've worked another 3h on this issue, but I'm not at all sure how to log it properly without causing negative time estimation in JIRA...
        Hide
        John Casey added a comment -

        see it0068 and it2001

        Show
        John Casey added a comment - see it0068 and it2001

          People

          • Assignee:
            John Casey
            Reporter:
            Mark Hobson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 4 hours
              4h
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 2 hours Time Not Required
              2h