Failed to execute Goal.....webxml attribute is required ...

Source: Internet
Author: User

Maven has an error when packaging a project


webxml attribute is required (or pre-existing Web-inf/web.xml if executing in update mode)

The default webroot for MAVEN Web projects is at Src\main\webapp. If the Web. XML is not found in this directory, the above exception is thrown.

In fact, this problem does not occur if the standard MAVEN project structure is present.

Even if the skeleton is not used in eclipse, it is a relatively standard project structure, but it is not the same in idea.

For example, I use MAVEN to build a Web project, start with a skeleton, build a Maven project, and then add the Web environment, which is the following structure

In this structure, if no other configuration, there will be the above exception, in fact, good to do, after the project structure to build this, continue to do the following operations

Web Folder-->webapp, then drag the entire folder under the main file.

In fact, this does not reduce the efficiency, because the use of the skeleton will sometimes get stuck in the skeleton, and the resulting structure is not very complete, the content of some files is not standard.

OK, then do it, hehe.

Failed to execute Goal.....webxml attribute is required ...

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.