Maven update version of specific dependency

China☆狼群 提交于 2019-12-07 07:31:17

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
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!