[我在另一个团队开发的pom.xml中使用了一个快照jar。一段时间后,我在本地仓库中发现了很多带有时间戳的快照jar,例如波纹管:
base-0.0.1-20190924.065706-10.jarbase-0.0.1-20190925.002128-11.jarbase-0.0.1-20191107.012927-66.jarbase-0.0.1-20191108.002149-68.jar
我知道我可以手动将其删除,但是我认为必须有一种自动清除它们的方法?有人知道吗?
mvn dependency:purge-local-repository
可能有帮助。看看有关包括特定groupId或artifactId的部分。
https://maven.apache.org/plugins/maven-dependency-plugin/examples/purging-local-repository.html