[
https://issues.apache.org/jira/browse/MENFORCER-405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kaustav Das updated MENFORCER-405:
----------------------------------
Description:
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
{code:java}
// code placeholder
{code}
<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>
was:
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>```
> Enforcer plugin does not fail for duplicate dependency defined in multi
> module project
> --------------------------------------------------------------------------------------
>
> Key: MENFORCER-405
> URL: https://issues.apache.org/jira/browse/MENFORCER-405
> Project: Maven Enforcer Plugin
> Issue Type: Bug
> Components: Plugin
> Affects Versions: 3.0.0
> Reporter: Kaustav Das
> Priority: Major
>
> 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
> {code:java}
> // code placeholder
> {code}
> <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>
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)