在eclipse中创建maven项目时,pom.xml或者Java Resources出现红色叉的解决方案

创建maven项目,pom.xml或者Java Resources出现红色叉的解决方案

1.创建maven项目,点击next在eclipse中创建maven项目时,pom.xml或者Java Resources出现红色叉的解决方案
2.选择war,表明是一个web项目,将其打包成war包,点击完成
在eclipse中创建maven项目时,pom.xml或者Java Resources出现红色叉的解决方案
在eclipse中创建maven项目时,pom.xml或者Java Resources出现红色叉的解决方案
3.右击项目,选择Properties属性,点击Project Facets 如下图:
在eclipse中创建maven项目时,pom.xml或者Java Resources出现红色叉的解决方案
4.解决pom.xml问题:首先点击Dynamic Web Module的选择框,打勾取消,然后点击Apply按钮
5.再次给Dynamic Web Module的选择框,打勾,将会出现如下图:
在eclipse中创建maven项目时,pom.xml或者Java Resources出现红色叉的解决方案
6.点击(5)的标注,将WebContent改为src/main/webapp,ok然后点击Apply即可
在eclipse中创建maven项目时,pom.xml或者Java Resources出现红色叉的解决方案
7.Java Resources红叉的解决办法:在(5)中Java的版本为1.5,首先打开cmd ,输入javac -version查询你自己安装的jdk版本,将其修改为你自己安装jdk的版本,即可。
在eclipse中创建maven项目时,pom.xml或者Java Resources出现红色叉的解决方案