[ https://issues.apache.org/jira/browse/MDEP-976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17948389#comment-17948389 ]
ASF GitHub Bot commented on MDEP-976: ------------------------------------- Ndacyayisenga-droid commented on PR #523: URL: https://github.com/apache/maven-dependency-plugin/pull/523#issuecomment-2841064860 > notice: IIUC, the conflict happens only when stripVersion is enable, isn't it? then WARN if not stripVersion, because it warns about 2 groupIds that you can't really differentiate and ERROR if this leads to overwrite, as it is better to fail the build than keep a silent conflicted file overwritten > > WDYT of this behaviour poposal? @hboutemy this might cause a lot of build failures, especially in cases where two different artifacts share the same artifactId. I'm not sure. Is it actually valid in Maven for two different artifacts to have the same artifactId but different groupIds?. I tried to reproduce the issue in this projecct https://github.com/Ndacyayisenga-droid/mdep-976 (just execute the script). results Current version  For my snapshot  > artifactId is not guaranteed to be globally unique > -------------------------------------------------- > > Key: MDEP-976 > URL: https://issues.apache.org/jira/browse/MDEP-976 > Project: Maven Dependency Plugin > Issue Type: Bug > Components: copy-dependencies > Affects Versions: 3.8.1 > Reporter: Gili > Priority: Major > > The copy-dependencies Mojo incorrectly assumes that a dependency's artifactId > is globally unique. If a project depends on two different groupIds that > happen to have the same artifactId then one dependency will overwrite the > other. > Consider adding ${groupId} to the default output filename and/or add an > option for doing so in case users wish to retain backwards compatibility. -- This message was sent by Atlassian Jira (v8.20.10#820010)