Maven General Error List and solutions

Source: Internet
Author: User

Update information

2016-03-13 Open Post


The idea is simple, list all sorts of troubles that you have encountered in Maven learning, and provide solution unknown origin.

At the beginning, encountered errors can be by the error message:


error prompt: Web. XML is missing and <failOnMissingWebXml> is set to true< Span style= "line-height:0px;" >

Guess why: This is Maven's own mistake. This means that the Web. xml file is missing from your website, but today Web. XML is a dispensable presence in a wide range of application projects. But Maven still sees this as a must.

Solution: Add the following code to your Pom.xml file, no need to create that useless web. xml

<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <art Ifactid>maven-war-plugin</artifactid> <version>2.6</version> <configuration> & lt;failonmissingwebxml>false</failonmissingwebxml> </configuration> </plugin> </PLUGINS&G T;</build>


Error hint: Dynamic Web Module 3.0 requires Java 1.6 or newer

Reason for speculation: nothing more than the inconsistency between the dynamic Web module and the Java version of Project Facets. When you adjust the version of Dynamic Web module, you are prompted at the bottom.

Solution: Depending on the Java version number, you can also modify the Pom.xml to tell maven the Java version required at compile time

<build>  <plugins>    < plugin>      <groupid>org.apache.maven.plugins</groupid>       <artifactId>maven-compiler-plugin</artifactId>       <version>2.3.2</version>      <configuration >        <source>1.6</source>         <target>1.6</target>      </configuration >    </plugin>  </plugins></build> 




This article is from the "Mosquito Can Program" blog, make sure to keep this source http://wenzi813.blog.51cto.com/11308605/1750485

Maven General Error List and solutions

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.