有些导入eclipse的项目中,没有被eclipse检测成java项目,项目目录的左上角没有J字母,应该是.project没有配置好,需要给此项目配置一个插件,如下:
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>test1</name>
<comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
<projects/>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
加上org.eclipse.jdt.core.javanature插件后,eclipse就能检测出了