问题描述
||
我刚刚将以下代码添加到我的pom.xml中(如此处指定):
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.1.1</version>
<configuration>
<container>
<containerId>tomcat7x</containerId>
<zipUrlInstaller>
<url>http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.12/bin/apache-tomcat-7.0.12.zip</url>
</zipUrlInstaller>
</container>
</configuration>
</plugin>
</plugins>
</build>
但是,当我运行mvn clean verify cargo:run
时,我得到以下信息:
No plugin found for prefix \'cargo\' in the current project and in the plugin groups [org.apache.maven.plugins,org.codehaus.mojo]
任何帮助将不胜感激。
解决方法
您必须定义pluginGroup才能在命令行上使用缩写。
, 另一个解决方案是指定完整的插件名称“ 3”而不是“ 4”。
因为你将是
mvn clean verify org.codehaus.cargo:cargo-maven2-plugin:run