You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Peter De Maeyer (Jira)" <ji...@apache.org> on 2020/01/01 20:36:00 UTC

[jira] [Commented] (MSHADE-339) Shaded test jar has wrong type "jar"

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

Peter De Maeyer commented on MSHADE-339:
----------------------------------------

In terms of file distribution, indeed you can achieve the same by using "jar", since the type is not stored in the artifact name.
Reactor resolution on the other hand is exactly the case where I expected to prove my point that "jar" is a bug and it should be "test-jar":
- "test-jar" should end up on the _test_ classpath and be propagated as such to dependent projects. Test classpaths should not be visible on the main classpath.
- "jar" should end up on the main classpath (which is also visible on the main classpath).

What I expected is that, because shaded test classes are attached with the wrong type "jar", test classes from a shaded project would pollute the _main_ classpath of a dependent project, which would be a bug.
Unfortunately, the reactor behaves differently than I thought - it seems to use the type of the _consuming_ project instead of that of the _producing_ project - and I wasn't able to prove anything yet.

> Shaded test jar has wrong type "jar"
> ------------------------------------
>
>                 Key: MSHADE-339
>                 URL: https://issues.apache.org/jira/browse/MSHADE-339
>             Project: Maven Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2, 3.2.2
>            Reporter: Peter De Maeyer
>            Priority: Minor
>             Fix For: 3.2.2
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The shaded test jar has the wrong type "jar".
> It should be "test-jar".



--
This message was sent by Atlassian Jira
(v8.3.4#803005)