Hi Bernd, You are right, thanks for illustration.
But why? Im still confused.... the prefix-to-artifactId mappings is defined within <pluginGroups> of effective settings.xml and the default values of it is: > org.apache.maven.plugins > org.codehaus.mojo right? tomcat7's groupId: org.apache.tomcat.maven is not included. Why I can using tomcat7 as prefix for tomcat7-maven-plugin after I add it in <build><pluginManagement><plugins> of my pom.xml... On Sun, Feb 25, 2018 at 12:36 AM, Bernd Eckenfels <e...@zusammenkunft.net> wrote: > It is true: for plugins where the prefix is not found by Default, you can > still start them with > > mvn org.apache.tomcat.maven:tomcat7-maven-plugin:run > Gruss > Bernd > -- > http://bernd.eckenfels.net > > Von: Sigmond Hola > Gesendet: Samstag, 24. Februar 2018 11:03 > An: Maven Users List > Betreff: Re: Why I can run plugin:goal in command line even though plugin > wasonly defined under pluginManagement? > > HI bernd, > > thanks for reply, but that's not true. > > Take tomcat-maven-plugin as example, if you dont defined it under > <build><pluginManagement><plugins> or <build><plugins>, then following > error will reported if you run mvn tomcat7:rununder command line: > > No plugin found for prefix 'tomcat7' in the current project and in the > plugin groups [org.apache.maven.plugins, org.codehaus.mojo] > > > > > Best regards. > > > On Sat, Feb 24, 2018 at 4:39 PM, Bernd Eckenfels <e...@zusammenkunft.net> > wrote: > > > Hello, > > > > You can always run goals on the command line, even if they are not > defined > > in the POM at all. If maven finds the plugin in the POM it knows what > > version to use and it allows to specify a Prefix instead of > > group:artifact[:version]:goal. > > Gruss > > Bernd > > > > Gruss > > Bernd > > -- > > http://bernd.eckenfels.net > > ________________________________ > > From: Sigmond Hola <sigmund....@gmail.com> > > Sent: Saturday, February 24, 2018 7:01:04 AM > > To: users@maven.apache.org > > Subject: Why I can run plugin:goal in command line even though plugin was > > only defined under pluginManagement? > > > > I defined a specific plugin under <build><pluginManagement><plugins>, > but > > not under <build><plugins>, but I can still run goals of this plugin > > with mvn > > plugin:goal. > > > > As far as I understand<pluginManagement> is only used to configuring the > > plugin information, but not actually import them, right? then how can I > use > > the goals of this plugin in the command line? > > > > Thanks for reply. > > > > Bests. > > --Sig > > > >