[
https://issues.apache.org/jira/browse/SLING-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12655140#action_12655140
]
Felix Meschberger commented on SLING-315:
-----------------------------------------
Agreed. I have also tested such a use case and it looks like the Groovy bundle
cannot see the required classes.
The only viable solution, I know of, and which we also use in our own
ScriptEngine implementation bundles, is to set the DynamicImport-Package header
to "*" meaning to try to resolve all unknown classes in the framework on-demand
and only failing if the classes are not available from any exports in the
framework.
I have posted a potential extension to the Groovy build in [1].
In short, it only requires a very small patch to the Groovy build.xml file
(against the Groovy 1.6 branch):
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>
[1] http://markmail.org/message/47n2ow2jlo553jvk
> Groovy support
> --------------
>
> Key: SLING-315
> URL: https://issues.apache.org/jira/browse/SLING-315
> Project: Sling
> Issue Type: New Feature
> Components: Scripting
> Affects Versions: 3
> Environment: all
> Reporter: Christian Sprecher
> Assignee: Felix Meschberger
> Priority: Minor
> Attachments: diff.txt, groovy-engine-1.0.jar, groovy.tar.gz, pom.xml
>
> 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.