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

DefaultArtifactRepositoryFactory.createArtifactRepository overload w/ layoutId passes wrong (repo) id

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.3
    • 3.0.4
    • Embedding
    • None

    Description

      In {[DefaultArtifactRepositoryFactory.java}} there is a method overload:

          public ArtifactRepository createArtifactRepository( String id, String url, String layoutId,
                                                              ArtifactRepositoryPolicy snapshots,
                                                              ArtifactRepositoryPolicy releases )
              throws UnknownRepositoryLayoutException
          {
              return injectSession( factory.createArtifactRepository( layoutId, url, layoutId, snapshots, releases ), true );
          }
      

      Note that layoutId is used twice and id not at all. The result is that you get a remote repo apparently with an ID of default, rather than e.g. central as you intended.

      Attachments

        Activity

          People

            bentmann Benjamin Bentmann
            jglick Jesse N. Glick
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: