[gdal-dev] gdal jar in maven central

Even Rouault even.rouault at spatialys.com
Tue Mar 31 07:58:04 PDT 2015


Le mardi 31 mars 2015 16:43:06, Justin Deoliveira a écrit :
> Hey Even,
> 
> On Tue, Mar 31, 2015 at 8:25 AM, Even Rouault <even.rouault at spatialys.com>
> 
> wrote:
> > Justin,
> > 
> > > I searched the archives and couldn't find much on this topic. I was
> > > wondering how people would feel about having the gdal java jar hosted
> > > in the central maven repository? I think it would be pretty nice for
> > > users
> > 
> > to
> > 
> > > not have to build the bindings locally, or find a repository that has
> > 
> > them.
> > 
> > > Any thoughts, objections, or concerns?
> > 
> > That should likely be useful, but pardon the naive remark as I'm not
> > familiar
> > with how maven central works : the gdal.jar alone will not be usefull.
> > You need the 4 libgdalXXXXjni.so / dll for it to be usefull, and of
> > course thy are
> > architecture dependant, so I'm wondering how that would be handled.
> 
> Right. The jar won't be of much use unless you have all the native
> libraries installed on the system. While maven does allow you to store
> other artifacts in a repository I don't think that is a good fit in this
> case. As you mention it's very platform dependant and it's pretty common
> for users to compile gdal themselves to get the formats they need.
> 
> That said the jar itself would allow applications to at least compile.
> Without the native libs any actual usage will of course fail. But most
> projects I have seen that utilize the java bindings account for this case,
> allow things like tests to fail cleanly, or disabling certain functionality
> if the bindings are not active.
> 
> Long story short I think this would be of most use to developers writing
> libraries that utilize the bindings. It would allow users of those
> libraries to build it without any extra steps. At least that is my case.

That's a valid use case I think. Although I guess some word of caution written 
in big letters will be necessary to make users aware that the gdal.jar is far 
from being self sufficient.

Regarding the libgdalXXXXjni.so, they don't depend on the third-party libs 
against which GDAL is compiled (well... in theory, as I can see that we do 
over-link in practice, in the Unix makefiles, but that could/should be 
corrected). So if a repository would manage different architectures, they could 
be delivered independantly of libgdal itself.

> 
> > > If people are into the idea I would be happy to put in the work to make
> > 
> > it
> > 
> > > happen.

Does that require adding/changing stuff in the GDAL repo itself or just 
uploading a built gdal.jar ? How does Maven Central "authenticate" who is 
allowed to upload what / how does the GDAL project gets control on that ?

> > 
> > Regards,
> > 
> > Even
> > 
> > --
> > Spatialys - Geospatial professional services
> > http://www.spatialys.com

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list