[gdal-dev] Compatibility of GDAL binaries and GDAL jar files

Even Rouault even.rouault at spatialys.com
Tue Jun 13 13:37:09 PDT 2023


Le 13/06/2023 à 22:27, Dirk Stenger a écrit :
> All,
>
> I am using GDAL with an Java application and have a couple of 
> questions regarding the compatibility of releases of the GDAL binaries 
> and the GDAL jar files provided via Maven Central Repository [1].
>
> The GDAL jar files provided via Maven Central Repository never contain 
> a bug fix version (e.g. 3.5.0, 3.6.0, 3.7.0). The GDAL binaries, 
> however, use bug fix versions (e.g. 3.6.4).
> How do I match the versions? Should I, for example, use GDAL jar 3.6.0 
> with GDAL binary 3.6.4? 

Yes, that should work

> What is the release policy of the versions in Maven Central 
> Repository, is there always a new jar release whenever there is a GDAL 
> release of a minor version?
We generally don't release .jar for patch versions (the z in x.y.z), 
unless there would be a bugfix for the bindings themselves
>
> Is there any compatibility scheme/matrix for using the GDAL jar file 
> with GDAL binaries?
> For example, can minor versions be combined (e.g. using GDAL jar 3.0.0 
> with GDAL binary 3.6.4) or should there always be exact version matching?

You could likely using a GDAL jar of a lesser version than the binary, 
since the bindings rely on the C API/ABI which is stable within the same 
major version number (but the reverse would be true. GDAL jar of 3.6 
might use C symbols missing in libgdal < 3.6).

But such mixed version combinations are not tested by our CI : the CI 
only tests running the bindings against the same GDAL native version.

I'm not totally sure you can run a .jar against the 
libgdalalljni.so/.dll that would have been generated with a different 
version of SWIG though. I assume that if you remain with the same major 
version of SWIG that should work OK, but that's not tested either.

-- 

http://www.spatialys.com
My software is free, but my time generally not.



More information about the gdal-dev mailing list