Eclipse or Spring Suit Error - Maven Project - Dyn

2020-03-30 08:27发布

问题:

I have configure external Maven 3.9 to spring tool suit.

I did all possible way what was mentioned in different post from stackover flow but failed to overcome below error Cannot change version of project facet Dynamic Web Module to 3.1

Can any one please help me to resolve it.

I will give you the steps I did to create the Maven Project.

  1. New -> Maven Project -> Selected maven-arcetype-webapp

**

  1. As some blog suggested updated the web.xml to latest 3.1
  2. Changed the System Library from 1.5 to 1.8
  3. Still when i try to change the Dynamic Web Module in project facet, its gives me the error I shared.

Even some blogs suggested me to change the xml file from navigator view of project facet. After which if i do an Maven -> Update Project. Again things get worse.

It gives me below error.

I am really fed up to find a solution have done enough research. Please any one help me on this.

I want a Maven Project with JRE 1.8 with Project Facet - Web module 3.1 without any error.

And also if I take a Maven update project (The JRE should not change to 1.5 which is really annoying)

回答1:

Go to properties of you project , in Project Facets. The Windows on the right select Runtimes you gonna have your jre (jre7 or 8) check the box and you gonna have in the left the box checked Java : choose your version of Java : 1.8 and you'll see that Dynamic Web Module will disappear. After that uncheck the choosen runtime jre and the Dynamic Web Module will reappear . here you gonna choose your version 3.1 without the error then -> Apply OK