Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Garret Wilson
On 7/30/2023 9:18 PM, Nick Stolwijk wrote: I took a quick look at the Maven-Nexus-plugin and there is an option to disable it (skipNexusStagingDeployMojo), so I would start there. I in fact did start there. I don't know if you happened to read this part of my question which started this

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Nick Stolwijk
I took a quick look at the Maven-Nexus-plugin and there is an option to disable it (skipNexusStagingDeployMojo), so I would start there. Nick Stolwijk ~~~ Try to leave this world a little better than you found it and, when your turn comes to die, you can die happy in feeling that at any rate you

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Garret Wilson
How is the best way you would recommend to turn off publishing in parent B? Garret On 7/30/2023 8:47 PM, Nick Stolwijk wrote: In that case I would publish your parent with all the Good Stuff (parent A) in the central repository, and have a second parent inheriting Parent A where publishing is

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Nick Stolwijk
In that case I would publish your parent with all the Good Stuff (parent A) in the central repository, and have a second parent inheriting Parent A where publishing is turned off. So your super secret, multi gazillion project can inherit from parent B and so no publishing is going on, unless they

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Garret Wilson
On 7/30/2023 8:16 PM, Nils Breunese wrote: … Can I ask why you publish this root POM as a public artifact to Maven Central? 1. To be a good open-source citizen and help others with all the goodies this POM provides (many of them which should be in Maven by default but are not). 2. To

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Nils Breunese
Garret Wilson wrote: > 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. Can I ask why you publish this

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Nick Stolwijk
I think the idea of the flatten-maven-plugin is a Good Idea. It removes any inheritance in the POM structure before publishing to a repository. It is a "weak" implementation of the consumer POM that Maven is working towards. It doesn't change your artifacts, it just flattens the POM so it isn't

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Garret Wilson
On 7/30/2023 7:34 PM, Nick Stolwijk wrote: I am missing the purpose of publishing the parent pom. Is it because other projects can inherit of it, Yes. or is it because your own projects (that you want to be published) are inherited from it? Yes. In the second case, you can use the

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Garret Wilson
On 7/30/2023 6:32 PM, Tamás Cservenák wrote: There is no need for another plugin... well, let me explain: all the "vanilla" plugins of Maven (install, deploy, release) support everything that aforementioned plugin does: install at end, deploy at end, stage/deploy, there is ONLY two things they

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Nick Stolwijk
I am missing the purpose of publishing the parent pom. Is it because other projects can inherit of it, or is it because your own projects (that you want to be published) are inherited from it? In the second case, you can use the maven-flatten-plugin to have the published projects not be dependent

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Garret Wilson
I think we'll have to "agree to disagree" on this one. But I'll note that by following the same logic presented below, CloudFormation and Terraform would require the developer to log into the AWS console to finalize a deployment. That similarly would be unacceptable to me. Thanks for

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Tamás Cservenák
Well, I disagree: The App UI you are staging to will show you: - who staged, - what is staged - in case or error (ie. signature mismatch or checksum mismatch) where are the problems - etc Is not prone to errors, as you do not modify content at all by doing that (Maven did deliver it already),

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Garret Wilson
On 7/30/2023 6:32 PM, Tamás Cservenák wrote: There is no need for another plugin... well, let me explain: all the "vanilla" plugins of Maven (install, deploy, release) support everything that aforementioned plugin does: install at end, deploy at end, stage/deploy, there is ONLY two things they

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Tamás Cservenák
There is no need for another plugin... well, let me explain: all the "vanilla" plugins of Maven (install, deploy, release) support everything that aforementioned plugin does: install at end, deploy at end, stage/deploy, there is ONLY two things they cannot do: "close" and "release" (the staging

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Garret Wilson
Oh, I'll gladly switch to another plugin. I can just change out the whole inheritance tree—no problem. Goodness knows that this plugin has a bunch of problems (e.g. NEXUS-26993 and NEXUS-31301, which tickets don't seem to be visible anymore). I thought sure I asked about this (probably in

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Tamás Cservenák
And how about not using this plugin? Even it's maintainer dropped it, is EOL. Furthermore, things this plugin does means is (or is to be) unusable with Maven4. So is a dead end. A new project should not start using it, really. Hth T On Sun, Jul 30, 2023, 20:29 Garret Wilson wrote: > I have a

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Delany
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

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Garret Wilson
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

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Garret Wilson
On 7/30/2023 4:00 PM, Delany wrote: What happens if you add this to the pluginManagement/plugin section? false Delany Delany, I think you are referring to the `` tag for build plugins documented here:

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Mantas Gridinas
Sounds like a job for profiles, but I do not remember if you can load modules via profiles. The idea is your default profile/pom would not include the modules block, while your "development" or some other profile would have such block. Caveat here is intellij and/or others will break once you

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Garret Wilson
On 7/30/2023 3:45 PM, Thomas Broyer wrote: The easiest way to opt-in is to configure the plugin in of the parent POM, and then only "apply" to chosen projects by declaring the plugin in the (only needs the groupId and artifactId then) Let me make sure I'm understanding what you're

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Delany
What happens if you add this to the pluginManagement/plugin section? false Delany On Sun, 30 Jul 2023 at 20:29, Garret Wilson wrote: > I have a "root" POM which I use as the inheritance ancestor of all my > projects: https://github.com/globalmentor/globalmentor-root > > By default it's

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Thomas Broyer
The easiest way to opt-in is to configure the plugin in of the parent POM, and then only "apply" to chosen projects by declaring the plugin in the (only needs the groupId and artifactId then) That only works if you're calling Maven with lifecycle phases though, I think it'll error out if you

elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Garret Wilson
I have a "root" POM which I use as the inheritance ancestor of all my projects: https://github.com/globalmentor/globalmentor-root By default it's configured to use the [Nexus Staging Maven Plugin](https://github.com/sonatype/nexus-maven-plugins/blob/main/staging/maven-plugin/README.md). It