Re: PL/Java new build plugin

From: Chapman Flack <chap(at)anastigmatix(dot)net>
To: Kartik Ohri <kartikohri13(at)gmail(dot)com>, pljava-dev(at)lists(dot)postgresql(dot)org
Subject: Re: PL/Java new build plugin
Date: 2020-06-29 22:33:06
Message-ID: 5EFA6C22.8060006@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

Hi,

On 06/29/20 16:46, Kartik Ohri wrote:
> Hi!, I have worked on your comments and fixed the issues.

Thanks! Does that exist as a branch on github?

There are some choices how to do that; ideally, one would want to
rebase/squash the fixes into your original commit on branch 'plugin',
so there would only appear one commit that made the intended changes
in, say, pom.xml (as opposed to a commit that completely changes it
and one that changes it back).

Naturally, that changes the commit history, and requires a 'force' push
to publish. It is usually discouraged in a published branch, because
it means any other repositories cloned from it will require a manual step
of also forcing the local tracking branch to match.

So you could go for a very by-the-book approach and just start a branch
with a new name for the new commit, and never change the first one. For
the main repository I follow that policy, but it is probably overkill
here. There might not be anybody tracking your 'plugin' branch but me,
and I won't mind having to resync with it at this early stage. :)

> It builds for me
> in a single step as well. (It required two only the first time I added the
> module.)

I am curious; have you tried it again with org/postgresql/* deleted from
~/.m2/repository ? That should be the same as building it the first time,
and I was able to do that and get a successful one-step build.

My test was with a use of the plugin added to pljava-so; I was not
trying to run the plugin directly from the mvn command line. Maybe that's
the difference.

> give me some pointers ? I was thinking of going through nar maven plugin
> source code but didn't know where to start since our plugin is targeted at
> a specific project and there may be many things we need not to work on.

Exactly ... I have been developing gradually clearer ideas about it
over the last weeks and now I need to write them down. There is a lot
the nar-maven-plugin does that we don't need, and I agree, we will have
a simpler plugin and an easier-to-understand build by not trying to
replicate all that.

Now I just have some writing to do. I'll see how far I get tonight.

Is the plugin able to set some project properties now? That will be
one necessary piece.

Regards,
-Chap

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Chapman Flack 2020-07-01 05:02:17 Re: PL/Java new build plugin
Previous Message Kartik Ohri 2020-06-29 20:46:48 Re: PL/Java new build plugin