Eclipse question

What is the best practice for editing a webapp working copy that resides (and runs) on another box (actually a virtual machine) ?

I've always ssh'd to my VM and used vim and svn from the CLI. So I haven't had this problem.. the editor has always been running on the same box as the code. I love vim and have no problems with developing that way. However, I've been drawn to Eclipse by a few features, notably: Mylyn, and would like to try it out.

So far I've seen the Target Management plugin for Eclipse which allows me to edit files over SFTP/FTP as if they're local. I have a feeling that might cause issues with Subclipse though?

The obvious option (to me) is just mounting up a NFS/samba/whatever share of my code on the box that's running Eclipse. Then svn should work fine too.

So my question is, what's the best way to go about this in the Eclipse world? Obviously I'm new to Eclipse and would appreciate some advice from anyone with some experience!

Thanks

Eclipse newbie
Monday, November 24, 2008

Deleting …Approving …

Edit/test locally. Jar it up and deploy it on the other server.

Ideally you make an ant target that does the whole build/jar/deploy effort in one line.

You shouldn't be in the habit of editing your main site directly.

If you *must* do it, remote mount that drive/directory and treat it as local.

Lance Hampton
Monday, November 24, 2008

Deleting …Approving …

If you are working with svn, you can use post-commit hooks for auto deploy your testing site.

Seriously, Eclipse allows you to define a "Server" which is the default target for deployment, and which out-of-the-box support Tomcat, JBoss, etc.

BillAtHRST
Monday, November 24, 2008

Deleting …Approving …

"You shouldn't be in the habit of editing your main site directly."

I'm not. It's an isolated development VM.

I should have also mentioned it's a PHP project not Java.

The reason I want to develop and test on the VM is because I can keep the environment extremely close to what we have in production (same OS, same packages). My host OS is completely different and therefore will add some administrative overhead.

So taking that into consideration.. do you think the Target Management plugin is at all suited to this? For now I'm just mount it up and see how it goes.

Anyone with Eclipse PDT experience have any ideas?

Eclipse newbie
Monday, November 24, 2008

Deleting …Approving …

I do the exact same thing. Haven't tried the Target Management stuff though. I just use a Samba share on the virtual machine, and mount it in Windows. Then I put my Eclipse projects on that drive. You don't need to put the workspace directory on the drive, just the projects.

The only issue I've had is with daylight savings time changes. There's some issue with Samba where it screws up the last-modified timestamps, and Eclipse's CVS tools get confused. The solution so far has been to just to a "Replace With Latest From HEAD" after the spring/fall changes.

JW
Monday, November 24, 2008

Deleting …Approving …

Cool thanks JW good to hear. I can live with the summer time issue.

Eclipse newbie
Tuesday, November 25, 2008

Deleting …Approving …

What JW said.

I have a linux dev server running as a VM on my Vista machine. The web directory on my dev server is exposed as a Samba share, and my Windows Eclipse install reads it all just fine. Subclipse works fine with that too, although I also have TortoiseSVN for control of non-code items such as documentation.

As well as providing a dev environment which closely mirrors my production server, the VM is small enough to back up the whole server to a DVD - very handy!