GeoTools – Which is the Right Maven Repository Version for PostGIS?

geotoolsmaven

The documentation seems to indicate that the right maven repository to use is:

  <repository>
     <id>osgeo</id>
     <name>Open Source Geospatial Foundation Repository</name>
     <url>http://download.osgeo.org/webdav/geotools/</url>
  </repository>

However, it seems that the latest version on this repository was last updated in 2014.
https://mvnrepository.com/artifact/org.geotools.jdbc/gt-jdbc-postgis?repo=osgeo

On the other hand, the Boundless one seems to be carrying a much more updated version than the other repositories. This one was last updated in September 2018:
https://mvnrepository.com/artifact/org.geotools.jdbc/gt-jdbc-postgis/20.0

However, the documentation states that the Boundless repository is for snapshots.

Which is the proper version to use?

Best Answer

The OSGeo repository is the correct one for stable builds (I'm not sure where mvnrepository.com gets its information from) - see http://download.osgeo.org/webdav/geotools/org/geotools/jdbc/gt-jdbc-postgis/20.0/ for the latest PostGIS jar.

Update

Since the demise of Boundless the correct repository for snapshots is:

 <repository>
    <id>osgeo-snapshot</id>
    <name>OSGeo Snapshot Repository</name>
    <url>https://repo.osgeo.org/repository/snapshot/</url>
    <snapshots><enabled>true</enabled></snapshots>
    <releases><enabled>false</enabled></releases>
  </repository>

This is all documented in the Maven Quick start which is the minimum you should read before starting with GeoTools.

Related Question