Custom rules are easy to make with the maven-enforcer-rule-api. These rules can then be invoked with the maven-enforcer-plugin.
See here for instructions on how to make your own rule.