Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.2.3:run (default-cli) on project Mav

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.2.3:run (default-cli) on project Mav相关的知识,希望对你有一定的参考价值。

 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 Mav的主要内容,如果未能解决你的问题,请参考以下文章

运行maven项目时出现一下问题:“ Failed to execute goal org.apache.maven.plugins“

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile

maven报错---Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create (default-c

Maven多模块项目单独编译子模块项目时报错:Failed to execute goal on project

Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.1.0