Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jaigo-0003tH-6w for pljava-dev@arkaria.postgresql.org; Mon, 18 May 2020 16:32:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jaign-0002rj-4V for pljava-dev@arkaria.postgresql.org; Mon, 18 May 2020 16:32:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jaigm-0002rb-Vf for pljava-dev@lists.postgresql.org; Mon, 18 May 2020 16:32:28 +0000 Received: from anastigmatix.net ([68.171.219.55]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jaigg-0007qz-5K for pljava-dev@lists.postgresql.org; Mon, 18 May 2020 16:32:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=anastigmatix.net; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Date:Message-ID:To:Subject:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=meB973FHOlsxs8iKIRKOzu84r1YfwVZNjZGxBAReB/I=; b=OKbcS/wD5my5SUsTbLLecsmgOr jDcKvp4dWywZFw+HkBE27PBof+YRbldTeU5I2WASperlCzRb3Xf3INBrmBDU55E6Ao1nqYJ+TLJp9 db/t6cUx+BWIZv9x5nIBaDI4eobMbsJwf+5hugrdsL/TvDBSqzkDy2o0WBO4Yq5XJF0014P2wc4Fv dshJpIqstpWuTAGMlKy/v0Iq/vOAEU5sJg6GbW0Mtl0pScOcKJwKzQhreU1ooyI/eFIm82BCxm9GB C8wePm2gUi4iT8yoQ1rs6npEHzvyZEmyJ4La5yurgiv26J9YYBS6KF+jVEQWIFByXdYEkM0aFN0fm AJ570MRQ==; Received: from [184.19.31.139] (port=58446) by bay.acenet.us with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1jaigc-00CGAG-Ux for pljava-dev@lists.postgresql.org; Mon, 18 May 2020 12:32:19 -0400 From: Chapman Flack Subject: Early start on Maven plugin work To: pljava-dev@lists.postgresql.org Message-ID: <5EC2B892.4060709@anastigmatix.net> Date: Mon, 18 May 2020 12:32:18 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-95.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bay.acenet.us X-AntiAbuse: Original Domain - lists.postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - anastigmatix.net X-Get-Message-Sender-Via: bay.acenet.us: authenticated_id: chap@anastigmatix.net X-Authenticated-Sender: bay.acenet.us: chap@anastigmatix.net X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Another message mostly for Kartik, anyone is welcome to comment. Although it is phase 3 of the work, it is probably a good idea to fit in a little bit of time early to get familiar with the implementation of a Maven plugin. In the project ideas, I was undecided whether to develop a plugin or simply continue adding JavaScript to the build POMs. On further reflection, looking at the number of distinct issues to be solved, I am thinking the plugin is definitely preferable. The amount of JavaScript to add to the POMs would otherwise greatly reduce their readability to anyone who simply wanted to follow what the PL/Java build is doing. (This is not to say anything against JavaScript in the POMs for quick testing of ideas.) If you have not made a Maven plugin before, a good start might be one that does something trivial, essentially hello, world for a plugin. Perhaps add a new subproject (pljava-pgxs-maven?) whose product is an org.postgresql pljava-pgxs-maven-plugin. For a start, the plugin should have an Initialize phase, and do nothing but set a Maven property pljava.pgxs to the value 1. Then alter the POM in the pljava-so subproject to refer to that plugin, and use the value of ${pljava.pgxs} somewhere, perhaps in a for the C compiler, so we can see the value set by the plugin get compiled into C code. Doing that much would confirm that we can successfully build a plugin in one subproject, use it in another, and have it set Maven properties. I think those would be good first steps. If any of that turns out to be unexpectedly hard, finding out sooner is better. There might be existing examples to look at, but be aware of their licensing terms; PostgreSQL and PL/Java are BSD-licensed, and it would not be good to copy, or even appear to copy, any code that is not. Regards, -Chap