Skip to content
This repository has been archived by the owner on Jul 18, 2022. It is now read-only.

Commit

Permalink
CLEREZZA-719: update scala to version 2.9.2
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/incubator/clerezza/trunk@1407906 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
retog committed Nov 11, 2012
1 parent 8c1016c commit 7b631dc
Show file tree
Hide file tree
Showing 13 changed files with 296 additions and 258 deletions.
5 changes: 0 additions & 5 deletions bundledevtool/pom.xml
Expand Up @@ -36,11 +36,6 @@
<groupId>org.apache.clerezza.scala</groupId>
<artifactId>script-engine</artifactId>
</dependency>
<dependency>
<groupId>jline</groupId>
<artifactId>jline</artifactId>
<version>0.9.94</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-compiler</artifactId>
Expand Down
3 changes: 1 addition & 2 deletions parent/pom.xml
Expand Up @@ -25,7 +25,6 @@
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>10</version>
<relativePath>../parent</relativePath>
</parent>
<groupId>org.apache.clerezza</groupId>
<artifactId>clerezza</artifactId>
Expand All @@ -35,7 +34,7 @@
<version>0.3-incubating-SNAPSHOT</version>
<description>The direct or indirect parent of all Clerezza Artifacts</description>
<properties>
<scala.version>2.8.1</scala.version>
<scala.version>2.9.2</scala.version>
<sourceReleaseAssemblyDescriptor>multimodule-source-release</sourceReleaseAssemblyDescriptor>
</properties>
<licenses>
Expand Down
12 changes: 3 additions & 9 deletions platform.launcher.storageless.parent/pom.xml
Expand Up @@ -30,7 +30,7 @@
<version>0.9-incubating-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Clerezza - Platform Launcher Storageless Parent POM</name>
<description>A parent for Platform launchers, containing the platform bundles as runtime dependencies.
<description>A parent for Platform launchers, containing the platform bundlessca as runtime dependencies.
</description>
<modules>
<module>platform.launcher.storageless</module>
Expand Down Expand Up @@ -83,19 +83,13 @@
<dependency>
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.scala-library</artifactId>
<version>2.8.1_1</version>
<version>2.9.2_1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.scala-compiler</artifactId>
<version>2.8.1_1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.jline</artifactId>
<version>0.9.94_1</version>
<version>2.9.2_1</version>
<scope>runtime</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions scala-scripting/pom.xml
Expand Up @@ -43,12 +43,12 @@
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.8.1</version>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-compiler</artifactId>
<version>2.8.1</version>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
Expand Down
Expand Up @@ -29,7 +29,7 @@ import scala.tools.nsc.reporters.Reporter


class BundleContextScalaInterpreter(bundleContext : BundleContext, out: PrintWriter)
extends Interpreter(new Settings, out) {
extends IMain(new Settings, out) {

def this(bundleContext : BundleContext) = {
this(bundleContext, new PrintWriter(System.out))
Expand Down
Expand Up @@ -42,7 +42,7 @@ class InterpreterFactory() {
bundleContext = null
}

def createInterpreter(out: PrintWriter) : Interpreter = {
def createInterpreter(out: PrintWriter) : IMain = {
val i = new BundleContextScalaInterpreter(bundleContext, out)
i
}
Expand Down
Expand Up @@ -55,7 +55,7 @@ class ScriptEngineFactory() extends JavaxEngineFactory with BundleListener {

private var factory: InterpreterFactory = null
private var compilerService: CompilerService = null
var _interpreter : Interpreter = null;
var _interpreter : IMain = null;
private var bundleContext: BundleContext = null
def interpreter = {
if (_interpreter == null) {
Expand Down Expand Up @@ -157,10 +157,7 @@ class ScriptEngineFactory() extends JavaxEngineFactory with BundleListener {
interpreter.bind(entry._1,
getAccessibleClass(entry._2.getClass).getName, entry._2)
}
val result = interpreter.eval[Object](script) match {
case Some(x) => x
case None => null
}
val result = interpreter.interpret(script)
if (interpreter.reporter.hasErrors) {
throw new ScriptException("some error","script-file",1)
}
Expand Down
6 changes: 0 additions & 6 deletions scala-scripting/tests/pom.xml
Expand Up @@ -76,12 +76,6 @@
<version>2.8.1_1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.jline</artifactId>
<version>0.9.94_1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.clerezza.scala</groupId>
<artifactId>script-engine</artifactId>
Expand Down
19 changes: 12 additions & 7 deletions shell/pom.xml
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.clerezza</groupId>
<artifactId>clerezza</artifactId>
<version>0.2-incubating</version>
<version>0.3-incubating-SNAPSHOT</version>
</parent>
<artifactId>shell</artifactId>
<version>0.2-incubating-SNAPSHOT</version>
Expand All @@ -39,11 +39,6 @@
<groupId>org.apache.clerezza</groupId>
<artifactId>osgi.services</artifactId>
</dependency>
<dependency>
<groupId>jline</groupId>
<artifactId>jline</artifactId>
<version>0.9.94</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-compiler</artifactId>
Expand All @@ -52,6 +47,11 @@
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>jline</artifactId>
<version>2.9.0-1</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr.annotations</artifactId>
Expand Down Expand Up @@ -79,9 +79,14 @@
<configuration>
<instructions>
<Service-Component>OSGI-INF/serviceComponents.xml</Service-Component>
<Export-Package>org.apache.clerezza.shell</Export-Package>
<Export-Package>org.apache.clerezza.shell,
scala.tools.jline,
scala.tools.jline.console,
scala.tools.jline.console.history,
scala.tools.jline.console.completer</Export-Package>
<Bundle-SymbolicName>org.apache.clerezza.shell</Bundle-SymbolicName>
<Import-Package>org.apache.clerezza.platform.security;resolution:=optional, *</Import-Package>
<Embed-Dependency>jline</Embed-Dependency>
</instructions>
</configuration>
</plugin>
Expand Down
Expand Up @@ -56,7 +56,7 @@ class ConsoleShell() {
}
//this call sets the console terminal to the right settings
//and it must not be invoked when there is no console input, or the system will stop
val terminalOption = Some(jline.Terminal.setupTerminal())
val terminalOption = Some(scala.tools.jline.TerminalFactory.create())
val in = Channels.newInputStream(
(new FileInputStream(FileDescriptor.in)).getChannel());
interruptibleIn = new InterruptibleInputStream(in)
Expand Down

0 comments on commit 7b631dc

Please sign in to comment.