How to synchronize project over FTP with Eclipse? - eclipse

I am currently using SVN to get last development and production versions for my PHP websites projects on my remote server.
I use tags to create new versions, this is working fine and doing what i want.
But now, I want to automatically synchronize changes from my local projects to a remote folder on this server through FTP/SFTP to create a live development version.
It appears that Eclipse does not come with a native solution to do that, in fact i didn't find any appropriate solution.
I need to keep SVN as the Team provider of my projects and synchronize the entire projects or even the workspace with the remote folder.
Do you know any way to do that ?
I tried RSE and Aptana but it does not seem to do what i want.
On one of my PC, i am using Seafile with another server, this is working fine but this is not the purpose of this application, it's not embedded in Eclipse and it's very long to synchronize minor changes.

If you have sftp access you can mount the remote directory locally (at least on linux). Then you can use cp and rsync.

Related

Eclipse Project - need to have a copy locally and a copy on a remote server

I develop in PHP using Zend Studio - operating as an Eclipse plugin - has a really nice feature called "Automatic Upload" that can be configured on a per Project basis. This feature allows one to define a remote connection to a server for a Project, and also specify whether file copy to the remote server is "manual" or "on save".
We use the "on save" option extensively, as it allows us to edit a file via Eclipse, save it, and immediately see the file in play on our remote web server.
Specifically the functionality we are after is as follows:
Create or edit a local file in Eclipse
On Save of the local copy, automatically creates / updates the remote copy
On Delete of the local copy, deletes the remote copy
(cut/copy & paste behave in a conceptually equivalent way)
and
Manual batch "upload to remote" and "download from remote" menu options that allows full upload / download of all files as well as manual cherry picking of files to upload or download.
This feature is really nice and has very broad application so I expected it to be standard Eclipse functionality, however I have installed Eclipse Oxygen, and can't find it. I have subsequently done rather a lot of searching, and although there are some manual options that have appeared, the closest I can find to an automated copy equivalent is the Parallel Development Tools plug-in which provides a "Synchronized Project" option.
Synchronized Projects require git running on both local and remote and a git folder structure inserted into the Project. Additionally, hidden files are injected into every Project sub-folder.
The above renders Synchronized Projects too "heavy" and potentially problematic to manage for us.
So I am fairly desperately looking for an Eclipse Oxygen (or Neon is fine) plug-in that provides the functionality outlined above.
Your input is greatly welcomed. Thanks in advance!
While not exactly remote sync, a little lateral thinking has given me exactly what we need. What I did is as follows:
Remote (linux)
Install Samba
Use Samba to present the desired folder as a Windows share
Local (PC)
Windows File explorer
mapped the remote windows share to a local mapped drive
Eclipse
downloaded and installed the File Sync plug-in from Eclipse market place
right-clicked on my Project and selected Properties => File synchronisation, and configured the desired folders (setting the "remote" as the mapped drive)
and one final item (because we are mapping from a Windows local to a Linux remote) : Window => Preferences => General => Workspace Set "New text file line delimiter" to "Other => Unix"
And hey presto, everything is working 100%.
You can do this by a project builder Ant buildfile. Alternative, there are others build system that are implements the Eclipse project builder (to be executed on save), but which must be installed separately. You can also implement your own incremental project builder in Java.

How to recursively "put" folders in RSE synchronise

I've just upgraded Eclipse to Kepler and thought I'd try the built-in RSE as an alternative to the JCraft SFTP plugin for remote sync over SSH. I've exported my project with Review/Synchronise ticked and in the Synchronise panel I can see the files I want to export.
If I right-click a file I get a "Put" option to send the file but if I right-click a folder the option is not there.
How to I "put" a folder? There's no way in hell I'm going to do each file individually.
You might want to try PTP Synchronized project instead of RSE. It is mostly used for C/C++/Fortran development, but it can be used for any project for which you want to edit remote files. The feedback we got from PTP users is that the Synchronized projects work usually better (e.g. faster) than the RSE ones. In the future it is planned that you can use synchronized projects without having to install all of PTP.

Upload files from Eclipse Juno?

I am building a new workspace in Ubuntu 12.10 with Eclipse Juno. I have configured my project, imported my files, established a local Git repo and synced it to a remote on GitHub. However, all my efforts to be able to upload files (php, html, css, and other website files) to servers have failed.
I have both Remote System Explorer (RSE) and Aptana Studio 3. Though I have successfully established connections both to localhost for testing and to my live webserver, none of my attempts to upload have succeeded.
Ideally, when I save any file in Eclipse, it would automatically be copied to my /var/www for my localhost test server. I have researched several sync options without success.
Additionally, I want to be able to use Ctrl+Shift+U or similar to upload the current file to my public server.
I have spent much of the last two days reading and researching, but have found minimal documentation, and blog entries are for obsolete versions.
I have no Deploy menu item, the Aptana Publish menu item is disabled, and if I use Eclipse's Export command from the right-click menu, and choose my localhost connection, I get error "Unable to use connection." This, despite being able to browse the contents in RSE's pane. When I try to export to the public server, the error is "This operation will remove previous team provider settings that were set for MyProjectName. Are you sure you want to do this?"
I am making the change to Eclipse for a more efficient workflow but so far it has cost me many days of frustration and I still can't upload a simple .html file?!
Ok, as I understand it, you want to copy a file at save and upload it via FTP, yes?
You should look into Ant. You can configure Eclipse to run an Ant script when you save or build a project.
How to copy files with Ant
Ants FTP task
How to get ant to run when building a project
this post might be helpful for you, if you use Eclipse RSE: How to synchronize files over FTP with Eclipse RSE?
Moreover they mention there some problems with jdk7 (for the older eclipse version). Check that too.
For the actions you to be performed automatically/on keypress, well for that I didn't find any quick solution.

Netbeans sFTP Sync - Bidirectional reconciliation

I'm using Netbeans to manage a PHP projects in a proprietary setup. Files are on a web server and I use netbeans sFTP to download and auto-upload the files as I change them. It works great and I've read of others doing this. This takes care of creating/uploading files as I change / create them. It also seems to remove files if I delete them locally.
Now, enter source control (in my case Git, but for this the type shouldn't matter). My source control has to be on the web server. This is apart of the proprietary setup.
Lets say I switch branches (which would be done on the web server, to be clear), can I and how do I reconcile all the changes from the server? This would include removing files and folders locally that no longer exist in the version I'm working with. It also includes updating file contents for changes.
Now, I am aware of the "Download" function in netbeans. In netbeans, I right click on a folder structure or the project (in the "Projects" pane) and Netbeans will proceed to download all changes but it does not seem to remove local files and folders that no longer exist on the server..
You may have a look at this solved issue/enhancement. It will be in NetBeans 7.2 and currently it is part of nightly dev builds

Move CVS repository without rechecking out in Eclipse?

We are migrating from a Server 2000 machine to a Server 2008. I have already found great instructions for packing up my repository and moving it to the new machine.
My development tool is Eclipse. My goal is to not remove all of my projects and check them all back out. That will be a huge pain.
What is the easiest way to point Eclipse over to the new server without removing my existing projects?
The hard method looks to be running some kind of a script that edits about 9 billion CVS\Root files and updates the ip address.
Change the repo settings within Eclipse from the CVS Repositories perspective. Right-click on your repository definitions, change the settings to the new server.
When you save the settings, Eclipse will ask you to confirm that you're changing the server, and then it will update all the required metatdata files.