I've been working with Darius on modifying the appframework module, and as part of that I required bean validation to happen in the code (to verify that the setup was correct and the domain objects were being created correctly).
I incorporated the JSR303 spec for doing bean validation in java, which has been adopted as the standard way of doing bean validation.
To incorporate this, we need to have the standards interface (javax.validation.*) which defines the standard interfaces and contract for the bean validation and one implementation of it in the classpath. These are available in the form of two jars as specified by the following dependencies.
The former pulls in the standards interface whereas the latter brings in the implementation.
It is important to include these in openmrs-core and it cannot be pulled in through the modules due to the way classloader hierarchy is structured. The beans are pulled in via spring which comes from the core classloader and it can't access the module classloaders while loading the class, as they are children. So for now it would be good to include them into core.