maven插件在本地仓库存在?为什么还需要从中央仓库下载?怎么取消这种下载?
各位大虾好:
我在外网做了一个maven项目,并且可以正常mvn clean install操作。
然后我将该maven项目和整个本地仓库复制到内网机上(连不上internet),修改settings.xml中的localRepsitory选项指向刚复制进来的仓库。
使用命令行在maven项目下执行mvn clean install操作,提示错误
[ERROR] Plugin org.apache.maven.plugins:maven-failsafe-plugin:2.18.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-failsafe-plugin:jar:2.18.1: Could not transfer artifact org.apache.maven.plugins:maven-failsafe-plugin:pom:2.18.1 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host repo.maven.apache.org -> [Help 1]
经查看本地仓库中的确有maven-failsafe-plugin-2.18.1.jar以及相关的maven-failsafe-plugin-2.18.1.pom、maven-failsafe-plugin-2.18.1.jar.sha1、maven-failsafe-plugin-2.18.1.pom.sha1、_remote.repositories文件。
为什么本地仓库有了该插件,还需要从中央仓库下载?
这个原理是怎样的?是否复制过来的本地仓库中的部分插件不能被maven识别? 怎样取消这种下载(本地仓库有该插件的情况下)? 麻烦给个思路,万分感谢!!!