maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sigmond Hola <sigmund....@gmail.com>
Subject Re: Why I can run plugin:goal in command line even though plugin was only defined under pluginManagement?
Date Sat, 24 Feb 2018 10:03:36 GMT
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 <ecki@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.god@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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message