You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Christian Sprecher (JIRA)" <ji...@apache.org> on 2008/03/08 20:27:46 UTC

[jira] Commented: (SLING-315) Groovy support

    [ https://issues.apache.org/jira/browse/SLING-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576587#action_12576587 ] 

Christian Sprecher commented on SLING-315:
------------------------------------------

from the sling/scripting/groovy/src/main/resources/META-INF/NOTICE file

============================================


Apache Sling Groovy Scripting Support
Copyright 2007 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

This product includes software developed at
Groovy project in The Codehaus (http://groovy.codehaus.org/).

=============
Current state
=============
* pure groovy JSR 223-support, i.e. no special html markup handled
* makes use of groovy-engine.jar file found at https://scripting.dev.java.net/files/documents/4957/37593/jsr223-engines.zip
(unfortunately not found in any maven repository)

======================
How to use/How to test
======================
* first have the sling/scripting/groovy project created and deployed (mvn clean install)
* first time you have to add groovy-engine to your local repository
* change sling/launchpad/launchpad-webapp/pom.xml to use the groovy scripting engine:
<dependency>
    <groupId>groovy</groupId>
    <artifactId>groovy-all</artifactId>
    <version>1.0</version>
</dependency>
* startup jetty (mvn jetty:run) and check, if the groovy support is activated:
check under http://localhost:8888/sling/list
wether 	"Sling - Scripting - Groovy Support" is set
* then follow the steps under http://incubator.apache.org/sling/site/discover-sling-in-15-minutes.html
* but instead of building a html.esp, create a html.groovy containing one line
println resource.node.getProperty("title").string
* therefore the last step reads as
curl -X PUT -d @html.groovy http://admin:admin@localhost:8888/dav/default/apps/foo/bar/html.groovy
* navigating to http://localhost:8888/content/mynode.html shows groovy in action ...

============
Is that all?
============
Yeah, at the moment. Please note that not one line of code had to be written to enable groovy support. This is nice. 

===========
Whats next?
===========
* please someone check the pom.xml. There are many explicit excludes in the bundle plugin, this smells
* Groovy Servlet Pages (gsp) support
* do not use groovy-all.jar (dependency clean-up)
* some kickass sample to have the crowd go "wow" (some gpath magic might well do it)

> Groovy support
> --------------
>
>                 Key: SLING-315
>                 URL: https://issues.apache.org/jira/browse/SLING-315
>             Project: Sling
>          Issue Type: New Feature
>          Components: Scripting
>    Affects Versions: 2.0.0
>         Environment: all
>            Reporter: Christian Sprecher
>            Priority: Minor
>         Attachments: diff.txt, groovy-engine-1.0.jar
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Implement Groovy as an option for scripting language support. A patch with a possible implementation will be attached

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.