Uploaded image for project: 'Maven Resolver'
  1. Maven Resolver
  2. MRESOLVER-267

Align local repository implementation content types

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Resolver
    • None

    Description

      This is due legacy: resolver implements two LRMs: "simple" and "enhanced". The API exposes this method:
      org.eclipse.aether.repository.ArtifactRepository#getContentType
      That in case of those two are inconsistent:

      • Simple LRM factory acts if passed in LocalRepository contentType is "" (empty string) or "simple".
      • Enhanced LRM factory acts if passed in LocalRepository contentType is "" (empty string) or "default".

      BUT, once created, the

      • simple LRM.getRepository().getCotentType() reports "simple" – OK
      • enhanced LRM.getRepository().getContentType() reports "enhanced" – NOT OK

      As using contentType returned from enhanced LRM.getRepository().getContnetType() to create LRM will lead to error, as if you look at factories, no factory will respond to "enhanced" content type (hence, in this cases, hack is needed to override "enhanced" content type to "default").

      This fix is possible only with major upgrade in resolver, as backward fix (to make this work with all supported Maven from 3.2.5 to 3.999) is not really possible now.

      Attachments

        Activity

          People

            Unassigned Unassigned
            cstamas Tamas Cservenak
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: