Geotools lib突然从存储库中消失 [英] Geotools lib suddenly disappear from repository

查看:161
本文介绍了Geotools lib突然从存储库中消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天当我尝试构建公共服务时,它会产生错误

Yesterday when I tried building a common service, it yield an error

253由以下原因引起: org.eclipse.aether.resolution.ArtifactResolutionException: 以下工件无法解决: org.geotools:gt-main:jar:21.2,org.geotools:gt-epsg-wkt:jar:21.2, org.geotools:gt-epsg-hsql:jar:21.2:找不到工件 春季里程碑中的org.geotools:gt-main:jar:21.2 ( https://repo.spring.io/milestone )

253 Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: org.geotools:gt-main:jar:21.2, org.geotools:gt-epsg-wkt:jar:21.2, org.geotools:gt-epsg-hsql:jar:21.2: Could not find artifact org.geotools:gt-main:jar:21.2 in spring-milestones (https://repo.spring.io/milestone)

问题发生几小时前就成功了.很长时间没有进行任何更改.

It was success just a few hours ago, before the issue occurs. No change has been made for a long while.

我们使用了几个存储库,其中之一是 http://download.osgeo.org/webdav/geotools .但似乎URL现在已关闭.不知道何时何地发生故障-我在osgeo.org主页上找不到任何内容.

We use several repository, one of them is http://download.osgeo.org/webdav/geotools. But it seems the URL is down now. No idea when and why it was down - I can't find anything on the osgeo.org home page.

反正是否有关于此类问题的警告?我该怎么做才能防止问题再次发生?

Is there anyway to get warnings about this kind of issue? What should I do to prevent the problem from happening again?

推荐答案

存储库已移动,我们无法让Maven处理重定向.

The repository moved, and we were unable to get maven to handle a redirect.

请参见 http://geotoolsnews. blogspot.com/2020/04/change-to-maven-repositories.html?m=1 了解更多详细信息.

See http://geotoolsnews.blogspot.com/2020/04/change-to-maven-repositories.html?m=1 for more details.

所以现在您在pom.xml文件中需要它:

So now you need this in your pom.xml files:

<repositories>
  <repository>
    <id>osgeo</id>
    <name>OSGeo Release Repository</name>
    <url>https://repo.osgeo.org/repository/release/</url>
    <snapshots><enabled>false</enabled></snapshots>
    <releases><enabled>true</enabled></releases>
  </repository>
</repositories>

或者您可以将其添加到您的~/.m2/settings.xml文件中:

Or you can add this to your ~/.m2/settings.xml file:

<mirrors>
  <mirror>
    <id>osgeo-release</id>
    <name>OSGeo Repository</name>
    <url>https://repo.osgeo.org/repository/release/</url>
    <mirrorOf>osgeo</mirrorOf>
  </mirror>
  <mirror>
    <id>geoserver-releases</id>
    <name>Boundless Repository</name>
    <url>https://repo.osgeo.org/repository/Geoserver-releases/</url>
    <mirrorOf>boundless</mirrorOf>
  </mirror>
</mirrors>

这篇关于Geotools lib突然从存储库中消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆