You can use version range with a maven plugin
https://maven.apache.org/enforcer/enforcer-rules/versionRang...