Hi Yoko,

Yoko Harada schrieb:
Hi,

I've released JSR 223 JRuby engine independenly at
https://scripting.dev.java.net/servlets/ProjectDocumentList?folderID=8848&expandFolder=8848&folderID=8848
expecially for JDK 1.5 users.

I just released JRuby engine 1.1.5, which is JRuby 1.1.4 compliant
version and should be OSGi-fied one. However, I'm not sure this
release really fixes issue
37(https://scripting.dev.java.net/issues/show_bug.cgi?id=37) filed in
the scripting project's issue tracker. How can I test released
archives work with Apache Sling?

It should be fairly easy: just install the required bundle(s) into sling (I generally use the Apache Felix Web Console). The Sling scripting infrastructure should recognize the JRuby bundle, which contains the ScriptEngineFactory provided the factory is listed in the META-INF/services folders as described by JSR-223.

When the ScriptEngineFactory has been picked up, you should be able to write scripts with the extension supported by the ScriptEngine.

Unfortunately there is no other way yet, to find out whether the script engine has been "accepted".


For example, you could do the following:

  - start Sling
  - install the JRuby bundles
  - look in the Sling log (logs/error.log) for any
       errors during the installation
  - open a web dav connect to Sling (e.g. if Sling is
       started on por 8888, open to http://host:8888/)
  - create a script at /apps/sling/nonexisting/GET.erb
       (given erb would be the JRuby extension)
  - with your browser access http://host:8888/missing/page.html

The last part causes a non existing resource of type sling:nonexisting to be used for processing and the /apps/sling/nonexisting/GET.erb would be called to process the request.

Hope this helps.

Regards
Felix

Reply via email to