class Buildr::Scala::ScalaShell

Public Instance Methods

launch(task) click to toggle source
# File lib/buildr/scala/shell.rb, line 23
def launch(task)
  jline = [File.expand_path("lib/jline.jar", Scalac.scala_home)].find_all { |f| File.exist? f }
  jline = ['jline:jline:jar:0.9.94'] if jline.empty?

  cp = project.compile.dependencies +
       Scalac.dependencies +
       project.test.dependencies +
       task.classpath

  java_args = jrebel_args + task.java_args

  props = jrebel_props(project).merge(task.properties)

  Java::Commands.java 'scala.tools.nsc.MainGenericRunner',
                      '-cp', cp.join(File::PATH_SEPARATOR),
  {
    :properties => props,
    :classpath => cp + jline,
    :java_args => java_args
  }
end