views:

768

answers:

7

I have nearly identical Linux (Fedora) machines at home and at work and I keep my files on both machines synchronized using the excellent Unison program. I have been trying to keep an eclipse workspace synchronized across the two machines but this has failed. I tried both:

  1. Synchronize just the /workspace directory, badness due to plugin upgrades
  2. Synchronize both /workspace and my .eclipse/ director.

What happens is that I work in one machine, create new projects on eclipse, etc. Then unison. Then when I go to the other machine the projects will sometimes not appear, sometimes they will appear but eclipse cannot find the files, and sometimes (rarely) it works.

I don't understand why eclipse gets so confused since I have identical workspaces, eclipse versions, and even .eclipse directories.

+3  A: 

Have considered going through a source control repository? If privacy is a concern, there are private SVN spaces available (e.g. assembla).

I understand this technique will (at least) make it possible to synchronize the projects but probably not all the settings related to a workspace. It might be an option, no?

jldupont
Yes, I might have to do that. But, it would be a pain as I write a lot of small programs (for classes I teach) many of which I end up deleting.
Jose M Vidal
Using Subclipse (Eclipse Subversion plugin) isn't a pain IMO: you don't have to use all functionality from what I can see. Shuttling USBs are more overhead IMO.
jldupont
The Subversive SVN Eclipse plug-in is also very good... just to add another option. :-)
cjstehno
Yup, I use subclipse on my few big projects. Very nice. This might be the answer, if no eclipse guru can provide a better one.
Jose M Vidal
+1  A: 

I used to store my workspace(s) and sometimes the eclipse installation itself on a USB stick drive and use that for project portability from windows machine to windows machine. You can then just run Eclipse from the stick and mount the workspace on the same stick.

I have also heard that drop box (http://getdropbox.com - they have a 2gb free plan) is useful for this, though I have not tried it.

It's odd that it does not work with your sync software.

cjstehno
This is a good suggestion. Due to the fact that Eclipse does not need to be "installed" in the traditional sense, a thumb drive works well. Just make sure to install the plug-ins on the same drive.
JasCav
Yup, dropbox does the same as Unison (well, except they also keep a copy in their servers).I agree that its odd that eclipse fails with identical versions, .eclipse and workspace directories. I think I must be missing some other dot-file that eclipse uses, or maybe the projects store some information about the machine they are running on???
Jose M Vidal
and, to address the suggestion, it just seems silly to carry a third eclipse binary when I already have it installed on both machines. Plus, I don't want yet-another thing to have to carry around with me. Good suggestion, though, thanks!
Jose M Vidal
Just to clarify... you would actually be using only the eclipse installation and workspace on the usb drive, not your local versions on the actual machines.
cjstehno
A: 

Have you considered setting up a network drive and installing Eclipse on that drive (along with your workspace)? That way, when you open Eclipse on either machine, it will be pointing at the network path for your workspace. I've successfully used this solution in the past.

JasCav
This works good locally, but if he's trying to use it across the Net the indexing that Eclipse does usually brings your experience to a crawl.
RC
Yeah, the second machine is at home, with an iffy connection.
Jose M Vidal
+1  A: 

Take a look at Pulse. It's an Eclipse distribution that can handle synchronization of workspace preferences across users and machines. It might be what you need.

zvikico
Thanks, I did not know about that. I think their "team sync" would do what I need. Still, I'd rather not have to install yet another software package. Maybe an eclipse guru will read this question and tell me how to do this, or tell me its impossible.
Jose M Vidal
I'm guessing that it wouldn't be developed externally if Eclipse had everything OOB. Right? Anyway, it is a very simple piece of software and it also does a better job maintaining your updates and plugins installed.
zvikico
A: 

I used the Mercurial DVSC on a USB stick as the transfer between home and work. I had three Mercurial repositories: one on the USB stick, one at home and one at the office sharing the same space as my Subversion checkout. If you're up-to-speed with DVSC concepts, I'd push/pull changes from office->USB->home.

It worked fine, but the first check-in was a pain as USB flash writes have crappy speeds. Pushing/pulling deltas was fairly quick afterwords.

I believe the Mozilla guys use a similar hybrid approach of SVN for the 'official' repository, but the developers use Mercurial for their development environment.

hbunny
A: 

I've ad issues with unison and eclipse and have them mostly worked out though it still needs to refresh the entire workspace when I switch systems.

There are two issues I've discovered that need to be configured before it is at all happy:

1) sync your workspace, your eclipse install and ~/.eclipse

2) Specify "ignorenot" rules in your unison "prf" files to not ignore any files in these directories. This is necessary because, by default, unison excludes files it thinks are built unsing rules similar to CVS which causes issues.

for example: path = eclipse path = workspace path = .eclipse ignorenot Regex eclipse/.* ignorenot Regex workspace/.* ignorenot Regex .eclipse/.*

schallee
A: 

I have been using dropbox to synchronize my workspace. I have been able to work on 3 different computers so far without any issues.

J.13.L