Deploy is a phase in the default lifecycle https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html So whatever plugins are bound to that phase will be executed if you ask Maven to run to that phase. To see what those executions would be, run mvn fr.jcgay.maven.plugins:buildplan-maven-plugin:1.5:list-phase
The "deploy" goal of the deploy-maven-plugin requires configuration of the <distributionManagement> section https://maven.apache.org/plugins/maven-deploy-plugin/usage.html In any case, what repository on the Internet is configured to allow anonymous uploads? The settings.xml must always be populated with <server> credentials for a deployment to take place. If you fear someone accidentally uploading artefacts to random repos then "you're doing it wrong". Credential in settings.xml and managed manually or someone other provisioning system = a good night sleep That's why I'm not a fan of https://issues.apache.org/jira/browse/MNG-5659 Delany On Mon, 31 Jul 2023 at 18:02, Garret Wilson <gar...@globalmentor.com> wrote: > On 7/31/2023 3:07 AM, Delany wrote: > > Perhaps you're getting confused because you conflate 2 issues: > > … prevent general configuration like <licenses> from being inherited. > > … preventing plugin configuration from being inherited. > > I do not conflate them—I do not think they are the same thing. I said > they are both similar in one aspect: they have to be defined in order to > publish the parent POM itself, but they semantically may not apply to > projects that _use_ the parent POM, and thus may not be desired to be > inherited. > > But I don't want to get off-track; perhaps it was unwise to even mention > the `<license>` issue and risk going down a different rabbit hole. I'll > stick to the plugin configuration inheritance topic. > > > The second, to disable executions by default, just configure the phase to > > none. Do this if the plugin/goal lacks a <skip> parameter. > > Ah, I had forgotten about the `<phase>none</phase>` trick—thanks for > reminding me, Delany. > > Let me confirm something: if I disable the Nexus Staging Maven Plugin by > using `<phase>none</phase>` in a child POM, what will happen when a > developer types `mvn deploy`? Nothing? I only ask because Tamás had > mentioned the Maven Deploy Plugin. But I'm looking at the latest [super > POM](https://maven.apache.org/ref/3.9.3/maven-model-builder/super-pom.html), > > and it looks like Maven Deploy Plugin is only activated in the > `performRelease` profile (which is to be removed anyway). > > So if using `<phase>none</phase>` with the Nexus Staging Maven Plugin > completely disables all staging and deployment, that may be the easiest > way to disable it in the child POM. Thanks again for the tip. > > Garret > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >