Eclipse“这个编译单元不在java项目的构建路径上” [英] Eclipse "this compilation unit is not on the build path of a java project"
问题描述
问题是我无法自动完成eclipse的工作。我在svn上工作的项目。我通过进入File-> Import-> Checkout作为项目 - >新建项目向导,在eclipse中设置projet。我选择了Enterprise Java Application并将其下载。并且一切似乎工作正常,我不会得到自动完成,但消息:这个编译单位不在一个java项目的构建路径。 Ive googled它,但每个人都说这个项目必须是Java项目。但嘿,是啊!有什么问题?
The problem is I cant get autocompletion to work on eclipse. Im working on the project on svn. I set up projet in eclipse by going into File->Import->Checkout As a Project->New Project Wizard. I choose Enterprise Java Application and its being downloaded. And everything seems to work fine exept I dont get autocompletion but message:"this compilation unit is not on the build path of a java project". Ive googled it but everyone says that project must be Java project. But hey it is! What is the problem?
谢谢
嘿,
svn上的目录结构如下所示:
The catalog structure on svn looks like this:
-Project_name
-application
-META-INF
application.xml
MANIFEST.MF
+build
+db
+deploy
+dist
+lib
+properties
+script
-src
-META-INF
someother.xml (datasource info)
persistence.xml
folder hierarchy with source files (should be package)
-web
some folders
.
.
files
.
.
-WEB-INF
faces-config.xml
jboss-web.xml
web.xml
build_win.xml
如何告诉eclipse哪里是源文件夹哪里是application.xml和其他配置的xml文件?如何设置它,所以我可以开始这个工作最后..谢谢
How to tell eclipse where is source files folder where is application.xml and other configuration xml files? How to set it up so I can start working on this finally.. Thanks
推荐答案
当你有一个多模块maven项目下父项目,请确保您没有在maven父项目中编辑文件。
When you have a multimodules maven project under a parent project, make sure you're not editing the file in the maven parent project.
这篇关于Eclipse“这个编译单元不在java项目的构建路径上”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!