You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fail with "duplicate dependency" since 4.0.0-rc3 #2532
I face the issue when trying to upgrade Maven 4 for Spark apache/spark#51230
Maven 4.0.0-rc-2 works, but it starts to fail since RC3 with
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:3.1.4:install (default-install) on project spark-tags_2.13: Execution default-install of goal org.apache.maven.plugins:maven-install-plugin:3.1.4:install failed: Duplicate dependency: Dependency {groupId=org.scalatest, artifactId=scalatest_2.13, version=3.2.19, type=jar} -> [Help 1]
Looks like the issue is related to maven-shade-plugin, I created a minimal project to reproduce it, mvn clean install works with 4.0.0-rc-2 but fails with rc-3 and the rc-4
Maven 4 (not sure since which RC) has a more strict validation of dependency and plugin configuration (which "only" resulted in warnings with Maven 3) so this is intended in general.
But @cstamas could add more details and maybe an site effect when using shade-plugin?
Created IT apache/maven-shade-plugin#740 @gnodet also, this is related to POM transformation, with -Dmaven.maven3Personality reproducer does not reproduce. This has to be related that a rogue dep enters the stage (via wrongly dep reduced POM)
Activity
Bukama commentedon Jun 30, 2025
Maven 4 (not sure since which RC) has a more strict validation of dependency and plugin configuration (which "only" resulted in warnings with Maven 3) so this is intended in general.
But @cstamas could add more details and maybe an site effect when using shade-plugin?
cstamas commentedon Jul 1, 2025
I cannot reproduce with reproducer, I have "all good":
Please provide information how to reproduce.
EDIT:
mvn installdoes itcstamas commentedon Jul 1, 2025
Created IT apache/maven-shade-plugin#740
@gnodet also, this is related to POM transformation, with
-Dmaven.maven3Personalityreproducer does not reproduce. This has to be related that a rogue dep enters the stage (via wrongly dep reduced POM)pan3793 commentedon Jul 2, 2025
@cstamas, thanks for your help diagnosing this issue, I have a new discovery that may narrow down the problem
pan3793/SPARK-51224@1bee7f4
bug: fix duplicate dependency in effective model (fixes apache#2532)
Add integration test for apacheGH-2532 duplicate dependency effective…
bug: fix duplicate dependency in effective model (fixes #2532) (#2554)
bug: fix duplicate dependency in effective model (fixes apache#2532) (a…
bug: fix duplicate dependency in effective model (fixes #2532) (#2554) (