There are two maven plugins that can help you.
First, the dependency will simply load the specified version of the dependency: mvn dependency:get -Dartifact=groupId:artifactId:version
Second version offers some behaviors that may also be useful.
By running mvn versions:use-latest-releases -Dincludes=groupId:artifactId , your pom project will be updated with the latest version of the dependency version indicated by the '-Dincludes' flag. Then you can run the first command to download the version that your pom refers to.
Both of these behaviors can be highly customized and automated to do some pretty amazing things. For more information about the plugin, run: mvn plugin:help -Ddetail=true -Dgoal=goal
Example: mvn versions:help -Ddetail=true -Dgoal=use-latest-releases
For more information: versions , dependency and plugins
Jmess source share