public inbox for [email protected]  
help / color / mirror / Atom feed
From: Chapman Flack <[email protected]>
To: Kartik Ohri <[email protected]>
Cc: [email protected]
Subject: Re: PL/Java new build plugin
Date: Thu, 2 Jul 2020 12:24:45 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAASLQ4NvfJz8VQQFU8mKkY4RabiVQesxdbkudk5Cf24Tm9BixQ@mail.gmail.com>
References: <CAASLQ4Mva7dAXiS_c9OLhV4VzNHF=XNKJosuS5gtZTB6b4TW1Q@mail.gmail.com>
	<[email protected]>
	<CAASLQ4P6vTfRNVnreNp7Su8VmyhA+wKOYDY8iUfa7eSoogFkXA@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<CAASLQ4N0KeUx8PaJMKbHWiVtLvBo3QNACdHgOyk72q30976d+g@mail.gmail.com>
	<[email protected]>
	<CAASLQ4NvfJz8VQQFU8mKkY4RabiVQesxdbkudk5Cf24Tm9BixQ@mail.gmail.com>

On 07/02/20 00:15, Kartik Ohri wrote:
> I was reading about setting properties in MOJOs and found this detailed
> answer <https://stackoverflow.com/a/14727072/5557184;. I think this impacts
> how we utilise the plugin. Can you take a look?

That's a good find, and probably deserves a link on the wiki page, just
because I haven't ever found a better document for just laying out piece
by piece what will work and what won't.

It is clear why we can't use mojo-set properties in the activation of
profiles (profile activation happens too early), and I remember that
disappointed me greatly the first time I tried.

At present, the only ways we are using mojo-set properties are ways
that work, and provided we only change what mojo is setting them
(our own, vs. properties-maven-plugin reading them from a file), that
should not change.

We do, at present, have several Maven profiles in that POM that all
have to be activated different ways (command line, or system properties),
which has always been kind of inconvenient. In essence, we have been
using multiple profiles as a way to get nar-maven-plugin to apply the
right recipes for each platform.

Our own plugin should not need to be tweaked by profiles to do that;
it should natively have the notion of different recipes for different
platforms, and selecting the right one should be part of what it does.
(Of course nar-maven-plugin does have that notion natively also, it's
just that its built-in recipes aren't configurable enough for that to do
what we need.)

That should have a nice effect of shortening the POM too. The way the
Maven profile XML notation requires twenty-four lines to say "if it's
Mac OS, add --bundle_loader postgres" has never been a boon to readability.

That StackOverflow write-up does mention "properties injected into the
MavenSession"—rather than into any particular MavenProject—so that might
be a solid hint where we should set them.

Regards,
-Chap





view thread (132+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: PL/Java new build plugin
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox