views:

158

answers:

5

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?

A: 

I suggest posting this on the Eclipse JDT newsgroup; the JDT committers read that and they can advise you about what to look at to resolve this.

Francis Upton
+1  A: 

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.

TataBlack
It turned out that an Ant script was using the same build path as Eclipse. I would normally run that Ant script at the end of the day, so I didn't notice that it was screwing up the Eclipse build path until I got in the next morning and tried to update.
Shane
Glad you found it.. and I'm absolutely sympathetic: in fact, in the last few years I've always been changing the default build path for Java projects in Eclipse from "bin" to "eclipse-build", just to reduce the chance of external scripts with hard-coded paths messing with my build.It's just a quick trip to Window->Preferences->Java->Build Path, and now I can sleep (slightly) better..
TataBlack
A: 

Have you checked whether the project in question has cyclic dependencies?

wwerner
A: 

Hi,

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.

A: 

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.

Chris Harris