You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tamas Cservenak (Jira)" <ji...@apache.org> on 2025/03/01 16:03:00 UTC

[jira] [Commented] (MSOURCES-124) Sources and test sources should have separate artifact types

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

Tamas Cservenak commented on MSOURCES-124:
------------------------------------------

Types are defined in core: https://maven.apache.org/repositories/artifacts.html
And currently there is no type for test sources, so issue is a bit misleading. Also, this is more MNG than MSOURCES issue?

> Sources and test sources should have separate artifact types
> ------------------------------------------------------------
>
>                 Key: MSOURCES-124
>                 URL: https://issues.apache.org/jira/browse/MSOURCES-124
>             Project: Maven Source Plugin
>          Issue Type: Bug
>    Affects Versions: 3.2.1
>            Reporter: Peter De Maeyer
>            Priority: Minor
>
> Imagine a project that has main and test sources, resulting in 4 artifacts:
> ||Artifact||Type||Default classifier||
> |Main JAR|"jar"| |
> |Test JAR|"test-jar"|"tests"|
> |Main sources|"java-source"|"sources"|
> |Test sources|"java-source"|"test-sources"|
> Both sources and test sources have type "java-source".
> As a result, it is not possible to distinguish the sources from the test sources based on type alone.
> The classifier can be used to make that distinction, but the classifier can be overridden to be anything while the type is fixed.
> To fix this, I suggest to introduce a separate type "java-test-source" for test sources.
> The only drawback of that is backward compatibility and impact on other plugins which might use hard-coded types.
> On the other hand, attaching test sources is not often used, so I don't expect it to break a lot, and it will be better in the long run.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)