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