Eclipse or Spring Suit Error - Maven Project - Dynamic Web module cannot be changed to 3.1

主宰稳场 提交于 2019-12-01 10:31:26

问题


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



来源:https://stackoverflow.com/questions/36056485/eclipse-or-spring-suit-error-maven-project-dynamic-web-module-cannot-be-chan

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!