[gdal-dev] Advice on deploying components that use GDAL
Brad Hards
bradh at frogmouth.net
Fri Nov 8 16:46:13 PST 2024
On Saturday, 9 November 2024 4:59:17 AM AEDT Barry DeZonia wrote:
> If (totally fake example) I set the dependency in my jar to gdal 3.0.0 and
> I only make calls within the 3.0.0 java bindings api in my code, then if
> someone has gdal 3.7.x installed, will my code be able to interact with the
> installed gdal?
Possibly I didn't explain this very well.
There are at least four moving parts:
- the end application
- your code (which I'll call zorbage for this explanation, even though that is a
generalisation)
- the GDAL java bindings
- the installed version of GDAL (the native libraries).
Your options are to specify the GDAL java bindings (or not), and to try to influence the
other parts.
Since zorbage isn't providing the native libraries, what you put in your maven
dependencies makes no difference as to whether anything you do works or not.
It might not even be installed.
If you specify a version of the java bindings, they'll be added as a dependency by default.
You can choose whether to bundle them, or assume its provided.
The key is that the end-application can override the version of the java bindings.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.github.bdezonia</groupId>
<artifactId>zorbage-gdal</artifactId>
<version>0.2.1</version>
</dependency>
<dependency>
<groupId>org.gdal</groupId>
<artifactId>gdal</artifactId>
<version>3.10.0</version>
</dependency>
</dependencies>
</dependencyManagement>
Brad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20241109/f5895b12/attachment.htm>
More information about the gdal-dev
mailing list