Web. XML is missing and <failOnMissingWebXml> are set to True

Source: Internet
Author: User

When you create a project using MAVEN, there are sometimes failonmissingwebxml errors in the Pom.xml war, and depending on the cause of the error, you know that the project is a Web project and is packaged as a war package.

If the project does not have Web. XML, add a Web. XML to the project, refresh the project, there should be no errors, if you have to see the following introduction

If your project has Web. XML under/src/main/webapp/web-inf, but still report this error, it takes two steps

1) Right-click the project, open the Properties dialog, click the Deployment assembly option, add a folder to the right, and save the settings

2) Click Project->clean above Eclispe to clean up this project

This two-step error should be clear.

There is also a common practice on the Internet

There is a way to provide a disguised evasion error, add configuration, let go of the error prompt.

<Build>      <Plugins>          <plugin>              <groupId>Org.apache.maven.plugins</groupId>              <Artifactid>Maven-war-plugin</Artifactid>              <version>2.3</version>              <Configuration>                  <Failonmissingwebxml>False</Failonmissingwebxml>              </Configuration>          </plugin>      </Plugins>  </Build

Web. XML is missing and <failOnMissingWebXml> are set to True

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.