Re: PL/Java new build plugin

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: PL/Java new build plugin
Date: 2020-07-14 20:49:20
Message-ID: 5F0E1A50.80004@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

On 07/14/20 16:40, Kartik Ohri wrote:
> I looked into the maven-antrun-plugin. The relevant part is here
> <https://github.com/apache/maven-antrun-plugin/blob/8e5b3c613e96c20881347ec16813864a2d8ef0bb/src/main/java/org/apache/maven/plugins/antrun/AntRunMojo.java#L364>.
> It adds the classpaths as a reference to an instance of an Ant Project.

Right, because we have the extra indirection of Maven plugin, running Ant
task, running script. You'll be able to shorten that to just Maven plugin
running script, so the key might be looking in the Ant source to see what
the <script> task does with a classpath ref.

> I might be doing something wrong in the integration itself which might be a
> cause of this.

It's worth mentioning that the difficulty only results from the weird stuff
Maven does with classpaths. If you just write a standalone hello-world-style
Java program that uses the ScriptEngineManager, you should find that it
Just Works. (As long as you're in Java 14 or earlier; for 15 of course you'd
need the two Graal jars on the classpath.)

So that might be an easy way to reassure yourself that you haven't missed
something in how you're calling it.

Regards,
-Chap

In response to

Browse pljava-dev by date

  From Date Subject
Next Message Chapman Flack 2020-07-14 23:02:10 Re: PL/Java new build plugin
Previous Message Kartik Ohri 2020-07-14 20:40:02 Re: PL/Java new build plugin