[MENFORCER-405] Enforcer plugin does not fail for duplicate dependency defined in multi module project
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java
- Domain
- build-system
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.
Description
Kaustav Das opened MENFORCER-405 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
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>no-duplicate-declared-dependencies</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<banDuplicatePomDependencyVersions/>
</rules>
</configuration>
</execution>
</executions>
</plugin>
Affects: 3.0.0
- Dominant language
- Java
- Stars
- 162
- Forks
- 185
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 20
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/maven-enforcer
-
RequireUpperBoundDeps does not support includes with only groupIdPossibly taken @waterWang claimed this 90 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
apache/maven-enforcer#998 ·
Maintainers usually reply within 1 day
-
ConcurrentModificationException in EnforcerRuleCache when using parallel builds with multiple plugin realmsPossibly taken @efegokdemir claimed this 8 days ago. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 40/100
apache/maven-enforcer#1055 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
apache/maven-enforcer#1038 · 1 comment ·
Maintainers usually reply within 1 day
-
New rule: banSplitPackages — detect packages split across modules and artifactsMay be free again @ascheman claimed this 96 days ago, and no pull request is open. Openenhancement
apache/maven-enforcer#997 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
New rules: enforce Java Module System descriptor policyMay be free again @ascheman claimed this 101 days ago, and no pull request is open. Openenhancement
apache/maven-enforcer#995 · 1 reaction · 1 assignee ·
Maintainers usually reply within 1 day
All issues in apache/maven-enforcer
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
code-maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
krizaka/krizaka-notifications#32 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
klikli-dev/occultism#1719 ·