您的位置:首页 > 其它

If you encounter a maven error on your pom file saying web.xml is missing

2017-05-27 00:12 477 查看

If you encounter a maven error on your pom file saying web.xml is missing

if you encounter a maven error on your pom file saying web.xml is missing 
and <failOnMissingWebXml> is set to true, then it means it is expecting a web.xml file in your Maven project
 because it is a web application, as we have chosen packaging as war. However, nowadays in web applications
 web.xml file is optional. Add the following configuration in your pom.xml within <project> tag to fix the error:

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

Packt.Spring.MVC.Beginners.Guide.2nd.Edition.B01I9PAB2O

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐