windows10 maven工具jni调用dll时候遇到 BUILD FAILURE
错误信息如下所示:
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6: Could not transfer artifact org.apache.maven.plugins:maven-plugins:pom:23 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/23/maven-plugins-23.pom: Connect to repo.maven.apache.org:443 [repo.maven.apache.org/127.0.0.1] failed: Connection refused: connect -> [Help 1]
原因:
由于第一次使用maven,需要安装一些插件,但是maven的镜像库地址https://repo.maven.apache.org/maven2,本机访问失败,所以导致环境运行失败。
解决方法:
在maven的安装目录下的conf文件中,修改settings.xml,在该文件中增加了阿里云的maven镜像库即可