English 中文(简体)
Why do I have to routinely Clean one particular project in Eclipse?
原标题:

I am using Eclipse 3.5 for several different Java/JSP projects. All of our project code is stored in Subversion. I use the Subclipse plugin to update / commit code. This works great for all projects except one. There is one project where almost every time I do a SVN update, the entire project becomes riddled with Java compile errors. Most of the errors are complaints that it can t find other class files within the same project. To resolve this, I have to go to Project > Clean and manually clean out the project, which takes a little while to run. Everything compiles just fine after this, but it is a bit of a pain to have to manually clean the project every time I do a SVN update. And this only happens for this one single project.

Anyone experience something like this? I am not even sure where to look to figure out why the project needs to constantly be manually cleaned. Is it possible that someone else is checking in a file that breaks my project build in Eclipse? If so, what file(s) should I look for?

最佳回答

First, excuse me if I say something obvious, but you didn t give any details of your project configuration, nor described your previous attempts at solving this issue. So, maybe you ve already tried everything I m going to suggest... ;-)

Off the top of my mind, I d check whether someone else is committing compiled classes, instead of sources only.

Other than that, it depends on your configuration: I m assuming that you ve got the "Build automatically" flag checked, that you re building through Eclipse only (and not, for example, through Ant, letting maybe the Ant build put its output somewhere in your classpath), and that you re not versioning jars nor your .classpath file.

I suggest (if you re not doing so) to perform your SVN updates going through the Synchronize view (Team -> Synchronize with Repository), in order to see at a glance what kind of incoming changes you ve got, to better distinguish cases when your project gets messed up from cases when it doesn t.

问题回答

Some one already explained that, may be someone else also committing the compiled classes , and the class paths are getting conflicts. Fist know this info from your collegues and proceed. I didn t come across this situation. sorry.

How are you storing the project on SVN? Are you storing the entire Eclipse project or just source code, structure, etc? If you re not storing the entire project I d suggest doing that as it makes it easier to work with (unless you ve got somebody using a different IDE). Without some more information it makes it hard to diagnose, but it certainly sounds like somebody is committing compiled class paths. You should check the SVN history to confirm.





相关问题
In Eclipse, why doesn t "Show In" appear for non-Java files?

If I have a *java file open, I can right click on the source, scroll down to "Show In (Alt-Shift-W)", and select Navigator. If I have an *xml, *jsp, or pretty much anything besides a Java source ...

Eclipse: Hover broken in debug perspective

Since upgrading Eclipse (Galileo build 20090920-1017), hover in debug no longer displays a variable s value. Instead, hover behaves as if I were in normal Java perspective: alt text http://...

Eclipse smart quotes - like in Textmate

Happy Friday — Does anyone know if eclipse has the notion of smart quotes like Textmate. The way it works is to select some words and quote them by simply hitting the " key? I m a newbie here so be ...

Indentation guide for the eclipse editor

Is there a setting or plugin for eclipse that can show indentation guides in the editor? Something like the Codekana plugin for visual studio (not so fancy is also OK). Important that it works with ...

Adding jar from Eclipse plugin runtime tab

I want to add .jar files for plugin from the Runtime tab of manifest file. When I use the Add... button, I can see only sub-directories of the plugin project. So if I want to add same .jar file to ...

How to copy multiple projects into single folder in eclipse

I have two projects, Project1 and Project2. Now i want to copy this projects into eclipse workspace but i want these projects to be in a single folder like below. Eclipse Workspace -> Project -> ...

Java: Finding out what is using all the memory

I have a java application that runs out of memory, but I have no idea which code is allocating the memory. Is there an application with which I can check this? I use Eclipse.

热门标签