Given a scala project that depends on a library with java multi-release dependencies and targets java 8 only, sbt-assembly will log multiple warnings similar to
Fully-qualified classname does not match jar entry:
jar entry: META-INF/versions/9/org/apache/logging/log4j/util/internal/DefaultObjectInputFilter.class
class name: org/apache/logging/log4j/util/internal/DefaultObjectInputFilter.class
Omitting META-INF/versions/9/org/apache/logging/log4j/util/internal/DefaultObjectInputFilter.class.
What is the correct way to deal with these warnings and skip META_INF/versions/* that are not needed for jvm 8?
As best I can tell this must be solved using
assembly / assemblyShadeRulesvia something like:Merely setting
assemblyMergeStrategyvia something likeis not enough to remove the warnings as they originate from the call to the pants based jarjar shader which is run before the the merging strategies are applied.