新建SpringBoot项目打包WAR报错Error assembling WAR: webxml attribute is required

版权声明:学习交流为主,未经博主同意禁止转载,禁止用于商用。 https://blog.csdn.net/u012965373/article/details/84326977

报错信息:

Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml 

springboot启动的项目报错。

解决方案:

<!-- 没有web.xml文件的情况下构建WAR
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.0.0</version>
            </plugin>
            -->
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <!--如果想在没有web.xml文件的情况下构建WAR,请设置为false。-->
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>

猜你喜欢

转载自blog.csdn.net/u012965373/article/details/84326977
war