錯誤web.xml is missing and is set to true的解決辦法

    剛剛創建maven項目的時候會出現Description Resource Path Location Type web.xml is missing and <failOnMissingWebXml> is set to true pom.xml /itcast-usermanage line 13 Maven Java EE Configuration Problem異常,看提示的意思的這個項目的web.xml文件缺失了,但是我們一開始不需要web.xml,但是又不想出現這個錯誤,那麼我們可以在pom文件下面加上這一行:

    <build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>

    </build>

    這樣我們的項目就被設置成不需要web.xml文件了,再update一下項目即可,

,這時項目就不會保錯了~~

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章