2011-06-11 45 views
3

”未发现前缀插件“我刚才下面的代码添加到我的pom.xml(如在here指定):的Maven 3和货物 - 货“

<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] 

任何帮助将不胜感激。

+0

你为什么不配置货物maven2的-插件的预集成测试阶段通过命令行手动调用它的运行来代替。 – khmarbaise 2011-06-11 14:33:22

回答

0

另一种解决方案是指定完整插件名称org.codehaus.cargo:cargo-maven2-plugin而不是cargo

因为你必mvn clean verify org.codehaus.cargo:cargo-maven2-plugin:run