首页 > 代码库 > Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.2.3:run (default-cli) on project Maven_WebTest: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.2.3:run failed: C

Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.2.3:run (default-cli) on project Maven_WebTest: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.2.3:run failed: C

 1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 2     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 3     <modelVersion>4.0.0</modelVersion> 4     <groupId>me.slp.maven</groupId> 5     <artifactId>WebProject</artifactId> 6     <packaging>war</packaging> 7     <version>0.0.1-SNAPSHOT</version> 8     <name>WebProject Maven Webapp</name> 9     <url>http://maven.apache.org</url>10     <dependencies>11         <dependency>12             <groupId>junit</groupId>13             <artifactId>junit</artifactId>14             <version>3.8.1</version>15             <scope>test</scope>16         </dependency>17     </dependencies>18     <!-- 将Web项目自动部署到tomcat服务器的相关 配置信息-->19   <build>20       <!-- 将WebProject项目打包成WebProject.war自动部署到tomcat服务器的webapps目录下面 -->21     <finalName>WebProject</finalName>22     <plugins>23           <plugin>24               <groupId>org.codehaus.cargo</groupId>25               <artifactId>cargo-maven2-plugin</artifactId>26                 <version>1.4.12</version>27                 <configuration>28                     <container>29                           <!-- 指明使用的tomcat服务器版本 -->30                         <containerId>tomcat8x</containerId>31                         <!--指明tomcat服务器的安装目录 -->32                         <home>E:\apache-tomcat-8.0.35</home>33                     </container>34                     <configuration>35                         <type>existing</type>36                         <!--指明tomcat服务器的安装目录 -->37                         <home>E:\apache-tomcat-8.0.35</home>38                     </configuration>39                 </configuration>40                 <executions>  41                   <execution>  42                       <id>cargo-run</id>  43                       <phase>install</phase>  44                       <goals>  45                           <goal>run</goal>  46                       </goals>  47                   </execution>  48               </executions>49           </plugin>50       </plugins>51   </build>52 </project>

解决办法:修改一下版本号

 <groupId>org.codehaus.cargo</groupId>
     <artifactId>cargo-maven2-plugin</artifactId>
     <version>1.4.12</version> <!--原本是使用1.2.3-->

Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.2.3:run (default-cli) on project Maven_WebTest: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.2.3:run failed: C