为什么mvnrepository.com
或nexus
不遵循约定具有latest
版本,例如:
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>latest</version>
</dependency>
版本latest
将始终指向存储库中的最新版本,因此在构建期间,它不会选择更新pom.xml
文件,而是选择最新版本。如果库向后兼容。
此问题与对此stackoverflow answer的以下解释非常相关