Hi devs,
I'd like to propose adding the Ivy JAR to our Platform/XE distributions.
The reason is simple: it makes it possible to use the Groovy @Grab
directive which makes it real easy to extend XWiki using Groovy script.
Several advantages:
- not having to manually hunt for transitive dependencies
- not needing to stop/restart XWiki (since this is what you need to do if
your groovy script needs to use some third party jars).
Here's a good usage example:
{{cache}}
{{groovy}}
@Grab(group='org.codehaus.groovy.modules.http-builder',
module='http-builder', version='0.5.1')
import groovyx.net.http.RESTClient
github = new RESTClient( 'http://github.com/api/v2/json/' )
println "|=Project|=Description|=Use Wiki?|=Use Issues?"
def response = github.get( path : 'repos/show/xwiki' )
response.data.repositories.each() { repo ->
println "|[[${repo.name}>>
http://github.com/xwiki/${repo.name}]]|${repo.description}|${repo.has_wiki}…
"
}
{{/groovy}}
{{/cache}}
If you try to do this without the grab directive you'll find yourself
hunting down more than 30 jars which you'll need to put in your WEB-INF/lib
directory, whereas here it's a single line directive. It's really powerful.
Here's my +1 to make it easy for users to use Groovy scripts.
Thanks
-Vincent
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs