Maven
  1. Maven
  2. MNG-4834

[regression] MavenProject.getParent() ignores configured repositories

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0-beta-3
    • Fix Version/s: 3.0
    • Component/s: None
    • Labels:
      None
    • Environment:
    • Complexity:
      Intermediate
    • Testcase included:
      yes
    • Number of attachments :
      3

      Description

      The site descriptor from the parent project is no longer found in the local repository. The site plugin tries always to resolve the artifact from the remote repository using the attach-descriptor goal. This is nasty if that repo is not reachable and Maven will wait always until the connection times out before continuing. With M2 this descriptor is found in the local repo: "Parent project loaded from repository.". In both cases version 2.1.1 of the site plugin is used. There's no change in behavior for M3 if the site plugin is upgraded to 3.x.

      1. MNG-4834.tgz
        1 kB
        Jörg Schaible
      2. MNG-4834-remote-repo.tgz
        1 kB
        Jörg Schaible
      3. MNG-settings.xml
        1 kB
        Jörg Schaible

        Activity

        Hide
        Jörg Schaible added a comment -

        The remote repository with the parent pom. Referenced in the settings with file:/tmp/repo.

        Show
        Jörg Schaible added a comment - The remote repository with the parent pom. Referenced in the settings with file:/tmp/repo .
        Hide
        Jörg Schaible added a comment -

        Archive with the projects for the parent pom and the main artifact. Calling

        mvn-3.0 -s MNG-settings.xml clean install

        demonstrates the download attempt, while

        mvn-2.2 -s MNG-settings.xml clean install

        grabs the site descriptor from the local repo.

        Show
        Jörg Schaible added a comment - Archive with the projects for the parent pom and the main artifact. Calling mvn-3.0 -s MNG-settings.xml clean install demonstrates the download attempt, while mvn-2.2 -s MNG-settings.xml clean install grabs the site descriptor from the local repo.
        Hide
        Benjamin Bentmann added a comment -

        I grabbed your projects and the settings and aranged those like this:

        MNG-4834
        +- main
        +- parent
        +- MNG-settings.xml
        

        From within MNG-4834, I ran mvn3 -s MNG-settings.xml clean install -f parent/pom.xml and next mvn -s MNG-settings.xml clean site -f main/pom.xml which yields

        [INFO] --- maven-site-plugin:2.1.1:site (default-site) @ mng-main-4834 ---
        [INFO] Parent project loaded from repository.
        [INFO] Parent project loaded from repository.
        

        i.e. I don't see a download attempt from any remote repo here.

        Feel free to reopen with more precise steps to reproduce and actual logs that show what you observe.

        Show
        Benjamin Bentmann added a comment - I grabbed your projects and the settings and aranged those like this: MNG-4834 +- main +- parent +- MNG-settings.xml From within MNG-4834 , I ran mvn3 -s MNG-settings.xml clean install -f parent/pom.xml and next mvn -s MNG-settings.xml clean site -f main/pom.xml which yields [INFO] --- maven-site-plugin:2.1.1:site (default-site) @ mng-main-4834 --- [INFO] Parent project loaded from repository. [INFO] Parent project loaded from repository. i.e. I don't see a download attempt from any remote repo here. Feel free to reopen with more precise steps to reproduce and actual logs that show what you observe.
        Hide
        Jörg Schaible added a comment -

        No, you may not install the parent pom locally. Then it's always found. Therefore I've provided the "remote" repo as archive.

        Show
        Jörg Schaible added a comment - No, you may not install the parent pom locally. Then it's always found. Therefore I've provided the "remote" repo as archive.
        Hide
        Benjamin Bentmann added a comment -

        Fixed in r1001236.

        Note that your example project continues to suffer from MSHARED-164.

        Show
        Benjamin Bentmann added a comment - Fixed in r1001236 . Note that your example project continues to suffer from MSHARED-164 .
        Hide
        Jörg Schaible added a comment -

        OK, thanks for looking into it.

        Show
        Jörg Schaible added a comment - OK, thanks for looking into it.

          People

          • Assignee:
            Benjamin Bentmann
            Reporter:
            Jörg Schaible
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: