apache / apache/maven-enforcer
[MENFORCER-405] Enforcer plugin does not fail for duplicate dependency defined in multi module project
- Dominant language
- Java
- Stars
- 161
- Forks
- 180
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 11
Description
**[Kaustav Das](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER280654)** opened **[MENFORCER-405](https://issues.apache.org/jira/browse/MENFORCER-405?redirect=false)** and commented
I have a multi module project and have accidentally defined dependency of one artifact in multiple child maven module each having different version. Enforcer plugin not able to detect this duplicate dependency and project gets build successfully
Plugin definition in pom
```java
org.apache.maven.plugins
maven-enforcer-plugin
3.0.0
no-duplicate-declared-dependencies
enforce
```
---
**Affects:** 3.0.0
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the reported case with a multi-module Maven project using the banDuplicatePomDependencyVersions rule and the plugin configuration shown in the issue. Start by locating that rule's implementation and its tests, then define the expected behavior for duplicate dependencies across child modules and add a regression test that verifies the build fails.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100