Dan Ziemba created MSHADE-356:
---------------------------------
Summary: Include filters with minimizeJar do not work with single
class file
Key: MSHADE-356
URL: https://issues.apache.org/jira/browse/MSHADE-356
Project: Maven Shade Plugin
Issue Type: Bug
Affects Versions: 3.2.2
Reporter: Dan Ziemba
When using the minimizeJar feature, it is possible to explicitly include some
classes that would have otherwise been excluded: MSHADE-111. The documentation
shows a filter like this:
{code:xml}
<filter>
<artifact>foo:bar</artifact>
<excludeDefaults>false</excludeDefaults>
<includes>
<include>foo/Bar.class</include>
</includes>
</filter>
{code}
This does not seem to actually work. If class Bar is not actually referenced,
it is still removed from the shaded jar.
Using a wildcard include pattern like "{{<include>foo/\*<include>}}" or
"{{<include>foo/Bar\*</include>}}" will work, but including the period like
"{{<include>foo/Bar.\*</include}}" does not work. An include pattern with no
wildcard and no file extension also works: "{{<include>foo/Bar</include>}}".
It seems that the include pattern actually matches on the class name, not the
class file name. Is this a documentation bug, or a bug with the minimizeJar
feature?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)