Uploaded image for project: 'Maven Shade Plugin'
  1. Maven Shade Plugin
  2. MSHADE-221

ServicesResourceTransformator is not renaming the files itself in META-INF/services

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.4.3
    • None
    • None

    Description

      This bug is related to fix https://issues.apache.org/jira/browse/MSHADE-190

      Actually in MSHADE-190 it seems that the relocation of entries within META-INF/services/* files is implemented.

      However, it is also necessary to rename the files itself if they start with the affected pattern name.

      If it is not done, this is causing issues with e.g. Lucene relocation:

      • org.apache.lucene.* package names are relocated successfully throughout our project
      • within META-INF/services there is a file called org.apache.lucene.codecs.Codec
      • the contents of that file are relocated successfully, but the file name itself (which is actually the SPI class name) is not changed and will not be found after relocating because it is not being correctly relocated as well

      When we open the resulting JAR file and rename org.apache.lucene.codecs.Codec to [relocationPrefix].org.apache.lucene.codecs.Codec - everything works as expected.

      See https://docs.oracle.com/javase/7/docs/api/java/util/spi/LocaleServiceProvider.html
      "A provider identifies itself with a provider-configuration file in the resource directory META-INF/services, >>> using the fully qualified provider interface class name as the file name <<<"

      Attachments

        Issue Links

          Activity

            People

              rfscholte Robert Scholte
              rh78 Reinhard Holzner
              Votes:
              4 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: