Netbeans sFTP Sync - Bidirectional reconciliation - netbeans

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

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 synchronize project over FTP with 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.

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.

Sharing eclipse project over SVN

We want to share an eclipse Qt project via an SVN repository.
Of course we need to share the .pro file of Qt to be able to build the project.
The problem is, that without the project files you can not handle the project in eclipse but we cannot use the same as they contain local references.
Also it would be nice to use the Eclipse SVN plugin to manage this.
I already tried to check out the project and create a Qt project on Checkout but this overwrites the checked-out project file.
Any suggestion would be appreciated.
These are some lines from the .cproject file that are autogenerated, so I can not change the absolute paths:
<storageModule moduleId="org.eclipse.cdt.core.pathentry">
<pathentry base-path="/usr/include/qt4" include="" kind="inc" path="" system="true"/>
<pathentry base-path="/usr/include/qt4" include="QtWebKit" kind="inc" path="" system="true"/>
...
There are 2 rules for Subversion (independent of Eclipse, should be the same all the time):
If the tool will regenerate a file, and you don't have to change it:
==> don't check it in your version management (may it Subversion, Git, CVS, ...).
If the file contains parts that are manually changed by a user
==> it should be checked into version management.
If you have the second case (not clear from your question), you should try to change the paths to be relative, so that others could use your project at the same location.
If you cannot change that, stick to the location in the file system. Every developer has to use an identical setup.
If you have to support different operating systems, and the files generated by the tooling are not compliant (shame on the tool makers), you should hold templates for all operating systems in your version management, and should initially (manually) make a copy, depending on the operating system you are working in.
If you have to change that file for some purpose, you have to change the templates as well and should remember that all developers have to make a new copy after that.
Sorry, I don't know Qt and have never developed in a C-environment on different platforms, so my tips are pretty vague.
Finally I found following solution:
No .cproject .project file in SVN!
Import the code files from SVN (also the .pro file for Qt)
Eclipse will ask you to create a project, so create a Qt Project with the same name (or some else, but you will then have to delete the files)
When the project was created, revert it (right MB on the Project in Project Explorer -> Team -> Revert) to the state of the repo checkout
Done, now you can work with the project

Sharing Eclipse directory on Dropbox between Windows and Mac OS X

This question was close to mine, but not quite.
I have a Windows desktop and a MacBook Pro. I'd like to be able to keep my Eclipse workspace in my Dropbox folder. The problem is that many project settings change between platforms: references to JREs, JDKs, and other libs.
Every discussion I've seen of this problem seems to suggest taking advantage of the source control system's ignore functionality, so that such-and-such file remains local-only and thus able to remain platform-specific. But when you're working with a real single shared folder, that class of solution doesn't apply.
Have you had luck working with a Java Eclipse project living in a single folder shared over the network, cross-platform?
I have my Eclipse workspace inside Dropbox with all my project folders within, but use the new-ish "Selective Sync" feature of Dropbox to make sure that the .metadata folder is not synced.
This means my Mac and Windows machines have their own .metadata folders but the project folders remain in sync.
Seems to be working so far...
Use source control with individual workspaces. By doing it this way you lose the capability of two developers making changes to the same file. You also run a higher risk of people stepping on each other. With Subversion (or others) source control is free and gives you traceability.
Perhaps the way to have less problems is just to share the source folder, neither workspace settings nor bin folder.
Just put your source folder in Dropbox.
Create the project on site1 and then:
Right click over the project, choose properties
--> Java Build path --> Source tab
--> Link source button
Then create a link to your source folder in Dropbox and assign it a name (e.g. src2)
Make the same for site2.
All your source files must be in your share source folder in Dropbox.
Of course you must configure on each site the settings like libraries and other stuff but this task is less frequently and perhaps desirable because you have two different environments.
For anyone else having trouble getting this to work, try File->Import->General->File System. Be sure to select Create links in workspace from the Advanced options. Seems like the cleaner solution and you can keep using your usual workspace.