Jump to content

Eclipse + Plastic + Maven = some very weird stuff


msanda

Recommended Posts

So yeah i am continuing my nightmare path of using eclipse and its very quickly becoming the worse ide on the planet for me. We have all of our developers now finally switched of from SVN to Plastic ( You should see the joy in their faces when they saw all the crazy stuff they could do with plastic, and due to some really strict guidelines and procedures we are branching and switching and fixing more problems than we did with svn. Thanks guys). But it looks like there was one thing we did not take into account when moving to plastic and that is eclipse.

With the way stuff used to work on sv, we would have programmers working on their own code for days then check it in when they were done and then do an update. this all worked fine and dandy, because eclipse will see a change in workspace once every 7 days or weeks and this will cause eclipse to do is slow build and create its classpaths and hidden project files. this was never a big problems because we honestly did not do any branch switching everything was committed to trunk. but now since we moved to plastic we have encountered some weird issues we never will have encountered in svn.

  1. Eclipse builds a dreadfully slow and eclipse loves to play by its game or it wont play at all.
  2. Due to the the branch per task methodology to solve problems faster and have less error prone main branches we find that switching is now costing the developers alot of time. this is simple because every switch means eclipse has to create the .classpath file and the .project files. now one solution is to checkin the .project and the .classpath, but this leads to problem because everyones eclipse workspace is in a different directory so classpaths on one machine will point to the wrong path on a different person machine.
  3. when a switch is done it seems Plasticscm deletes everything in its directories and sub directories and then recreates the files and directories from the repository. now i know svn does this and git i believe does this, but due to the way each of those tools works they dont require as many branch switching that plastic seems to be designed for. ( now in my case we have several tickets that each developer has to fix each of these fixes can take at most 7 days. so the developers switch to other branches more frequently when they dont want to dwell too much into one ticket)

So right now i will have called it a day, but it seems that on some occasions during the rebuild of these classpaths and project files eclipse gets stuck in an infinite loop and just keeps recreates these files thereby prevent any developer from opening any files to work on. The only solution that seems to fix this is to kill eclipse restart eclipse kill the Automatic build delete the projects from the workspace and then re-import the project and bind it back to plasticscm.

Have you guys experienced this problem, if not is there a way to prevent eclipse form rebuilding after switching ( this could be done through an option in plasticscm client or through eclispe settings).

thanks

Link to comment
Share on other sites

After lots of annoying hours and finally given up and viewing the file system events i finally figured out what is going on with eclipse + maven + plasticscm... The issue here related to the 3 hidden files/directories eclipse creates.

.metadata

.project

.classpath

.classpath being the most important of all of them. In the traditional version control system these 3 files are not to be included in the repository. the reason for this is that in these files there are sometimes hard links to individual jar's and other properties eclipse needs in order for it to build the project successfully. Using this mentality i did not check in those 3 files. So every time i switch my plastic branch ( workspace) plastic will recreate the workspace in the image of what it has in the repository. this means those 3 eclipse important files/directories are deleted. After the switch is done eclipse then sees a change in the workspace and tries to rebuild the project (provided you have 'Automatic build' checked). The rebuild process here and i believe and a background process of plastic occasionally will come in conflict. this means that sometimes eclipse will rebuild the project completely and the programmers can get back to work. and then on the rare occasion generally after switching branches numerous times. I get an error from plasticscm console " Errors occurred while refreshing resources with the local file system. " ( I attached a screen shot of the error). (hard link to the img https://skydrive.liv...9DF82CF0FB3!239)

So upon further investigation and viewing all files that were being edited/deleted/created i realized that during the build process in eclipse after plasticscm has been edited eclipse creates all three files and then something later deletes the .classpath file. Once this gets deleted eclipse assumes the file exists and tries to write to it. but since it does not exists eclipse just stalls and after a timeout period it assumes the build failed and then restarts the process again. Why eclipse cannot detect that a file does not exists just shows how crappy eclipse is but that is another story.. ( please please speed up the development of the plastic plug-in for intellij. We are waiting and going to switch over to intellij in the very near future)

So my fix was to create a .claspath file that uses variables created and added to the eclipse build path on each of the developer machines and then commit this classpath to the repo. now switching between branches is now fast and build times has decreased from minutes to mere seconds.

So that was my temporary fix for now. but it seems there might be a few bugs with the eclipse plastic plug-in. when i use the gui i do not get any of those errors. If you want more detailed info i will be glad to send it your way.

Link to comment
Share on other sites

After lots of annoying hours and finally given up and viewing the file system events i finally figured out what is going on with eclipse + maven + plasticscm... The issue here related to the 3 hidden files/directories eclipse creates.

.metadata

.project

.classpath

You rock.

" Errors occurred while refreshing resources with the local file system. " ( I attached a screen shot of the error). (hard link to the img https://skydrive.liv...9DF82CF0FB3!239)

I guess that are files that are locked by eclipse, maybe we can add more log to discover which files are.

please please speed up the development of the plastic plug-in for intellij. We are waiting and going to switch over to intellij in the very near future)

We are on it! But I can not give you an estimated date.

So my fix was to create a .claspath file that uses variables created and added to the eclipse build path on each of the developer machines and then commit this classpath to the repo. now switching between branches is now fast and build times has decreased from minutes to mere seconds.

Great to hear that!

So that was my temporary fix for now. but it seems there might be a few bugs with the eclipse plastic plug-in. when i use the gui i do not get any of those errors. If you want more detailed info i will be glad to send it your way.

Sure! Let us know about them!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...