Maven update version of specific dependency
The goal versions:use-latest-snapshots
updates only release versions, see Advancing dependency versions :
versions:use-latest-snapshots
searches the pom for all non-SNAPSHOT versions which have been a newer -SNAPSHOT version and replaces them with the latest -SNAPSHOT version.
but in your POM is a snapshot version:
Spring Boot project's dependency:
<dependency> <groupId>com.example</groupId> <artifactId>drools-sample-proj</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency>
so the dependency is not changed.
You could use the goal versions:use-latest-versions
, see Versions Maven Plugin :
Replaces any version with the latest version.
Your modified command line:
mvn versions:use-latest-versions -DallowSnapshots=true -Dincludes=com.example:drools-sample-proj