Uploaded image for project: 'Maven Assembly Plugin'
  1. Maven Assembly Plugin
  2. MASSEMBLY-209

Service provider configuration files should be concatenated instead of overwritten

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1, 2.2-beta-1
    • 2.2
    • None
    • None

    Description

      Service provider configuration files are text files that define what "service providers" are available for a specific interface. These files are normally stored in /META-INF/services/ and are named after the interface that is implemented (e.g. "java.io.spi.CharCodec"). See for more info:
      http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#Service%20Provider
      and
      http://java.sun.com/javase/6/docs/api/java/util/ServiceLoader.html

      Building a onejar from a multi-module project where multiple modules have similarly named services files results in a jar-file that includes just one of the service files. As a result, just the providers that are mentioned in that file are seen by applications running from the onejar, providers that were mentioned in the other service files are not. To fix this, service files with identical names should simply be concatenated (making sure that there's a newline between the contents of each service file).

      Attachments

        Activity

          People

            jdcasey John Dennis Casey
            arjohn Arjohn Kampman
            Votes:
            7 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: