Package: groovy Version: 1.6.0-1 Severity: important A Groovy script with Grape annotations (@Grab) will not download its dependencies when using the Debian version of Groovy 1.6. This works well on a vanilla Groovy installation.
@Grab(group='org.apache.camel', module='camel-groovy', version='1.6.0') @Grab(group='org.apache.camel', module='camel-xmpp', version='1.6.0') @Grab(group='org.apache.camel', module='camel-core', version='1.6.0') class SampleRoute extends GroovyRouteBuilder { -- System Information: Debian Release: 5.0 APT prefers jaunty-updates APT policy: (500, 'jaunty-updates'), (500, 'jaunty-security'), (500, 'jaunty-backports'), (500, 'jaunty') Architecture: amd64 (x86_64) Kernel: Linux 2.6.28-11-generic (SMP w/2 CPU cores) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages groovy depends on: ii antlr 2.7.7-11 language tool for constructing rec ii default-jre-head 1.6-30ubuntu4 Standard Java or Java compatible R ii gij [java5-runti 4:4.3.3-1ubuntu1 The GNU Java bytecode interpreter ii gij-4.2 [java5-r 4.2.4-5ubuntu1 The GNU Java bytecode interpreter ii gij-4.3 [java5-r 4.3.3-5ubuntu4 The GNU Java bytecode interpreter ii ivy 2.1.0~rc1-1 The agile dependency manager ii java-gcj-compat- 1.0.80-1 Java runtime environment using GIJ ii junit4 4.3.1-4 JUnit regression test framework fo ii libasm2-java 2.2.3-2 Java bytecode manipulation framewo ii libbsf-java 1:2.4.0-2ubuntu1 Bean Scripting Framework to suppor ii libclassworlds-j 1.1-final-1ubuntu1~ppa4 framework for container developers ii libcommons-cli-j 1.1-3 API for working with the command l ii libcommons-loggi 1.1.1-2 commmon wrapper interface for seve ii libjline-java 0.9.94-1ubuntu1 Java library for handling console ii libmockobjects-j 0.09-3 Framework for developing and using ii libregexp-java 1.4-5ubuntu1 regular expression library for Jav ii libservlet2.4-ja 5.0.30-8ubuntu3 Servlet 2.4 and JSP 2.0 Java libra ii libxstream-java 1.3-4 Java library to serialize objects ii openjdk-6-jre-he 6b14-1.4.1-0ubuntu7 OpenJDK Java runtime, using Hotspo ii sun-java6-jre [j 6-13-1 Sun Java(TM) Runtime Environment ( groovy recommends no packages. Versions of packages groovy suggests: ii groovy-doc 1.6.0-1 Agile dynamic language for the Jav -- no debconf information
#!/usr/bin/groovy // /home/ludo/opt/groovy-1.6.0/bin/groovy import java.io.File; import org.apache.camel.impl.DefaultCamelContext; import org.apache.camel.language.groovy.GroovyRouteBuilder; @Grab(group='org.apache.camel', module='camel-groovy', version='1.6.0') @Grab(group='org.apache.camel', module='camel-xmpp', version='1.6.0') @Grab(group='org.apache.camel', module='camel-core', version='1.6.0') class SampleRoute extends GroovyRouteBuilder { protected void configure(){ from("file:///home/ludo/tmp/jabber"). to("xmpp://talk.google.com:5222/ludovic.claud...@googlemail.com?servicename=googlemail.com&user=inna.boldyreva&password=success78"); } } def watchFolder = new File("/home/ludo/tmp/jabber"); println("Put new files in " + watchFolder); def camelCtx = new DefaultCamelContext() camelCtx.addRoutes(new SampleRoute()); camelCtx.start();