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.
Similar Posts:
- Springboot 2.4 package error, missing web.xml
- Solve the error in Maven project packaging: error injecting constructor
- Maven warnning: ‘build.plugins.plugin.version’ is missing [How to Solve]
- [Solved] SpringBoot Package Error: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-res
- [Solved] Spring Boot Package Error: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0
- Maven no main manifest attribute when generate jar for project
- [Solved] Spring Start Error: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project gulimall-coupon: There are test failures. Please refer to D:\m1\0613\mall-coup
- How to Solve Error: spring-boot-maven-plugin not found
- [Solved] Dynamic Web Module 3.0 requires Java 1.6 or newer
- Remove dependency-reduced-pom.xml file when packaging Maven project