maven-shade-plugin icon indicating copy to clipboard operation
maven-shade-plugin copied to clipboard

[MSHADE-411] When Shade finds overlapping classes, clarify which class is added to final artifact

Open jira-importer opened this issue 3 years ago • 3 comments

John Hendrikx opened MSHADE-411 and commented

For example:

[WARNING] mediasystem-jfx-2.0.0-SNAPSHOT.jar, javafx-controls-16-win.jar define 5 overlapping classes:

[WARNING] - javafx.scene.control.skin.SpinnerSkin$2

[WARNING] - javafx.scene.control.skin.SpinnerSkin

[WARNING] - javafx.scene.control.skin.SpinnerSkin$1

[WARNING] - javafx.scene.control.skin.SpinnerSkin$4

[WARNING] - javafx.scene.control.skin.SpinnerSkin$3

Here I purposely override the SpinnerSkin class to fix a bug. But it is unclear which version eventually will make it in the uber.jar (I'm hoping it takes it from the first jar listed).

I could not find anything on the website, faq, stackoverflow that clarifies which version of the class gets included.


No further details from MSHADE-411

jira-importer avatar Mar 11 '22 07:03 jira-importer

Michael Osipov commented

Obviously, the source artifact needs to indicates, no? Or first or last, etc?

jira-importer avatar Mar 11 '22 11:03 jira-importer

John Hendrikx commented

I'm not sure what you are saying, could you explain this a bit more?

jira-importer avatar Mar 11 '22 19:03 jira-importer

Michael Osipov commented

You see warning and overlap, but you don't see the ultimate source of which ends up in the shaded artifact. Therefore, you don't have predictability.

jira-importer avatar Mar 11 '22 20:03 jira-importer