...
Sling supports the Scala programming language version 2.78.7 1 through optional modules located in /contrib/scripting/scala
.
Installation
The following bundles are required for Scala support: scala-library, scala-compiler, Scala Script Engine, Apache Sling Scala Scripting Configuration. Note: In order to see the Scala scripting engine in action you can also use the Launchpad Contrib Testing module which comes with all necessary bundles (including the examples) pre-installed. See below.
Manual installation
- Start Sling
- Download the scala-library bundle and the scala-compiler bundle and install them using for example the Apache Felix Web Management Console.
...
- Goto
/samples/path-based-rtp
and typemvn org.apache.sling:maven-sling-plugin:install-P autoInstallBundle clean install -Dsling.url=http://localhost:8888/system/console
.
Now the examples themselves:
- Install the Scala for Sling Demo Application - Hello World bundle. Goto
/contrib/scripting/scala/samples/hello-world
and typemvn org.apache.sling:maven-sling-plugin:install-P autoInstallBundle clean install -Dsling.url=http://localhost:8888/system/console
. The hello world application is then available at http://localhost:80808888/content/helloworld.html
- Install the Scala for Sling Demo Application - Forum bundle. Goto
/contrib/scripting/scala/samples/forum
and typemvn org.apache.sling:maven-sling-plugin:install-P autoInstallBundle clean install -Dsling.url=http://localhost:8888/system/console
. The form application is the available at http://localhost:80808888/content/forum.html?sling:authRequestLogin=true. When prompted for credentials use admin/admin.
...
Further Information
See these session slides for some further information.: