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>