Easy copying sourcecode to remote using Eclipse Program Builder
For those of us NOT using Eclipse for Java but for these evil languages called „script languages“ like PHP, Python, Perl, JavaScript etc. Eclipse nowadays still lacks some features, but also has some good advantages against using things like vi.
If you’re like me using Eclipse because you’re dealing with a lot of different languages and want to have features like code completion, SCM-integration and stuff (and are too lazy to do this via vi), there’s one huge missing part in Eclipse: An easy method of transferring files to a remote location.
I’m currently in a progress of moving from the slowly disintegrating Aptana back to Eclipse. Aptana had a real nice feature of remote connections and copying and even syncing between the local copy and the remote one. The barenaked Eclipse lacks this feature.
For clearance: I know, that this can be achieved by a team provider copying the files. But I already have a SCM-team provider in use for my projects, so that’s no solution. You may ask now, why I’m not using the SCM to do this. The answer is simple: Because I’m using a development server. I will not checkin every change I do while fiddling with certain development issues. I tend to check in clean code.
I tried the nice, but outdated [[http://esftp.sourceforge.net]], but this lacks the feature of sftp key authentication which I needed.
Next thing I tried was the remote systems/target manager-functions of eclipse, but I honestly don’t get them. I can make a nice remote explorer with them, but it’s hard to simply transfer some files from a project (especially when you like to use hotkeys).
Finally I found the builder-concept of Eclipse and the „Program builder“ (which should be bundled with your Eclipse installation). With this one you can simply call an external program and do something.
It’s very easy to just set up a program builder to use bash and scp to copy files from the working directory set to „${project_loc}“ to the remote server- especially when you’re developing under a *nix-like OS.
I used „/bin/bash“ as the location, „${project_loc}“ as the working directory and this as arguments:
-c "scp -r * user@remote:/remotepath"
Just press „Ctrl-B“ (or Cmd-B on Mac) after saving and tadaaa – works like a charm.
Calendar
M | D | M | D | F | S | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 |
Archive
- Januar 2024
- Dezember 2023
- April 2021
- März 2021
- September 2020
- Dezember 2019
- November 2019
- Oktober 2019
- Juli 2019
- Juni 2019
- Mai 2019
- April 2019
- März 2019
- September 2018
- August 2018
- Juli 2018
- März 2018
- Januar 2018
- Dezember 2017
- September 2017
- März 2017
- Februar 2017
- Januar 2017
- August 2016
- Mai 2016
- Dezember 2015
- November 2015
- August 2015
- März 2015
- Dezember 2014
- September 2014
- August 2014
- Juli 2014
- Februar 2014
- Oktober 2013
- September 2013
- August 2013
- Juli 2013
- Juni 2013
- Mai 2013
- April 2013
- November 2012
- Oktober 2012
- September 2012
- August 2012
- Juni 2012
- Mai 2012
- März 2012
- Februar 2012
- Januar 2012
- November 2011
- Juli 2011
- Juni 2011
- März 2011
- Februar 2011
- Januar 2011
- Dezember 2010
- November 2010
- April 2010
- Februar 2010