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