[ https://issues.apache.org/jira/browse/MSHADE-286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17003368#comment-17003368 ]
Peter De Maeyer edited comment on MSHADE-286 at 12/25/19 8:41 PM: ------------------------------------------------------------------ [~struberg], I noticed you assigned this to yourself - are you working on this? I'm working on a fix myself too... was (Author: peterdm): I'm working on a solution on a branch in my fork. > Shading fails when a dependency's main artifact does not exist > -------------------------------------------------------------- > > Key: MSHADE-286 > URL: https://issues.apache.org/jira/browse/MSHADE-286 > Project: Maven Shade Plugin > Issue Type: Bug > Affects Versions: 3.1.0 > Reporter: Peter De Maeyer > Assignee: Mark Struberg > Priority: Minor > > Shading fails when a dependency's main artifact does not exist, see the > methods {{ShadeMojo.invalidMainArtifact/createErrorOutput}} and their caller. > A similar existence check (luckily) does not exist for the other artifacts: > test jar, sources, and test sources. > This was done intentionally, but it's overly strict because it prohibits a > legitimate use case: some projects don't produce a main artifact, but only > e.g. a test artifact. > Such projects can't be shaded because of this existence check. > It would be better to: > - Get rid of this check, or at least relax it, such that shading also works > for projects that don't have a main artifact. > - Complete the symmetry between jar, test jar, sources and test sources by > adding a {{shadeJar}} boolean with default value {{true}}, which disables > shading of main artifacts in a similar way {{shadeTestJar}}, > {{createSourcesJar}} and {{createTestSourcesJar}} work. This will allow > shading to disable creation of a main artifact altogether, even when the > dependencies _do_ have a main artifact. -- This message was sent by Atlassian Jira (v8.3.4#803005)