If its that risky not to use profiles then it shouldn't be in the root
parent pom at all.
Do like one would for signing: rely on the environment to be setup for that
purpose, i.e. put it in settings.xml
You can still have the guts of it in the pom.
Delany


On Sun, 30 Jul 2023 at 21:46, Garret Wilson <gar...@globalmentor.com> wrote:

> On 7/30/2023 4:37 PM, Mantas Gridinas wrote:
> > Sounds like a job for profiles, …
>
> It is not a job for profiles. If I put it in a profile, a developer has
> to only mistakenly use `-P nexus` or whatever the profile is, and our
> super-secret million-dollar project gets published. I want it to be
> disabled altogether.
>
> > Another idea is to have 2 poms: one for your root, the other for module
> > definitions, and latter would use relative parent for the former.
>
> Hidden somewhere in your answer is the assumption that I do not publish
> this second POM. So now I have a sharing issue—developers can no longer
> use this second POM from Maven Central, and I have to have some other
> distribution mechanism.
>
> With that in mind, I could just simply not publish the root POM to begin
> with. Problem solved. Except that the problem is not solved. The problem
> is how I publish a POM and have its children not have the publishing
> enabled by default. Your answer, boiled down to its essence, says, "just
> don't publish the root POM"—but publishing the root POM is part of the
> problem statement, and what makes the problem difficult.
>
> > Third one is to fiddle with -m/--modules flag by telling maven to only
> > include modules in the reactor provided by that flag.
>
> I was never too good with the violin. I would prefer not to fiddle with
> things. I also don't want to use CLI flags. I simply want to have a
> child POM work normally, with publishing disabled unless I add something
> simple to the child POM itself.
>
> Garret
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to