[
https://issues.apache.org/jira/browse/SLING-11398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17556555#comment-17556555
]
Eric Norman commented on SLING-11398:
-------------------------------------
[~olli] My use case was for running scripts as a HealthCheck. Using
groovy-jsr223 with sling scripting wasn't really my primary use case, but I
just tried the "Run Groovy Scripts" technique in composum described at the link
#1 below and it seemed to work. After using composum to manually create a
"/apps/sling/servlet/default/groovy1.groovy" file I could run it as a script
within the composum ui and also get the same output from browsing to
[http://localhost:8080/content/slingshot.groovy1] so it seems to be working for
that simple test. That manual test was using the current starter that does
not have the org.apache.sling.scripting.groovy deployed at all.
Or did you have a specific test suite in mind that could be run to verify sling
scripting with that groovy ScriptEngine is working as you expected?
#
[https://blogs.perficient.com/2020/05/12/4-useful-features-of-composum-browser/]
> handle serviceloader ScriptEngineFactory defined in a fragment bundle
> ---------------------------------------------------------------------
>
> Key: SLING-11398
> URL: https://issues.apache.org/jira/browse/SLING-11398
> Project: Sling
> Issue Type: Bug
> Reporter: Eric Norman
> Assignee: Eric Norman
> Priority: Major
> Fix For: Scripting Core 2.4.10
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Handle loading of ScriptEngineFactory service loader
> (/META-INF/services/javax.script.ScriptEngineFactory) files that exist in a
> fragment.
> For example, consider the groovy ScriptEngine included in the starter that
> has these:
> Host Bundle - org.codehaus.groovy:groovy:3.0.9
> Fragment - org.codehaus.groovy:groovy-jsr223:3.0.9
>
> Expected:
> The groovy ScriptEngineFactory declared in the groovy-jsr223 fragment should
> be discovered and made available.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)