Synchronize eclipse projects with my computers - eclipse

Hi and thank you for reading this!
I have two computers in my office LAN: One very powerful PC which i use most of the time for development and a notebook.
Now i would like to share all eclipse projects between these two devices (for example manually sync and then switch to the notebook). I don't need them to be availalbe in a cloud or something. I have also a NAS (network attached storage) which is always running.
Is it possible to synchronize all my projects? The main problem: complexity...
I use multible eclipse installations with multible addons like Aptana
Studio, SpringSource Tool Suite, Maven, Git, ...
Most Projects are Java EE, built with maven (different maven goals like jetty or tomcat)
Some projects use git for teamwork (with some external partners)
Some Projects use my own project-builders (external programs)
I use multible workspaces (i use different workspaces for different customers which include different projects)
Some projects are inside an eclipse workspace and some are outside
My current solution is to use a file syncronization program which syncs my whole "Projects" Folder (the root for my whole working-life) to a folder inside my NAS (manual sync - not on file change or schedule). The problem with this approach: I have to synch over 100000 files. This takes 20 minutes only to analyze what has changed. And when i open eclipse one time and manipulate one static html file, eclipse changes over 2000 files (most of them are in the .metadata folder)...
I'm open to every solution. Do i have to change the structure of my project setups? Do i have to use another sync solution? Or is it just not possible? Do i have to use an cloud store solution? Would this affect projects which already use git?
Thank you for ANY reply!!!!!
best regards!
Manuel

Indeed it is possible. How about using git for this scenario? You could create a bare repository on the NAS for those projects that shouldn't be published.
I guess if you deal with source code and really a lot of files this might be the best strategy to do this efficiently and secure (in terms of get-out-what-you-put-in).

I've decided to use the FreeFileSync tool from http://sourceforge.net/projects/freefilesync/
There is some effort to configure it to ignore some files and folders, but the tool provides nice filter possibilities. Configuring these filters can be very time consuming but they're working fine :)
Thank's for all your help!

Related

Sharing an Eclipse workspace between two computers

What is a "safe" way to share an Eclipse workspace between two computers? I've had problems using Dropbox and I've had problems using Github. I am looking for a best practice that will "just work".
Update
I read below and many other places that sharing a workspace doesn't work. But my collection includes 50 projects, are you saying that I need to create 50 github repos? There's no way to put them all in one repo to save the repetition?
Solution (imperfect, but still improving)
My collection of projects is in a github repo called projects/ which includes 50 subdirectories, each structured appropriately as they would be for an eclipse project.The /projects directory doesn't have meta-data or any other eclipse info (AFAIK)
Separately, in ~ I create a brand new Eclipse workspace. And then I "manually" import each one with Eclipse. I do this on each machine that needs to access those projects via Eclipse.
No, the workspace will contain machine-specific information and locations. Share the projects themselves, preferably through a source code management system like git. If anything in the project refers to something outside the workspace, you'll want it changed to refer to that resource in a portable way (e.g. pick the JRE using an Execution Environment instead by name).
Look at the thread at https://stackoverflow.com/a/37799711/10235188. They describe how to share a workspace and configurations between machines. Otherwise you'll always have problems with absolute paths.

What's the Purpose of Workspaces in Eclipse

Eclipse has projects, what's the purpose of the Workspace that appears to group projects? Projects could live in the directory tree isn't that a more natural way of organizing different projects?
When you first start up Eclipse not knowing much about it, it feels like an unnecessary layer of bloat that new users have to get accustomed to first. You're forced to set up some organizing structure that, although specific to Eclipse, wants to live in the rather general-sounding place ~/Workspace.
The workspace is a collection of projects and the metadata that cannot be included in a project because it's not portable (references paths and resources on a specific system) or because it pertains to Eclipse as a whole.
Without the workspace concept, opening a project in Eclipse would be followed by multiple steps of getting things configured. This information would be lost when Eclipse is closed or all projects you ever work on would have to share the same configuration.
Examples of metadata stored in workspace:
Locations of available JDK's and JRE's. The project references a JRE by name, the workspace metadata is needed to resolve that reference.
Locations of application servers.
Path variables.
Open perspectives, layout of views, etc. Consider one application where you need Git and app server vs another application where you need SVN and Android development tools. The views you'd want to keep open and how you'd arrange these views would be very different for two applications.

A way to work on the same project on Eclipse over a several machines?

I'm a computer science student, and I'm taking Java2EE Development course.
a bit information about my purpose:
I've got a final project to submission.
In general, I need to develop a JavaEE servlet to manage a book library (server side),
so I also need to use a Database (I've chosen MySQL), and I have to work with Hibernate framework.
It's a bit large project considering the submission date (end of semester, about 4 weeks to work) and considering the fact I have 4 another heavy courses.
Personally, I'm using Linux Fedora 19 on my laptop, and Microsoft Windows 7 on my desktop, which makes the business more complicated (Different path strings, for example).
I thought about creating a workspace on my Dropbox folder and link Eclipse on both machines to this path,
but then eclipse writes the configuration file into the Dropbox workspace,
Which forces both desktop and laptop eclipse use the same configuration, which make problems.
For example, the MySQL JDBC driver jar file in my desktop located in "C:\Users\Billie\Downloads" folder,
While the MySQL JDBC driver jar file in my laptop location in "/home/Billie/Downloads".
Eclipse writes the the configuration file of the last used machine and it's makes problem in the other machine.
Any solutions? How can I use the same JAVA2EE Eclipse project over servral machines?
Thanks in advance!
Keep sources in VCS (like Git) and use some common build tool for managing project dependencies (Maven, Gradle, etc). Don't keep configuration in VCS - just import Maven/Gradle project into IDE. Maintaining configuration in VCS is the PITA :) .

Using eclipse for project in multiple different environments

If I want to use eclipse for projects in different environments,
what is the recommended way to work?
Install multiple instances of eclipse each configured differently?
No ... the typical why is you have for each of your projects a separate workspace.
All configurations are collected in this workspace. The only exceptions is if you need different plugin for the different environments, but usually this is not the case.
There is a nice tool from a google developer
http://code.google.com/a/eclipselabs.org/p/workspacemechanic
which help you to sync some general settings between different workspace.
Basically yes - things that make it easier for me are the Eclipse Workspace Mechanic (I have a folder with config files on my Dropbox, and reference that from the Workspace Mechanic preferences in the different Eclipse instances, so I automatically have them configured) and Mylyn (with which the data is usually stored centrally anyway and the settings can be exported and imported in a different Eclipse instance - I keep such an export on my Dropbox again).

Can a single Subversion repository managed as multiple projects in Eclipse?

I have a Helpdesk application that contains modules that can be downloaded and installed separately as required / preferred by the users. The structure is very similar to many software such as Drupal, which modules can be loaded/unloaded easily.
I'm using a single SVN repository for this Helpdesk application and create different tags for each module. And on my Eclipse I have everything as a single project.
My question is, can a single Subversion repository managed as multiple projects in Eclipse?
Can I create one Eclipse project for the whole application and at the same time for each module?
Another requirement is that by splitting each module as a different project would make Eclipse builds faster.
The reason is, I want to delegate programming work of each module to another person without the need to expose everything. The person would only see & work on the module only but commit to the main repository.
I know that Eclipse will have configuration files for every project, would there be any conflict.
I've had good look storing multiple Eclipse projects in one repository. Each of the projects is stored in a separate folder under the repository's root. Then, I use Subclipse to check out each of those folders as a separate Eclipse project.
I do not think that you should nest Eclipse projects (so that a master project contains many sub-projects).
Instead of the master project, you could group the individual projects into what Eclipse calls a Team Project Set (found in the Export/Import menus). This is an XML file that defines where all the projects are. You can put that file into Subversion as well.
So, you would have all the module's projects, and that XML file (which is not a project itself), all in Subversion (could be the same repository, could be spread over several).
I don't believe this is strictly possible. Personally, I would split the modules up into different projects entirely, and I would probably use Eclipse's plugin structure to resolve dependencies between them and the main project. If you ship the plugins as jars, they're still modular. Then, you can control each plugin as a separate project in Eclipse, and a separate folder in SVN.
That is no problem at all! Just create your trunk/tags/branches structure on your svn repo. Create your differen projects and then check thos projects into your trunc folder on your svn system. Finished!