[ 
https://issues.apache.org/jira/browse/MSHADE-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16816885#comment-16816885
 ] 

Robert Scholte commented on MSHADE-316:
---------------------------------------

bq. As of version 1.6, minimizeJar will respect classes that were specifically 
marked for inclusion in a filter. Note that specifying an include filter for 
classes in an artifact implicitly excludes all non-specified classes in that 
artifact.

That's the last line on the page and that explains the current behavior. It 
also kind of indicates what the preferred solution should be: 

{code:xml}
              <minimizeJar>true</minimizeJar>
              <filters>
                <filter>
                   <artifact>log4j:log4j</artifact>
                   <excludeDefaults>false</excludeDefaults>
                   <includes>
                       <include>somefile</include>
                   </includes>
                </filter>
              </filters>
{code}
[Reporting|https://maven.apache.org/ref/3.6.1/maven-model/maven.html#class_reporting]
 has a similar option, so I'd prefer to follow that.

> Explicit minijar includes
> -------------------------
>
>                 Key: MSHADE-316
>                 URL: https://issues.apache.org/jira/browse/MSHADE-316
>             Project: Maven Shade Plugin
>          Issue Type: Improvement
>            Reporter: Markus Karg
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Minijar currently respects includes, but these have a drawback: Once you 
> defined an include, the _default includes_ are gone! But what you actually 
> want to have when combining minijar with includes is just an "exception" to 
> minijar's filtering, not a complete replacement of the default includes!
> So what we need to make this work intuitively is either "explicit minijar 
> exceptions", or a "useDefaultIncludes=true" option that turns the notion from 
> "replace default includes by the single given include" to "add the single 
> given include ontop of the default includes".



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to