Using web.xml
can be tricky sometimes with Maven.
The Correct location of web.xml: project\src\main\webapp\WEB-INF\web.xml
PROBLEM:
Although, maven should be automatically picking up this file (Convention Over Configuration right?) but most of the times it fails to do so and burps out this ERROR:
Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)
SOLUTION:
May looks annoying, but try specifying the location explicitly and it works…
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration> <webXml>src\main\webapp\WEB-INF\web.xml</webXml> </configuration> </plugin>