As for the interface, perhaps something like
public interface DeploymentValidator
{
public void validateDeployment(DeploymentUnit deploymentUnit) throws DeploymentUnitProcessingException;
}
might do. Or then DeploymentPhaseContext as parameter.
I'm not sure what would be the best way in JBoss Modules to add validation implementation JARs without having to list them explicitly in some module.xml. Perhaps the standard ServiceLoader mechanism is applicable.