kriegaex edited a comment on pull request #104:
URL: 
https://github.com/apache/maven-shade-plugin/pull/104#issuecomment-883955225


   @rmannibucau, you just completely lost me. I do not understand what you are 
talking about. MSHADE-366 is specifically about minimisation, your own PR #108 
is unrelated. So I am returning to the actual main topic again, asking if we 
want similar behaviour for service handling during minimisation for directories 
(i.e. for the own module) as it already exists for dependency JARs. So far, so 
good.
   
   Are you suggesting to completely remove or deprecate the `minimizeJar` 
option? Then all the debates of the previous weeks would have been for nothing. 
I like that feature and many, many projects use it. So we cannot simply retire 
or remove it without providing a migration path to something at least at 
powerful, covering all existing use cases, maybe more (optionally). Are you 
saying that there are transformer configurations which can minimise JARs? I 
have zero experience with transformers, so please explain what you mean, or 
stop me and clarify if I completely misunderstood you. In any case, we should 
**not** drop minification. Why remove a useful feature just because it is not 
perfect? But if you like to explain its limitations better in the 
documentation, we can of course do that.
   
   ---
   
   Update for my previous experiment with self-minimisation: Commenting out 
this line of code
   
   
https://github.com/apache/maven-shade-plugin/blob/0070183766f46bca73752a9f2cee5cdf44eaa7cf/src/main/java/org/apache/maven/plugins/shade/filter/MinijarFilter.java#L114
   
   makes the directory filter effective, but of course we have a boot-strapping 
problem now, because Shade does not know which class(es) to treat as entry 
points, consequentially treating all classes as potentially removable, 
including e.g. classes with `main` methods, even if there is an active 
`ManifestResourceTransformer` setting a `mainClass` attribute. Ergo, too many 
classes are being removed and only the service provider interfaces and 
implementations found via SPI config scanning are being kept. This is, of 
course, not what we want. But at least I could chack that my new directory 
scanner `MinijarFilter` in actually works. If you like to take a look, I can 
push the commit. I can always fix it later and squash with a subsequent commit.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to