Ant, Eclipse, and FTP

I'm having an absolute bear of a time getting Eclipse to play nicely with Subversion, Eclipse, and an Ant build file. One of the wonderful things about working with Dreamweaver is the great FTP integration. I can upload, download, all that wonderful stuff, with a single keyboard shortcut directly in the IDE. I'm not having any such luck with Eclipse.

I think the problem is that I'm not only needing FTP access, I also need Subversion/Subclipse integration. It's my understanding that I can "import" from an FTP site and I forever have a connection through the Team plugins. Unfortunately, I need to "import" from a Subversion repository in order to keep things up to date that way. This makes it damn impossible to use any sort of built in FTP integration inside Eclipse.

To try and get around this I've been playing with Ant (thanks Jared) and build.xml files. The hope is that I can create an Autobuild file that will upload a file any time it's created or changed (I'm not ambitious enough yet to tackle file deletions, bear with me here). Unfortunately, the only thing I've (that means Jared) been able to find is the "depends" attribute of the <target> tag. Unfortunately, this also doesn't seem to work worth a damn... It always uploads the entire project any time a single file changes. The depends attribute isn't checking to see whether anything is newer or not.

The most frustrating part of all of this is trying to find good documentation on complex processes. I've spent several hours on google digging through blog posts, forums, Ant documentation and trying to download jar files, write build scripts, and rebuild workspaces, and nothing seems to work as you'd expect. It seems you need to have a greybeard Java developer looking over your shoulder in order to use Ant, or make it do anything you really want it to.

Can someone prove me wrong, and help me figure out how I can make Eclipse just upload a file when I save it? Is that so much to ask? Please???

Posted by Daniel Short on Oct 29, 2006 at 12:00 AM | Categories: ColdFusion - Dreamweaver - Rambling -

5 Comments

Keith Peters

Keith Peters wrote on 10/29/06 8:44 PM

Sounds like you are off base with depends. That means that one target depends on another target. So targetA is called. It depends on targetB. So targetB is run first. When B is dnoe, then A can run.
Daniel Short

Daniel Short wrote on 10/29/06 8:44 PM

Gotcha, in that case I got it all wrong :)
Brooks Andrus

Brooks Andrus wrote on 10/29/06 9:31 PM

I believe you're trying to use the selector which is a selector of the core type "fileset". Here's what' the docs say about : http://ant.apache.org/manual/CoreTypes/selectors.html#dependselect As far as ftp goes, I'd go ahead and use the scp task (Ant docs tell you where to download the dependencies). I've had no problems only uploading "changed" files using and scp. ...Hope this helps :)
Emmanuel Okyere

Emmanuel Okyere wrote on 10/30/06 3:09 AM

unless i don't really get you, i'll assume what you are looking for are: svn update (up), svn add, svn commit (ci) you normally don't want to automate your commits, as you shd normally add meaningful messages per commit and a depends attribute simply means the listed targets should be executed before the target in context, so i'm not sure how that applies here. cheers, -- eokyere :)
Daniel Short

Daniel Short wrote on 10/30/06 3:09 AM

No, I don't want to automatically commit changes. I want to automatically upload them to a remote server while I'm developing, and then I'll manually Commit files when I'm done on the development server. Dan