[
https://issues.apache.org/jira/browse/MSHADE-343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Scholte closed MSHADE-343.
---------------------------------
Assignee: Robert Scholte
Resolution: Not A Bug
> Shaded artifact has no version when finalName is set
> ----------------------------------------------------
>
> Key: MSHADE-343
> URL: https://issues.apache.org/jira/browse/MSHADE-343
> Project: Maven Shade Plugin
> Issue Type: Bug
> Affects Versions: 3.2.2
> Reporter: Peter De Maeyer
> Assignee: Robert Scholte
> Priority: Minor
>
> {{ShadeMojo.shadedArtifactFile}} omits the version in the shaded artifact
> file name when {{finalName}} is set.
> That looks like a bug: I think the version should be part of the
> {{shadedName}} in any case.
> I just found this by eyeballing the code, I haven't tried reproducing it with
> an actual scenario yet.
> It only affects situations where {{finalName}} is explicitly set, and it only
> affects non-main artifacts (test jar, sources and test sources).
> The main shaded jar artifact doesn't go through this code path AFAICT, so is
> not affected.
> {code:java}
> if ( project.getBuild().getFinalName() != null )
> {
> // Shouldn't artifact.getVersion() be part of the shadedName here
> too?
> shadedName = project.getBuild().getFinalName() + "-" + classifier
> + "."
> + artifact.getArtifactHandler().getExtension();
> }
> else
> {
> shadedName = shadedArtifactId + "-" + artifact.getVersion() + "-"
> + classifier + "."
> + artifact.getArtifactHandler().getExtension();
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)