Wednesday, 15 September 2010

java - Maven - No plugin found for prefix 'tomcat7' in the current project and in the plugin groups -



java - Maven - No plugin found for prefix 'tomcat7' in the current project and in the plugin groups -

i've created maven project. structure

-parent -core -web

but when seek deployt command "mvn tomcat7:deploy", i've next error :

no plugin found prefix 'tomcat7' in current project , in plugin groups [org.apache.maven.plugins, org.codehaus.mojo]

i set configuration in pom.xml (of web project)

<build> <finalname>mavenweb</finalname> <plugins> <plugin> <groupid>org.apache.tomcat.maven</groupid> <artifactid>tomcat7-maven-plugin</artifactid> <version>2.0</version> </plugin> </plugins> </build>

plugins goals can called using 'fqn': groupid:artifactid:version:goal or, if applicable, shorter commands (many variants available). using short name of plugin (in tomcat7:deploy, tomcat7 short name, deploy beingness goal/mojo) applicable if:

1) groupid of plugin contained in known plugin groups of maven. org.apache.maven.plugins beingness in list default.

or

the pom.xml of project you're invoking maven command on declares plugin

2) artifactid [short-name]-maven-plugin or maven-[short-name]-plugin (maven-[short-name]-plugin beingness 'reserved' plugins provided maven project.

that explains why mvn compiler:compile can work out of box on project, not tomcat7:deploy

in case, sec status true, have declare plugin on project you're launching command on, or add together user settings.xml file:

<plugingroups> <plugingroup>org.apache.tomcat.maven</plugingroup> </plugingroups>

see here more info

java maven tomcat

No comments:

Post a Comment