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

Oliver Lietz commented on SLING-11398:
--------------------------------------

[~enorman], I hadn't a chance to checkout and test with different Groovy 
versions so far, but reads reasonable.

Sling Scripting Groovy is not using the {{ScriptEngineFactory}} from 
{{groovy-jsr223}}. It brings its own {{ScriptEngineFactory}} and 
{{ScriptEngine}} which is using {{groovy.text.GStringTemplateEngine}} (3.0.x). 
It therefore depends only on {{groovy}}, {{groovy-json}} and 
{{groovy-templates}}. {{groovy-templates}} 3.0.1 is a regular bundle but 3.0.11 
(latest 3.x) is a fragment for example.

1. [~dklco] added the Groovy bundles, AFAIR for Sling CMS, not for Sling 
Scripting Groovy
2./3. Right, Sling Scripting Groovy defaults now to {{gstring}} (but it's 
configurable) and to {{gsp}} (Groovy Server Pages) in older versions (see 
[Groovy template 
engines|https://docs.groovy-lang.org/docs/next/html/documentation/template-engines.html]
 why it seems to be wrong). Both HCs do not target Sling Scripting Groovy. 
{{groovy}} was only used in an older version of Sling Scripting Groovy as 
compatible name ({{compatible.javax.script.name}}).

Did you check if the {{ScriptEngine}} from {{groovy-jsr223}} works with Sling 
Scripting?

> 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)

Reply via email to