[groovy-user] Groovy VFS 0.4 released

43 views
Skip to first unread message

Schalk Cronj é

unread,
Mar 6, 2014, 5:37:22 PM3/6/14
to us...@groovy.codehaus.org
I am happy to announce that Groovy VFS 0.4 is out. Details are at https://github.com/ysb33r/groovy-vfs.

This is a basic Groovy DSL built on top of Apache VFS, but allows for very readable code to access remote and local files systems via a variety of protocols. A sample of code that can be run from groovyConsole is shown below.

Enjoy!

@Grapes([
    @GrabResolver( name='grysb33r', root='http://dl.bintray.com/ysb33r/grysb33r' ),
    @Grab( 'org.ysb33r.groovy:groovy-vfs:0.4' ),
    @Grab( 'commons-net:commons-net:3.+' ), // If you want to use ftp
    @Grab( 'commons-httpclient:commons-httpclient:3.1'), // If you want http/https
    @Grab( 'com.jcraft:jsch:0.1.48' ) // If you want sftp
])
import org.ysb33r.groovy.dsl.vfs.VFS

def vfs = new VFS()

vfs {
  
    ls ('ftp://ftp.belnet.be/mirror/') {
        println it.name
    }
   
}
-- 
Schalk W. Cronjé
@ysb33r

Robert Stagner

unread,
Mar 7, 2014, 3:47:33 PM3/7/14
to user
+1 :-)
--
Regards,
Robert

The human race has one really effective weapon, and that is laughter.
                -- Mark Twain

Robert Stagner

unread,
Mar 7, 2014, 3:55:55 PM3/7/14
to user
Does groovy-vfs support CIFS?

Schalk Cronj é

unread,
Mar 7, 2014, 4:05:29 PM3/7/14
to us...@groovy.codehaus.org
Not out of the box, because Apache VFS does not. However it is possible as the appropriate wrapper code is available the VFS2 sandbox. I have been looking at making it available directly to Groovy VFS, but have not had time yet.

Robert Stagner

unread,
Mar 7, 2014, 4:12:58 PM3/7/14
to user
Ok. Thanks for the library!!

I am attempting to run the example you've provided, but for some reason I'm encountering an error 'grabbing the Grapes'  -- not a big deal, but I thought I'd pass the information along

Preparing to download artifact xml-apis#xml-apis;1.3.03!xml-apis.jar
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during conversion: Error grabbing Grapes -- [download failed: org.codehaus.groovy#groovy-all;2.2.1!groovy-all.jar, download failed: asm#asm;3.2!asm.jar, download failed: xerces#xercesImpl;2.8.1!xercesImpl.jar, download failed: xml-apis#xml-apis;1.3.03!xml-apis.jar]

java.lang.RuntimeException: Error grabbing Grapes -- [download failed: org.codehaus.groovy#groovy-all;2.2.1!groovy-all.jar, download failed: asm#asm;3.2!asm.jar, download failed: xerces#xercesImpl;2.8.1!xercesImpl.jar, download failed: xml-apis#xml-apis;1.3.03!xml-apis.jar]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
        at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:71)
        at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:81)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)

Schalk Cronj é

unread,
Mar 7, 2014, 4:44:09 PM3/7/14
to us...@groovy.codehaus.org
I cannot comment on that. In order to avoid the 'it works on my
machine', I just ran the same example on a cleanly installed VM using
groovyConsole 2.2.2 and it works.

Have you tried to download the dependencies with command-line grape to
see if there are any issues?
<snip/>

--
Schalk W. Cronjé
@ysb33r


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


daniel_sun

unread,
Mar 14, 2014, 7:52:19 AM3/14/14
to us...@groovy.codehaus.org
+1



--
View this message in context: http://groovy.329449.n5.nabble.com/Groovy-VFS-0-4-released-tp5718694p5718819.html
Sent from the groovy - user mailing list archive at Nabble.com.
Reply all
Reply to author
Forward
0 new messages