<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 31, 2015 at 8:58 AM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">Le mardi 31 mars 2015 16:43:06, Justin Deoliveira a écrit :<br>
> Hey Even,<br>
><br>
> On Tue, Mar 31, 2015 at 8:25 AM, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>><br>
><br>
> wrote:<br>
> > Justin,<br>
> ><br>
> > > I searched the archives and couldn't find much on this topic. I was<br>
> > > wondering how people would feel about having the gdal java jar hosted<br>
> > > in the central maven repository? I think it would be pretty nice for<br>
> > > users<br>
> ><br>
> > to<br>
> ><br>
> > > not have to build the bindings locally, or find a repository that has<br>
> ><br>
> > them.<br>
> ><br>
> > > Any thoughts, objections, or concerns?<br>
> ><br>
> > That should likely be useful, but pardon the naive remark as I'm not<br>
> > familiar<br>
> > with how maven central works : the gdal.jar alone will not be usefull.<br>
> > You need the 4 libgdalXXXXjni.so / dll for it to be usefull, and of<br>
> > course thy are<br>
> > architecture dependant, so I'm wondering how that would be handled.<br>
><br>
> Right. The jar won't be of much use unless you have all the native<br>
> libraries installed on the system. While maven does allow you to store<br>
> other artifacts in a repository I don't think that is a good fit in this<br>
> case. As you mention it's very platform dependant and it's pretty common<br>
> for users to compile gdal themselves to get the formats they need.<br>
><br>
> That said the jar itself would allow applications to at least compile.<br>
> Without the native libs any actual usage will of course fail. But most<br>
> projects I have seen that utilize the java bindings account for this case,<br>
> allow things like tests to fail cleanly, or disabling certain functionality<br>
> if the bindings are not active.<br>
><br>
> Long story short I think this would be of most use to developers writing<br>
> libraries that utilize the bindings. It would allow users of those<br>
> libraries to build it without any extra steps. At least that is my case.<br>
<br>
</div></div>That's a valid use case I think. Although I guess some word of caution written<br>
in big letters will be necessary to make users aware that the gdal.jar is far<br>
from being self sufficient.<br></blockquote><div><br></div><div>Right. The bindings already display a pretty visible warning when any of libgdalXXXXjni.so (or anything it depends on) fail to load. Which I think makes it fairly clear.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Regarding the libgdalXXXXjni.so, they don't depend on the third-party libs<br>
against which GDAL is compiled (well... in theory, as I can see that we do<br>
over-link in practice, in the Unix makefiles, but that could/should be<br>
corrected). So if a repository would manage different architectures, they could<br>
be delivered independantly of libgdal itself.<br></blockquote><div><br></div><div>Yeah, I've found that the libgdalXXXXjni.so work fairly well in isolation. What I've done in the past is compile the java binding so/dylib/dll's and post them for download. And found it usually works fine if the user already has a "relatively close" version of libgdal installed. </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class=""><br>
><br>
> > > If people are into the idea I would be happy to put in the work to make<br>
> ><br>
> > it<br>
> ><br>
> > > happen.<br>
<br>
</span>Does that require adding/changing stuff in the GDAL repo itself or just<br>
uploading a built gdal.jar ? How does Maven Central "authenticate" who is<br>
allowed to upload what / how does the GDAL project gets control on that ?<br>
<div class=""><div class="h5"><br></div></div></blockquote><div><br></div><div>Right, there are a few steps involved. The easiest vector that I have seen for open source projects  is to utilize the Sonatype OSSRH repositories (which provide sync to maven central). The full process is described here.</div><div><br></div><div>  <a href="http://central.sonatype.org/pages/ossrh-guide.html#review-requirements">http://central.sonatype.org/pages/ossrh-guide.html#review-requirements</a><br></div><div><br></div><div>To sum it up though, here is what I think would be required for gdal.</div><div><br></div><div>1. Create a pom for the gdal jar that adheres to these requirements:</div><div><br></div><div>      <a href="http://central.sonatype.org/pages/requirements.html#sufficient-metadata">http://central.sonatype.org/pages/requirements.html#sufficient-metadata</a></div><div><br></div><div>2. Have a developer set up an OSSRH account and do the initial setup.</div><div><br></div><div>     <a href="http://central.sonatype.org/pages/ossrh-guide.html#initial-setup">http://central.sonatype.org/pages/ossrh-guide.html#initial-setup</a></div><div><br></div><div>3. For each release build the gdal jar (along with it's source and javadoc artifacts) and GPG sign them. </div><div><br></div><div>     <a href="http://central.sonatype.org/pages/requirements.html#sign-files-with-gpgpgp">http://central.sonatype.org/pages/requirements.html#sign-files-with-gpgpgp</a></div><div><br></div><div>   Then deploy all the jars/signatures to the OSSRH staging repositories. This will eventually sync them to maven central.</div><div><br></div><div><br></div><div>Again I'm happy to volunteer to do these steps if there aren't any developers on the project that want the extra hassle. Do the java bindings have a dedicated maintainer at this point?</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">
> ><br>
> > Regards,<br>
> ><br>
> > Even<br>
> ><br>
> > --<br>
> > Spatialys - Geospatial professional services<br>
> > <a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a><br>
<br>
--<br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a><br>
</div></div></blockquote></div><br></div></div>