Let\'s take this example:
org.slf4j
slf4j-api<
You can simply use the following command:
mvn versions:use-dep-version -Dincludes=junit:junit -DdepVersion=1.0 -DforceVersion=true
In includes is given like this: groupId:artifactId
but can be something like this (quote from the docs):
A list of artifact patterns to include. Follows the pattern "groupId:artifactId:type:classifier:version".
The issue related to that is that via forceVersion
any check which will be turned off to validate the version you have given to the versions which is available for the artifact so use it with care.