maven的依赖包无法下载解决

编译geoserver出现

 Failed to execute goal on project gs-platform: Could not resolve dependencies for project org.geoserver:gs-platform:jar:2.10.5: The following artifacts could not be resolved: org.geotools:gt-api:jar:16.5, org.geotools:gt-main:jar:16.5: Could not find artifact org.geotools:gt-api:jar:16.5 in nexus (http://172.17.22.12:8081/nexus/content/groups/public) -> [Help 1]

1.在mvnrepository搜索org.geotools,找到gt-api

可以找到对应的仓库地址

2.进入nexus私服,创建一个代理的OSGeo仓库

名字和id可以为OSGeo,主要是下面的地址需要注意

3.把我们创建的OSGeo加入到group类型public Repositories中

4.删除本地仓库的之前下载不全的E:\repo\org\geotools\gt-api目录,然后重新mvn compile就可以重新下载

这里配置了,但是有问题,url地址是可以访问的,只好自己下载jar到本地的仓库解决

转载自:https://blog.csdn.net/su317/article/details/79832705

You may also like...

退出移动版