Skip to content

bug: fix duplicate dependency in effective model (fixes #2532) - #2554

Merged
gnodet merged 2 commits into
apache:masterfrom
gnodet:fix-dup-dependency
Jul 2, 2025
Merged

gnodet merged 2 commits into
apache:masterfrom
gnodet:fix-dup-dependency

Conversation

@gnodet

@gnodet gnodet commented Jul 2, 2025 •

Copy link
Copy Markdown
Contributor

This PR fixes #2532 where a project POM installation may fail.
This only happens if the same dependency is somehow defined once in a regular way and another time with a property placeholder. The reason is that the deduplication is wrongly done before interpolation.

Fixes #2532

@gnodet gnodet added bug Something isn't working backport-to-4.0.x labels Jul 2, 2025
… model fix

- Add MavenITgh2532DuplicateDependencyEffectiveModelTest to verify the fix
- Test reproduces the scenario where property placeholders in dependency
  coordinates caused duplicate dependency errors after interpolation
- Verifies that deduplication now happens after interpolation as expected
- Add test to TestSuiteOrdering for proper execution order
@gnodet
gnodet merged commit 7ac568b into apache:master Jul 2, 2025
@github-actions github-actions Bot added this to the 4.1.0 milestone Jul 2, 2025
@gnodet

gnodet commented Jul 2, 2025

Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
✅ maven-4.0.x

Questions ?

Please refer to the Backport tool documentation

gnodet added a commit to gnodet/maven that referenced this pull request Jul 2, 2025
…pache#2554)

* bug: fix duplicate dependency in effective model (fixes apache#2532)

* Add integration test for apache#2532 duplicate dependency effective model fix

- Add MavenITgh2532DuplicateDependencyEffectiveModelTest to verify the fix
- Test reproduces the scenario where property placeholders in dependency
  coordinates caused duplicate dependency errors after interpolation
- Verifies that deduplication now happens after interpolation as expected
- Add test to TestSuiteOrdering for proper execution order

(cherry picked from commit 7ac568b)
gnodet added a commit that referenced this pull request Jul 2, 2025
#2556)

* bug: fix duplicate dependency in effective model (fixes #2532)

* Add integration test for #2532 duplicate dependency effective model fix

- Add MavenITgh2532DuplicateDependencyEffectiveModelTest to verify the fix
- Test reproduces the scenario where property placeholders in dependency
  coordinates caused duplicate dependency errors after interpolation
- Verifies that deduplication now happens after interpolation as expected
- Add test to TestSuiteOrdering for proper execution order

(cherry picked from commit 7ac568b)
@gnodet
gnodet deleted the fix-dup-dependency branch October 26, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fail with "duplicate dependency" since 4.0.0-rc3

2 participants