解决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


					


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM