我将模块1中pom.xml中的apollo客户端更新为1.2.0。
<dependency>
<groupId>com.ctrip.framework.apollo</groupId>
<artifactId>apollo-client</artifactId>
<version>1.2.0</version>
</dependency>
我看了模块1中的依赖关系:
$ mvn dependency:tree -Dverbose -Dincludes=com.ctrip.framework.apollo:apollo-client
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------< com.sportswin.misc:soa-misc >---------------------
[INFO] Building soa-misc 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ soa-misc ---
[INFO] com.sportswin.misc:soa-misc:jar:1.0.0-SNAPSHOT
[INFO] \- com.ctrip.framework.apollo:apollo-client:jar:1.2.0:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.552 s
[INFO] Finished at: 2019-08-04T18:30:20+08:00
[INFO] ------------------------------------------------------------------------
但是当我在模块2中查询时:
[INFO] -----------------< com.sportswin.soa:soa-room-service >-----------------
[INFO] Building soa-room-service 1.0.0-SNAPSHOT [3/3]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ soa-room-service ---
[INFO] com.sportswin.soa:soa-room-service:jar:1.0.0-SNAPSHOT
[INFO] \- com.sportswin.misc:soa-misc:jar:1.0.0-SNAPSHOT:compile
[INFO] \- com.ctrip.framework.apollo:apollo-client:jar:1.1.0:compile (version managed from 1.2.0)
[INFO] ------------------------------------------------------------------------
问题是:为什么依赖模块2不使用新版本的apollo客户端?我无法执行模块2:
mvn clean install -e -U