解决maven web项目Cannot detect Web Project version. Please specify version of Web Project through...的错误

前面已经创建maven web工程,但是问题来了,创建maven web工程之后会出现如下的错误,在pom.xml文件头部 有以下的错误

Description    Resource    Path    Location    Type
Cannot detect Web Project version. Please specify version of Web Project through <version> configuration property of war plugin. E.g.: <plugin> <artifactId>maven-war-plugin</artifactId> <configuration> <version>3.0</version> </configuration> </plugin>    pom.xml    /Wecat    line 1    Maven Java EE Configuration Problem
<artifactId>maven-war-plugin</artifactId>

根据报错信息,是没有指定maven-war-plugin 的版本信息

加上下面这段代码即可:


<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<version>3.0</version>
</configuration>
</plugin>

 

参考文章:http://blog.csdn.net/enson16855/article/details/19704355


原文地址:https://www.cnblogs.com/YangK-java/p/6288760.html