| From | Sent On | Attachments |
|---|---|---|
| Felix Meschberger | Dec 10, 2008 12:31 am | |
| Guillaume Laforge | Dec 10, 2008 2:41 am | |
| Paul King | Dec 10, 2008 2:50 am | |
| Felix Meschberger | Dec 10, 2008 6:12 am |
| Subject: | [groovy-dev] Groovy in Apache Sling | |
|---|---|---|
| From: | Felix Meschberger (fmes...@gmail.com) | |
| Date: | Dec 10, 2008 12:31:45 am | |
| List: | org.codehaus.groovy.dev | |
Hi all,
It is great to see Groovy deploy and use unmodified in Sling. There is one catch, though: Application provided classes are not visible to the Groovy library when running scripts.
In other Script engines in Sling, we set the Bundle manifest header:
DynamicImport-Package: *
which causes a dynamic resolution of packages from the OSGi framework on-demand.
I quickly tested a patch to the build.xml script:
Index: build.xml =================================================================== --- build.xml (Revision 14334) +++ build.xml (Arbeitskopie) @@ -496,6 +496,7 @@ <attribute name="Bundle-RequiredExecutionEnvironment" value="@{bundleEnvironment}" /> <attribute name="Eclipse-BuddyPolicy" value="dependent"/> <attribute name="Eclipse-LazyStart" value="true"/> + <attribute name="DynamicImport-Package" value="*"/> </manifest> </sequential> </macrodef>
which seems to help and allows me to run scripts, which use classes from outside the Groovy import scope.
Any chances of getting such an addition into the 1.6 branch already ?
Thanks and Regards Felix
--------------------------------------------------------------------- To unsubscribe from this list, please visit:





