How do I add FTP support to Eclipse? - eclipse

I'm using Eclipse PHP Development Tools. What would be the easiest way to access a file or maybe create a remote project trough FTP and maybe SSH and SFTP?.

Eclipse natively supports FTP and SSH. Aptana is not necessary.
Native FTP and SSH support in Eclipse is in the "Remote System Explorer End-User Runtime" Plugin.
Install it through Eclipse itself. These instructions may vary slightly with your version of Eclipse:
Go to 'Help' -> 'Install New Software' (in older Eclipses, this is called something a bit different)
In the 'Work with:' drop-down, select your version's plugin release site. Example: for Kepler, this is Kepler - http://download.eclipse.org/releases/kepler
In the filter field, type 'remote'.
Check the box next to 'Remote System Explorer End-User Runtime'
Click 'Next', and accept the terms. It should now download and install.
After install, Eclipse may want to restart.
Using it, in Eclipse:
Window -> Open Perspective -> (perhaps select 'Other') -> Remote System Explorer
File -> New -> Other -> Remote System Explorer (folder) -> Connection (or type Connection into the filter field)
Choose FTP from the 'Select Remote System Type' panel.
Fill in your FTP host info in the next panel (username and password come later).
In the Remote Systems panel, right-click the hostname and click 'connect'.
Enter username + password and you're good!
Well, not exactly 'good'. The RSE system is fairly unusual, but you're connected.
And you're one smart cookie! You'll figure out the rest.
Edit: To change the default port, follow the instructions on this page: http://ikool.wordpress.com/2008/07/25/tips-to-access-ftpssh-on-different-ports-using-eclipse-rse/

Install Aptana plugin to your Eclipse installation.
It has built-in FTP support, and it works excellently.
You can:
Edit files directly from the FTP server
Perform file/folder management (copy, delete, move, rename, etc.)
Upload/download files to/from FTP server
Synchronize local files with FTP server. You can make several profiles (actually projects) for this so you won't have to reinput over and over again.
As a matter of fact the FTP support is so good I'm using Aptana (or Eclipse + Aptana) now for all my FTP needs. Plus I get syntax highlighting/whatever coding support there is. Granted, Eclipse is not the speediest app to launch, but it doesn't bug me so much.

have you checked RSE (Remote System Explorer) ? I think it's pretty close to what you want to achieve.
a blog post about it, with screenshots

I'm not sure if this works for you, but when I do small solo PHP projects with Eclipse, the first thing I set up is an Ant script for deploying the project to a remote testing environment. I code away locally, and whenever I want to test it, I just hit the shortcut which updates the remote site.
Eclipse has good Ant support out of the box, and the scripts aren't hard to make.

SFTP Plug-in:
http://www.jcraft.com/eclipse-sftp/
:)

As none of the other solutions mentioned satisfied me, I wrote a script that uses WinSCP to sync local directories in a project to a FTP(S)/SFTP/SCP Server when eclipse's autobuild feature is triggered. Obviously, this is a Windows-only solution.
Maybe someone finds this useful:
http://rays-blog.de/2012/05/05/94/use-winscp-to-upload-files-using-eclipses-autobuild-feature/

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.

How to use RSE plugin in Eclipse?

I installed the RSE plugin in Eclipse intending to either use SSH or FTP to work with files on a remote machine. I set up both an SSH and FTP connection, but neither works.
For example, here is what happens when I connect using FTP:
As you can see, the directories on the server show up, but I can't do anything with them. No sub-folders are showing up and none of the files can be opened.
I'm completely new to Eclipse, (though certainly not new to working with FTP) so I really don't know what to do to get this working.
Also, is there any way to use this with the PHP perspective at all?
First, make sure you are using the latest update site for RSE. In Eclipse, go to Preferences >> Install/Update >> Available Software Sites and check that the update site for RSE is listed correctly and it is enabled. You can learn the latest update site from the Target Management Home Page (look for an update site link next to the latest release announcement).
Once you do that, you must also have the RSE Core plugin enabled in addition to SSH or FTP services. In Eclipse, go to Help >> Install New Software. Expand the TM and RSE Uncategorized category and install the RSE Core plugin.
You should now see sub-folders, and have more options on the remote folder right-click menu. You can, for example create a remote project or import remote folders into your current project.
Your problem might be associated with the "Show files only" checkbox. In the Remote Systems perspective right-click on "Sftp Files" and try to create a new connection. In the "File Filter" dialog window make sure the "Show files only" checkbox is not checked.

Adding a SVN repository in Eclipse

I'm trying to add an SVN repository to Eclipse.
I've installed Subclipse, and it seems to be working fine. But, when I try to "add a new SVN repository", I input this, for example:
http://svn.python.org/projects/peps/trunk
I get this:
Error validating location: "org.tigris.subversion.javahl.ClientException: RA layer request failed
svn: OPTIONS of 'http://svn.python.org/projects/peps/trunk': could not connect to server (http://svn.python.org)
"
Keep location anyway?
I know that my Eclipse can connect to the Internet, because I downloaded Subclipse earlier (I had to change my proxy settings).
I get a similar message for other SVN locations I've tried to add.
What is the solution?
This is a dead topic, but the solution is to install a client adapter along with Subclipse.
Take a look at this, and install SVN Client Adapter, SVNKit Adapter, and SVNKit Library.
Then check under Window -> Preference -> Team -> SVN and make sure there is an entry for SVN Interface.
And for future reference, if you can connect to the repository through the command line, then it must be a problem with the IDE.
It worked for me, In eclipse: Window > Preference > Team > SVN: select SVNKit (Pure Java) instead JavaHL(JNI)
At my day job I sit behind a corporate firewall protecting and caching web traffic (among other things). For the most part it stays out of the way. But sometimes it rears its ugly head and stands firmly in the path of what I am trying to do.
Earlier this week I was trying to look at a cool new general validation system for ColdFusion called Validat, put out by the great guys at Alagad. They don't have a download on the RIAForge site yet, but the files are available via SVN. I loaded up the subclipse plugin into my Eclipse, restarted and began adding the Validat SVN repository. I started getting errors abou the "RA layer request failed" and "svn: PROPFIND request failed on /Validat/trunk", followed by an error about not being able to connect to the SVN server.
I already had Eclipse setup with my proxy settings, so I thought I was doing something wrong or Alagad didn't actually have the subversion repository up-and-available. After going home that night, I tried it from home and wa-la it worked. Stupid proxy server! So the subclipse plugin won't use the Eclipse proxy settings. (Can that be fixed please!). After digging around the subclipse help site and being redirected to the collab.net help, then unproductively searching through the eclipse workspace, plugins, and configuration folders for the settings file, I was finally able to figure out how to set up subclipse to use the proxy server.
In my Windows development environment, I opened the following file: C:\Documents and Settings\MyUserId\Application Data\Subversion\servers in my favorite text editor. Near the bottom of that file is a [global] section with http-proxy-host and http-proxy-port settings. I uncommented those two lines, modified them for my corporate proxy server, went back to the SVN Repository view in Eclipse, refreshed the Validat repository and Boom! it worked!
from http://www.mkville.com/blog/index.cfm/2007/11/8/Using-Subclipse-Behind-a-Proxy-Server
Try to connect to the repository using command line SVN to see if you get a similar error.
$ svn checkout http://svn.python.org/projects/peps/trunk
If you keep getting the error, it is probably an issue with your proxy server.
I have found that I can't check out internet based SVN projects at work because the firewall blocks most HTTP commands. It only allows GET, POST and others necessary for browsing.
When trying to connect to the Collabnet subversion from eclipse I was also getting the same error as 'Peter Hilton' described in his original post.
I changed the settings of Active Provided from 'Native' to 'manual' in windows->Preferences->General->Network Connections.
This worked for me. I think this was a proxy problem but with my old settints eclipse was connecting to the internet from where i DOWNLOADED THE subversion plugins.
I doubt that Subclipse and then SVN can use your Eclipse proxy settings. You'll probably need to set the proxy for your SVN program itself. Trying to check out the files using SVN from the command line should tell you if that works.
If SVN can't connect either then put the proxy settings in your servers file in your Subversion settings folder (in your home folder).
If it can't do it even with the proxy settings set, then your firewall is probably blocking the methods and protocols that Subversion needs to use to download the files.
It is probably of little help to you, but I enter that URL into Subclipse and the repository adds fine and I can browse and Show History on it.
Do you perhaps need to configure a proxy? You have to configure that in the Subversion runtime configuration area as Subclipse uses the Subversion libraries to connect to the server.
Do you have any working repositories in this instance of eclipse?
I've had problems in the past with the default Subclipse subversion client on Windows, you need to make sure the native subversion client is installed and correctly configured (I've got TortoiseSVN to work in the past) if you want to use the default client adapter.
On a recent install I tried the "beta" drivers (I have Eclipse Ganymede and "SVNKit (Pure Java) SVNKit v1.2.0.4502") that you can optionally install with Subclipse and they worked pretty much straight out of the box, although a colleague found he had to go through a few hoops to make sure Eclipse installed them (and their dependancies) correctly.
Here are the packages that appear in "Help" -> "Software Updates" -> "Installed Software":
Subclipse 1.4.0
Subversion Client Adapter 1.5.0.1
SVNKit Client Adapter 1.5.0.1
SVNKit Library 1.2.0.4502
These are probably a little out of date now, and the latest version will probably work better, but this is what I can see working right now.
I found this problem when I changed my SVN password.
How to resolve
First, remove Subversion folder in {Documents and Settings}{user login}\Application Data\Subversion -> It doesn't work
After, rename my current user login profile from {Documents and Settings}{user login} to {Documents and Settings}{user login}_bakup and login agian -> It work...
I assumed -> SVN or JavaHL bind authorized user with {user login} or keep it in user profile of window.
I has the same problem. McAFee had blocked the eclipse. solve it in the manager McAFee> Firewall> progamas internet connection to> find the eclipse and allow full access.
regards
I was facing this problem and, as mentioned previously here, I changed the "servers" file under Subversion folder in "C:\Users\userid\AppData\Roaming\Subversion". There, in the file's bottom, there is a [global] section. I removed the comments from
http-proxy-host
http-proxy-port
http-proxy-username
http-proxy-password
I set those guys and it worked! :-)
I saw the same error and solved by switching off the proxy settings in TortoiseSVN that I normally need for commits to the company servers. I installed Subclipse to back up my own non-prime-time stuff to a local repository (using VisualSVN). I use Eclipse Galileo 3.3 and Subclipse 1.6.12.
Necropost, but helpful: I came across this problem with an RA request failed since the files "already existed on the server" but wouldn't sync with my repository. I went to the source on my disk, deleted there, refreshed my Eclipse view, and updated the source. Error gone.
In my case was an access issue. I needed to change the protocol to svn+ssh instead of http.
For example, instead of
http://svn.python.org/projects/peps/trunk
try
svn+ssh://svn.python.org/projects/peps/trunk
You might want to check if the websecurity of vpn client is the issue. I uninstalled it and it worked fine..Found the solution here
https://superuser.com/questions/471089/svn-connection-not-successful
I have exactly the same issue with you. I have TortoiseSVN installed on my windows, I have also eclipse installed, in the eclipse, I have the subclipse 1.4 installed.
here is the issue
I have proxy settings, I can open the repo through web browser, for some reason, I cannot open a repo through svn. I tried to change the proxy following the link below Eclipse Kepler not connecting to internet via proxy. It doesn't work.
Finally I found out a solution
You have to change the proxy setting in TortoiseSVN. After I enable the proxy setting the same with my browser. The issue is gone.
here is the link of how to enable proxy setting in TortoiseSVN
https://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-settings.html
Seach "Network Settings" on the page above
In my case, im getting the similar exception when trying to checkout the project from SVN repo it is prompting for the username and password and i was giving the wrong username every time, when i gave the correct username and password its started working fine.....
Such a simple and Hardstopping message.....