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 1jry7s-0006TT-W9 for pljava-dev@arkaria.postgresql.org; Sun, 05 Jul 2020 06:27:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jry7r-00012S-Sa for pljava-dev@arkaria.postgresql.org; Sun, 05 Jul 2020 06:27:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jry7r-00012L-Cw for pljava-dev@lists.postgresql.org; Sun, 05 Jul 2020 06:27:43 +0000 Received: from anastigmatix.net ([68.171.219.55]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jry7m-0006mQ-QA for pljava-dev@lists.postgresql.org; Sun, 05 Jul 2020 06:27:42 +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: In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=bPhgC6V7JbSKoWtcQFcolyIUr70NJ9+rSgPnR/zuAZk=; b=JpZQ+LCP+zqAhaWP0vCpiePonb YMqBMbwxNwQktdv5TRptSLF54Yb59mYPPG9Eb0m3cfH9LLaKkYmSUrH/vmDSiuS4r6NRlCMCYDmAa RhaQlty9wPQnNU9rk1ObvT7+Vuzztos+R+SY70gbVT5zzHxyehc+OjtARwI25S+iD4skr0LxlPPEg HO5mMpjlYNMfzAPI51e9YK6ZIPIeO3bstf52aBaIRh8t6gnF6UooFMmgVbcRfbZMwSFejH3XtNyHm Fc1qs4rSu7V3bM13PjhCGBiyOZn5rRI9mtK4pIfn0isbRzhzl5MzcN91FYEGIjW9xtmQUfG0q2wYJ 36ZZcXkQ==; Received: from [184.19.31.139] (port=43184) by bay.acenet.us with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1jry7k-004Zc7-Kk; Sun, 05 Jul 2020 02:27:37 -0400 Subject: Re: PL/Java new build plugin To: Kartik Ohri References: <5EF7B265.3060907@anastigmatix.net> <5EFA6C22.8060006@anastigmatix.net> <5EFC18D9.3090108@anastigmatix.net> <5EFD41B1.30009@anastigmatix.net> <5EFE0A4D.8060402@anastigmatix.net> <5F0125BC.5000609@anastigmatix.net> Cc: pljava-dev@lists.postgresql.org From: Chapman Flack X-Enigmail-Draft-Status: N1110 Message-ID: <5F0172D7.3000708@anastigmatix.net> Date: Sun, 5 Jul 2020 02:27:35 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: 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 On 07/05/20 00:35, Kartik Ohri wrote: > I had checked about the si flag and think it is probably the same function > as the DOTALL flag I set for that pattern. DOTALL is the long name of one of those flags (s); the other one (i) is CASE_INSENSITIVE. Am I missing where they are being set? > After the replacement, the string when written to file displays some empty > boxes instead of the correct version. I'll share an example soon. Oh, I think I see where that probably is. For some reason, while the 'replacement' string in the underlying java.util.regex methods uses $1, $2, etc., to refer to captured groups, just to keep things interesting the 'replace' attribute in an ant containsregex element uses \1, \2 instead. I bet if you ran the output through od or the like, you would see that the two empty boxes are the byte values 001 and 002, which are what \1 and \2 in a Java string literal represent. > I saw this as well and though that the plugin in POM executed multiple > times with the specific argument to assign the entire output as the > property. I did not go with that approach because I thought it was simply > not possible for that plugin to read the output and process it to store > different parts in multiple properties. Have you written out the assumptions that must be true of pg_config's output, for parsing it into the separate properties to be reliable? Regards, -Chap