maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte (JIRA)" <>
Subject [jira] [Commented] (MCHECKSTYLE-267) maven merge policy breaks checkstyle inline configuration
Date Sat, 17 Mar 2018 16:08:00 GMT


Robert Scholte commented on MCHECKSTYLE-267:

You might need to add a {{}}, which is supported since Maven 3.3.9. 
<checkstyleRules combine.children="override">
  <module name="Checker">
    <module name="FileLength""FileLength">
      <property name="max" value="3000"/>

> maven merge policy breaks checkstyle inline configuration
> ---------------------------------------------------------
>                 Key: MCHECKSTYLE-267
>                 URL:
>             Project: Maven Checkstyle Plugin
>          Issue Type: Bug
>    Affects Versions: 2.13
>            Reporter: Romain Manni-Bucau
>            Priority: Major
>         Attachments: pom.xml, pom.xml
> This is surely a bug in maven itself since it appears in effective pom but please redirect
and link this issue if you think so (it can be worked around in checkstyle plugin and I'm
not sure maven cares)
> Issue is: you have a pom and a child pom. Both configure checkstyle "inline" (ie without
checkstyle.xml but directly in <configuration>). In this case maven merge both configs
(great) but tag by tag. it means if both checkstyle configs dont have the same modules then
configuraiton is broken and the child module config can slip to another module for instance.
> Workaround would be to get raw config of both pom and do the merge in the plugin. Correct
solution IMO is to consider attribute values during maven merge.

This message was sent by Atlassian JIRA

View raw message