Netcentric / vault-upgrade-hook

Jackrabbit FileVault Install Hook to perform additional actions during package installation
Eclipse Public License 1.0
19 stars 13 forks source link

Support all Sling Scripting Engines through Java Scripting API #15

Closed kwin closed 4 years ago

kwin commented 7 years ago

Basically Sling provides several scripting engines (https://sling.apache.org/documentation/bundles/scripting.html#sling-scripting-engines) which are all exposed through the Java Scripting API (https://docs.oracle.com/javase/7/docs/api/javax/script/package-summary.html). Currently the upgrade hook is very specific to the Groovy Console and uses that class directly.

Instead it would be good to decouple the upgrade hook from the actual groovy console class but rather rely on Java Scripting API only. That way you could leverage every scripting engine being registered with the Java Scripting API (Groovy supports that OOTB, see http://groovy-lang.org/integrating.html#jsr223)

kwin commented 5 years ago

@nc-andreashaller Isn't this resolved by https://github.com/Netcentric/vault-upgrade-hook/blob/develop/vault-upgrade-hook/src/main/java/biz/netcentric/vlt/upgrade/handler/script/ScriptHandler.java?