[转载]maven eclipse 工程缺少build path怎么办?
现象
在eclipse里用subeclipe从svn上拖下来的项目,看不见java build path怎么办?
原因
那是因为你的两个配置文件:.project .classpath没有内容或者缺失。
解决
以一个maven管理的java项目为例。
用下面内容替换掉.project文件
<?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>fastjson_source</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>org.maven.ide.eclipse.maven2Builder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> <nature>org.maven.ide.eclipse.maven2Nature</nature> </natures> </projectDescription>
.classpath 文件
<?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" output="target/classes" path="src/main/java"/> <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/> <classpathentry kind="src" output="target/test-classes" path="src/test/java"/> <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> <classpathentry kind="lib" path=".project"/> <classpathentry kind="output" path="target/classes"/> </classpath>
相关推荐
86276537 2020-11-19
wesai 2020-08-12
DataPythonVBA 2020-08-11
88266432 2020-08-11
绿豆饼 2020-07-28
chenkai00 2020-07-26
webpackvuees 2020-07-23
糊一笑 2020-07-04
pandaphinex 2020-06-11
TaoTaoFu 2020-06-09
gloria0 2020-06-09
applecarelte 2020-06-05
ajuan 2020-06-03
Justagreenonion 2020-05-30
GechangLiu 2020-05-25
ZGCdemo 2020-05-13
83206733 2020-04-22
zhaolisha 2020-05-06
Keepgoing 2020-05-06