The XML structure makes sense IMO if it comes to modular applications, where you only have one validation.xml but multiple constraint mapping XML files in different modules. Anyways, it's not something we can change. ConstraintDefinitionContributor would not have to go away completely, it'd just become an implementation detail. The service loader based implementation as well as what's configured via ConstraintMapping would use it internally. Only I'm suggesting to take away the possibility from the user to configure custom contributors. That'd not be needed if it's doable via ConstraintMapping. Note we have ConstraintMappingContributor to plug in additional mappings. Let's not provide two different APIs to achieve the same thing, it's against the spirit of design we agreed long time ago. |