Issues with the MAVEN project in Eclipse: Troubleshoot the dynamic Web Module x.x requires Java x.x or newer.

Source: Internet
Author: User

After last night on Close project, get up today open Project found this problem. Now it's settled.

Emphasize. Before using Eclipse to create a MAVEN project, the Web. xml file default version is 2.3, but I changed it to 3.1, and the specific changes are:

To Tomcat find the Web. XML copy inside of this come on just fine.

Solution:

First: Add the following configuration to Pom.xml.

<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <art Ifactid>maven-compiler-plugin</artifactid>
<!--here refers to the version in Web. Xml --<version>3.1</version> <configuration>
<!--here refers to the JDK version used, I am jdk1.8.0_40on the machine, so write 1.8 --<source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins></build& Gt

Second: Modify the configuration in the project's Org.eclipse.wst.common.project.facet.core.xml file: The following 1.8 and 3.1 correspond to the above version

  <installed facet= "java" version= "1.8"/>  <installed facet= "Jst.web" version= "3.1"/ >

Modify the appropriate configuration

When you are done, right-click the project-->maven-->update projects ... Update the project, then.

Issues with the MAVEN project in Eclipse: Troubleshoot the dynamic Web Module x.x requires Java x.x or newer.

Related Article

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.