Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a2xnI-0005PF-Ia for pgsql-jdbc@arkaria.postgresql.org; Sun, 29 Nov 2015 08:57:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a2xnH-0005yZ-MB for pgsql-jdbc@arkaria.postgresql.org; Sun, 29 Nov 2015 08:57:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a2xmm-0005QN-VB for pgsql-jdbc@postgresql.org; Sun, 29 Nov 2015 08:56:45 +0000 Received: from smtprelay06.ispgateway.de ([80.67.31.96]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a2xmk-0001ki-JG for pgsql-jdbc@postgresql.org; Sun, 29 Nov 2015 08:56:44 +0000 Received: from [88.66.22.212] (helo=Zauselmaus) by smtprelay06.ispgateway.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.84) (envelope-from ) id 1a2xmN-0002Z5-R8 for pgsql-jdbc@postgresql.org; Sun, 29 Nov 2015 09:56:19 +0100 From: "Markus KARG" To: "'List'" References: <2138484843.20942254.1448530099460.JavaMail.zimbra@redhat.com> <2113338928.20942725.1448530160996.JavaMail.zimbra@redhat.com> <565750BE.9090804@lawinegevaar.nl> In-Reply-To: Subject: Re: Migration to Maven Date: Sun, 29 Nov 2015 09:56:45 +0100 Organization: Markus KARG, Staatl. gepr. Inf. Message-ID: <000a01d12a83$e0226d50$a06747f0$@eu> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdEqH+7Y8Ric9JYuTFiioDt/dMsWqwAYvihg Content-Language: de X-AVK-Virus-Check: AVA 25.4565;6CEBFCC8 X-AVK-Spam-Check: 1; str=0001.0A0C0205.565ABDC8.0137,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0; F1206 X-Df-Sender: bWFya3VzQGhlYWRjcmFzaGluZy5ldQ== X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org I'm always a friend of clean and CoC-alike solutions. Hence I'd say it woul= d be best to use the artifactId to indicate the difference between the JARs= : A JDBC42 driver is definitively something different than a JDBC3 driver, = so it would be wrong to use the same artifact name. Anyways, my personal favorite is not liked by the project lead: Do not back= port features into old PostgreSQL versions. That means, for each supported = version of PostgreSQL there is one single branch, and that branch supports = only the JDBC / JDK combination which was current at time of publication of= the JDBC version. Into that branches, only backport fixes, which is simply= using git. New features (and such, new JDBC / JDK combinations) on are add= ed to that single JAR for the NEXT planned PostgreSQL version. This cuts aw= ay a lot of branches which nobody ever will need. PostgreSQL itself also do= es not add new technology to old versions, so why do we? -Markus -----Original Message----- From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.o= rg] On Behalf Of Vladimir Sitnikov Sent: Samstag, 28. November 2015 22:01 To: Stephen Nelson; List Subject: Re: [JDBC] Migration to Maven The main problem with release is maven does not allow multiple deploys to the same groupId:artifactId:version. In other words: 1) build via jdk8, deploy -> ok, pom.xml, jdbc42.jar in maven 2) build via jdk7, deploy -> fail: "the same pom.xml already exists". Well, that is exact problem predicted by Stephen, and I learned it the hard= way. I see two ways to workaround that. I'm more inclined to "A": drop classifiers and put spec version to the artifactId. Any thoughts? Frankly speaking I see absolutely no problems with having different artifactIds for different jdbc versions provided github readme gives snippets for jdk6, 7, and 8. A) Hidden maven submodules with jdbcspec (or jdk version) in artifactId to provide jdk6&7 artifacts. A1) mvn release:prepare release:perform via jdk8, deploy -> ok, pom.xml, postgresql-9.4-1207.jar, postgresql-9.4-1207-sources.jar, etc in maven. git tag is created for "non-snapshot" version. A2) build & deploy "hidden" module. It will copy sources&tests from the main one and build & deploy as usual. The only difference is "hidden module" should use another maven coordinates. For instance gorupId=3Dorg.postgresql, artifactId=3Dpostgresql-jdbc41 This seem to avoid usage of classifiers, and enables to have all three jars present at the same time (mvn clean would clean just a submodule, not all of them). B) Use the same group&artifact and use classifiers to distinguish jdbc spec versions. Custom-written "deploy-file" calls in profiles for old JDBC spec versions can deploy additional files without clashing on pom.xml. Well, we could integrate custom deploy-file calls, but maven cannot locate source.jar if custom classifiers are used (maven always searches for ${artifact}-${version}-sources.jar). That means we cannot have source.jar per jdbc spec, that is sad from user-perspective. B1) =3D=3D A1, except classifiers are used. B2) checkout non-snapshot tag, build only "core" project via jdk7. It skips "default-deploy" and uses deploy-file tasks to deploy jdbc41.jar, jdbc41-sources.jar, etc to maven. B3) the same for jdk6 The trick is generatePom=3Dfalse allows to deploy just a file without overwriting pom.xml. Final repository has all the jars under org.postgresql:postgresql:9.4-1207 with different classifiers. C) Branch per spec. Well, that seems to be harder to maintain as it would require back-patching the same changes over and over. It does not solve "same pom.xml" deployment problem, thus "branch per spec" must be combined with A or B. Vladimir --=20 Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc --=20 Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc