[ 
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)

Reply via email to