From 3d609383706fe4b08d55d840a6e436a35f1f87d0 Mon Sep 17 00:00:00 2001 From: Zuzana Miklankova <90186537+zmiklank@users.noreply.github.com> Date: Fri, 21 Jan 2022 14:29:27 +0100 Subject: [PATCH] docs: add info about convenience maven project (#2407) * docs: add info about convenience maven project --- docs/documentation/head/setup.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/documentation/head/setup.md b/docs/documentation/head/setup.md index 1d523e6197..db88a39e4a 100644 --- a/docs/documentation/head/setup.md +++ b/docs/documentation/head/setup.md @@ -27,7 +27,7 @@ Precompiled versions of the driver can be downloaded from the [PostgreSQLâ„¢ JDB Alternatively you can build the driver from source, but you should only need to do this if you are making changes to the source code. To build the JDBC driver, you need gradle and a JDK (currently at least jdk1.8) . - + If you have several Java compilers installed, maven will use the first one on the path. To use a different one set JAVA_HOME to the Java version you wish to use For example, to use a different JDK than the default, this may work: @@ -42,3 +42,14 @@ Where MM is the major version, nn is the minor version and pp is the patch versi Versions for JDBC3 and lower can be found [here](https://jdbc.postgresql.org/download.html#others) This is a very brief outline of how to build the driver. Much more detailed information can be found on the [github repo](https://github.com/pgjdbc/pgjdbc/blob/master/CONTRIBUTING.md) + +Even though the JDBC driver should be built with Gradle, for situations, where use of Gradle is not possible, +e.g., when building pgjdbc for distributions, the pgjdbc Gradle build provides a convenience +source release artifact `*-src.tar.gz` - a Maven based project. +The Maven based project contains a version of the JDBC driver with complete functionality, +which can be used in production and is still validly buildable within the Maven build environment. +The Maven-based project is created with **gradlew -d :postgresql:sourceDistribution -Prelease**. +The produced `*-src.tar.gz` can be then found in `pgjdbc/build/distributions/` directory. +JDBC driver can be built from the Maven-based project with **mvn package** or, +when the tests are to be skipped, with **mvn -DskipTests package**. +Prefactored `*-src.tar.gz`s are released in the [Maven central repository](https://repo1.maven.org/maven2/org/postgresql/postgresql/).