Set the version of a dependency from command line
问题 I would like to set the version of a dependency in a POM from command line. Much like versions:set (for the version of the project), but for a specific dependency. I don't want to craft any XML scanning tool because there are various ways to specify a version and it is hard to handle them all. 回答1: If you know your dependency versions are specified in the dependency or dependencyManagement blog and the version is not a property you can use use-dep-version: mvn versions:use-dep-version