[Updated] (MENFORCER-301) banDuplicatePomDependencyVersions does not check managementDependencies

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Updated] (MENFORCER-301) banDuplicatePomDependencyVersions does not check managementDependencies

JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/MENFORCER-301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Kudrevatykh updated MENFORCER-301:
--------------------------------------------
    Description:
MENFORCER-152 added rule for ban duplicate depndencies, but dependencyManagement section does not checked correctly
code  {code:java} if ( model.getDependencyManagement() != null )
{
    List<Dependency> managementDependencies = model.getDependencies();
    Map<String, Integer> duplicateManagementDependencies = validateDependencies( managementDependencies );{code} should be written as
{code}
if ( model.getDependencyManagement() != null )
{
    List<Dependency> managementDependencies = model.getDependencyManagement().getDependencies();
    Map<String, Integer> duplicateManagementDependencies = validateDependencies( managementDependencies );{code}
and same fix should be applied to {noformat}profiles{noformat} checking code

  was:MENFORCER-152 added rule for ban duplicate depndencies, but dependencyManagement section does not checked correctly code  \{code:java} if ( model.getDependencyManagement() != null ) \{ List<Dependency> managementDependencies = model.getDependencies(); Map<String, Integer> duplicateManagementDependencies = validateDependencies( managementDependencies );{code} should be written as \{code} if ( model.getDependencyManagement() != null ) \{ List<Dependency> managementDependencies = model.getDependencyManagement().getDependencies(); Map<String, Integer> duplicateManagementDependencies = validateDependencies( managementDependencies );{code} and same fix should be applied to \{noformat}profiles\{noformat} checking code


> banDuplicatePomDependencyVersions does not check managementDependencies
> -----------------------------------------------------------------------
>
>                 Key: MENFORCER-301
>                 URL: https://issues.apache.org/jira/browse/MENFORCER-301
>             Project: Maven Enforcer Plugin
>          Issue Type: Bug
>          Components: Standard Rules
>    Affects Versions: 3.0.0-M1
>            Reporter: Alexander Kudrevatykh
>            Priority: Major
>
> MENFORCER-152 added rule for ban duplicate depndencies, but dependencyManagement section does not checked correctly
> code  {code:java} if ( model.getDependencyManagement() != null )
> {
>     List<Dependency> managementDependencies = model.getDependencies();
>     Map<String, Integer> duplicateManagementDependencies = validateDependencies( managementDependencies );{code} should be written as
> {code}
> if ( model.getDependencyManagement() != null )
> {
>     List<Dependency> managementDependencies = model.getDependencyManagement().getDependencies();
>     Map<String, Integer> duplicateManagementDependencies = validateDependencies( managementDependencies );{code}
> and same fix should be applied to {noformat}profiles{noformat} checking code



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)