Re: Packaging 42.3.0 for MacPorts -- need some clarifications

From: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
To: Georges Martin <jrjsmrtn(at)gmail(dot)com>
Cc: pgsql-jdbc(at)lists(dot)postgresql(dot)org
Subject: Re: Packaging 42.3.0 for MacPorts -- need some clarifications
Date: 2021-10-24 11:30:39
Message-ID: CAB=Je-Ea_uG58apWTexs8GMzO5fBLAnB+dR-=8UkhxBfJuY34A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

>I am no Maven/Gradle expert but I'm using PostgreSQL since version 6 and
Eclipse/pgCodeKeeper for development, including on macOS. Thus, packaging
postgresql-jdbc for macOS is a "personal itch" ;-)

Nice.

>For 42.2.16, I followed the switch from Maven to Gradle for building. But
it seems that, since 42.2.20, the Gradle files are not included in the
tarballs anymore. Is that voluntary?

There are several ways to build and package pgjdbc:

a) Build from Git sources. That requires Gradle, and it enables running
more tests, so you have better confidence in the resulting artifact
b) Build from "source release" (see -jdbc-src.tar.gz
https://repo1.maven.org/maven2/org/postgresql/postgresql/42.3.0/ ). Those
are simplified sources,
and the purpose is to add convenience for cases like Debian that lack
Gradle. The set of tests and features is reduced, however, the driver
should still work in most cases.
c) You could grab the official release artifacts from
https://repo1.maven.org/maven2/org/postgresql/postgresql/

For instance, Gradle port of MacPorts grabs Gradle from the official
distribution site, and it does not build Gradle from sources:
https://github.com/macports/macports-ports/blob/cb0311519f9752e4507cf64ba042045690ac429a/devel/gradle/Portfile#L23-L29

I guess the same might work for pgjdbc as well: the portfile could
reference an artifact from repo1.maven.org rather than building it every
time.
The bonus point would be that the jar would be exactly the same as the
official one.

Have you considered option c (==grabbing the binaries from repo1.maven.org)?

Vladimir

сб, 23 окт. 2021 г. в 17:00, Georges Martin <jrjsmrtn(at)gmail(dot)com>:

> Hello, folks.
>
> I occasionally package postgresql-jdbc for MacPorts since version 42.2.8.
>
> I am no Maven/Gradle expert but I'm using PostgreSQL since version 6 and
> Eclipse/pgCodeKeeper for development, including on macOS. Thus, packaging
> postgresql-jdbc for macOS is a "personal itch" ;-)
>
> The last version I packaged was 42.2.19. I'm working on 42.3.0 right now
> but I ran into some issues and wish for some clarifications... :-q
>
> 1. For 42.2.16, I followed the switch from Maven to Gradle for building.
> But it seems that, since 42.2.20, the Gradle files are not included in the
> tarballs anymore. Is that voluntary?
>
> 2. I successfully reverted back to Maven 3.8.2 to build 42.3.0 but what is
> the preferred way of building in the future: Maven of Gradle ?
>
>
> Thanks in advance,
>
> G.
>
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2021-10-25 10:20:47 [pgjdbc/pgjdbc] c9be5c: remove check for negative pid in cancel request. A...
Previous Message Georges Martin 2021-10-23 14:00:44 Packaging 42.3.0 for MacPorts -- need some clarifications