Skip to content

META-INF/services files are not concatenated by scala_binary #261

@greggdonovan

Description

@greggdonovan

If multiple JARs contain the same Service Loader file, they should be combined. For example, we have jar://org_apache_beam_beam_sdks_java_extensions_google_cloud_platform_core/META-INF/services/org.apache.beam.sdk.io.FileSystemRegistrar containing org.apache.beam.sdk.extensions.gcp.storage.GcsFileSystemRegistrar and jar://org_apache_beam_beam_sdks_java_core/META-INF/services/org.apache.beam.sdk.io.FileSystemRegistrar containing org.apache.beam.sdk.io.LocalFileSystemRegistrar.

The _deploy JAR should contained the concatenated contents of both files. This is done by java_binary here.

I'm happy to help with this ticket if you can give me a pointer on the approach you would prefer to see. It seems that JarHelper will need a similar method of deferring writes to the output until the like entries could be concatenated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions