Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[MENFORCER-405] Enforcer plugin does not fail for duplicate dependency defined in multi module project

Open
#714 2 comments 0 reactions 0 assignees View on GitHub

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

bug priority:major

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/maven-enforcer

All issues in apache/maven-enforcer

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.