Re: the ScriptingMojo

From: Chapman Flack <chap(at)anastigmatix(dot)net>
To: Kartik Ohri <kartikohri13(at)gmail(dot)com>
Cc: pljava-dev(at)lists(dot)postgresql(dot)org
Subject: Re: the ScriptingMojo
Date: 2020-08-26 22:18:42
Message-ID: 5F46DFC2.8090207@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

On 08/26/20 12:55, Kartik Ohri wrote:
> Windows configuration. I am having some issues with the File.separator
> being used in paths. Once I am able to resolve it, we should have all the

Serves you right! :)

On 08/23/20 13:27, Chapman Flack wrote:
> - The Maven-interpolated ${...} properties are convenient for getting
> stuff working, but will eventually have to go, as in f413312.

Remember that when you write something like this in the Maven config:

var source_path = java.nio.file.Paths.get("${basedir}", "src", "main", "c");

Maven has no idea that this config string is JavaScript code, and Maven
knows nothing about JavaScript syntax. It's just going to stick the value
of ${basedir} into the middle of this long text value that happens to be
JavaScript.

And if that value contains \ characters, those have special meaning in JS
string literals. Maven didn't know any better.

All of those string interpolations have to go, and become, for example,

var source_path = java.nio.file.Paths.get(project.basedir, "src", "main", "c");

as was done in f413312.

Regards,
-Chap

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Chapman Flack 2020-08-27 00:42:11 Re: the ScriptingMojo
Previous Message Chapman Flack 2020-08-26 22:04:32 Re: the ScriptingMojo