Tag Archives: Error assembling WAR: webxml attribute is required (or preexisting WEBINF/web.xml if executing in update mode)

[Solved] Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)

When packaging Maven war package project for springboot project in idea, you will be prompted:

Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)

The reason is that it will find the web XML file, which is deleted by default for springboot projects.

The solution is to add a plug-in in POM to package:

<plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-war-plugin</artifactId>
     <version>3.2.0</version>
</plugin>

Once added, you can package.