Gary & Mark - thanks for your input. While checking out some of the things you suggested, it hit me where the problem was. That Groovy and/or Grails were involved had nothing to do with it the issue.
Turns out that for both vfs and vfs2, commons-net needs to be present on the classpath for FTP access to work. For people, unlike myself, who bother to read documentation before they fiddle arround with stuff, this might have been blatantly obvious. :) Without common-net, VFS appears to fail silently (and weirdly) by saying that an FTP folder is a file. By "silently" I mean that I see errors in the log with the default configuration. If I for example fail to include commons-httpclient, I would actually get a stacktrace. So in my different projects, tests and setups this was the difference that mattered, nothing else. It's exactly the same for vfs2. Just replace the dependencies & imports. On Wed, Jan 23, 2013 at 8:11 PM, Mark Fortner <[email protected]> wrote: > Do you have a runnable test for this? I don't have access to an FTP server > at the moment so I can't really test this, but I ran this code snippet > against the local file system and it seemed to work properly: > This works fine for me as well, in all of the different setups. Local file access was never the issue. Here's a gist of the vfs-version, you'll need an FTP to actually try it, but the behavior I've described can be observed by commenting out the @Grab-annotation that pulls in commons-net. https://gist.github.com/101c817b1be838fd707e On Wed, Jan 23, 2013 at 8:23 PM, Gary Gregory <[email protected]> wrote: > > You can get the package information for any Class object and query and > print that: aClass.getPackage(), the Package has a bunch of APIs. > Now, this is a handy trick that goes straight down in my tool belt :) In any case - problem solved - thanks for your input, guys! /Sven
