Sling/Scala weekly progress report.
Duration : 26th Monday 2008 to 1st June 2008.
Progress:
1. Setting up development environment in eclipse.
2. Discovering the presence of an Interpreter in Scala compiler library.
3. Created a standalone project to test the Interpreter.
The interpreter takes input in a string and returns the result. Ex:
"4 + 2" gives "6".
4. Writing code to use the Interpreter in Sling/Scala and building.
I wrote code to use the interpreter for Sling/Scala based on Ruby
ERBScriptEngine & ERBScriptEngineFactory.
I hope to feed the string input using the reader like the eval
method of ERBScriptEngine and write output using
scriptContext.getWriter().write(String).
The bundle is loaded automatically but there are problems related to
this activity stated under problems.
Problems:
Solved:
1. Using maven in Eclipse.
2. Creating the pom.xml for Sling/Scala using the correct Scala library
plug-ins.
Unsolved:
1. Getting the scala script to run in sling using Sling/Scala bundle
described under point (4) in Progress heading.
I want the Interpreter in "eval(Reader script , ScriptContext
scriptContext)" to pick up a scala script and display results or dump it to
a log file. But I don't know the correct place to put the script and do this
correctly. I have also tried to run it using the examples provided in
reference [1] and [2]. I think I need more help on this.
Perspective:
1. Fixing the unsolved problem and running the Scala Interpreter in
Sling.
2. If successful in step 1 try to access content using scripts.
References :
[1]
http://dev.day.com/microsling/content/blogs/main/slingrequestprocessrevisited.html
[2]
http://incubator.apache.org/sling/site/discover-sling-in-15-minutes.html