mojohaus / extra-enforcer-rules

Extra Enforcer Rules
https://www.mojohaus.org/extra-enforcer-rules/
Apache License 2.0
73 stars 47 forks source link

banDuplicateClasses can not be appended in pom.xml #305

Open reitzmichnicht opened 3 months ago

reitzmichnicht commented 3 months ago

We want to append the banDuplicateClasses definition in our child pom.xml.

If you already have a definition of ignoredClasses in the parent pom it is not possible to add more ignoredClasses in any child pom.xml like this

            <configuration>
              <rules>
                <banDuplicateClasses>
                  <ignoreClasses combine.children="append">
                    <ignoreClass>jakarta.jws.*</ignoreClass>
                  </ignoreClasses>
                </banDuplicateClasses>
              </rules>
            </configuration>

I tried every combination of appending or overwriting, I can only overwrite the whole rules definition loosing all other rules configuration or I end with two banDuplicateClasses nodes where the first one seems to be used.

Kind regards, Michael

slawekjaranowski commented 2 months ago

Should works like you wrote.

Please provide a test project if problem still exist.