且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么我不能解决GeoTools maven quickstart的依赖关系?

更新时间:2023-12-04 15:07:41

之所以会出现此问题,是因为org.geotools:gt-shapefile:jar:10-SNAPSHOThttp://download.java.net/maven/2http://download.osgeo.org/webdav/geotools上都不存在.您所要做的就是为GeoTools定义snapshot repository,如 GeoTools:Maven快速入门,如下所示:-

The issue occurs because the org.geotools:gt-shapefile:jar:10-SNAPSHOT does not exist at either http://download.java.net/maven/2 or http://download.osgeo.org/webdav/geotools. All you have to do is define the snapshot repository for the GeoTools as it is mentioned at the GeoTools:Maven Quick Start as the following: -

<repositories>
    <repository>
        <id>maven2-repository.dev.java.net</id>
        <name>Java.net repository</name>
        <url>http://download.java.net/maven/2</url>
    </repository>
    <repository>
        <id>osgeo</id>
        <name>Open Source Geospatial Foundation Repository</name>
        <url>http://download.osgeo.org/webdav/geotools/</url>
    </repository>
    <repository> <!--Add the snapshot repository here-->
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
        <id>opengeo</id>
        <name>OpenGeo Maven Repository</name>
        <url>http://repo.opengeo.org</url>
    </repository>
</repositories>

我希望这会有所帮助.