Le dim. 30 juil. 2023, 21:36, Garret Wilson <gar...@globalmentor.com> a
écrit :

> On 7/30/2023 3:45 PM, Thomas Broyer wrote:
> > The easiest way to opt-in is to configure the plugin in
> <pluginManagement>
> > of the parent POM, and then only "apply" to chosen projects by declaring
> > the plugin in the <build><plugins> (only needs the groupId and artifactId
> > then)
>
> Let me make sure I'm understanding what you're suggesting:
>
> 1. Configure the plugin in `<pluginManagement>` in the root POM.
>
> 2. Do _not_ add the plugin to the `<build><plugins>` section in the root
> POM.
>
> Is that what you are proposing?
>
> So then how do I publish the root POM itself to Maven Central? (That was
> the "catch-22" part in the description.)
>

That's what I was proposing, yes (and I did miss the catch-22). But you can
add the plugin to the <build><plugins> in the root POM with
<inherit>false</inherit> as suggested by Delany.
The configuration will be inherited by all projects through the
pluginManagement as soon as you add the plugin to <build><plugins> of that
project (or a parent project).

Reply via email to