The Apache Flink project has run into an unexpected behavior when using
the maven-shade-plugin.
In one of our modules we define 2 filters:
<filters>
<filter>
<artifact>*</artifact>
<excludes>
<exclude>META-INF/maven/org.weakref/**</exclude>
</excludes>
</filter>
<filter>
<artifact>com.facebook.presto.hadoop:hadoop-apache2</artifact>
<includes>
<include>com/facebook/presto/hadoop/**</include>
</includes>
</filter>
</filters>
Basically, the first filters removes a bit of noise, and the second
includes a specific set of classes from a specific artifact.
The full pom.xml can be found here:
https://github.com/apache/flink/blob/b765e0774c585b02f5906370e245028b15c8fda2/flink-filesystems/flink-s3-fs-presto/pom.xml#L262
With the configuration above the files that should be included based on
the second filter are missing from the jar. (in fact, everything from
hadoop-apache2 is missing)
However, if we reverse the filter order they are contained in the jar.
My question would be whether someone has seen something similar to this
issue. I'm trying to create a small self-contained reproducing project
but haven't succeeded so far :/