Author: boisvert
Date: Sun Dec 20 16:31:19 2009
New Revision: 892605

URL: http://svn.apache.org/viewvc?rev=892605&view=rev
Log:
Classpath correctly passed to Scala shell

See http://lampsvn.epfl.ch/trac/scala/wiki/Classpath
and 
http://old.nabble.com/-scala--recent-changes-in-2.8-nightly-classpath-management-td26233977.html
for details

Tested on both Scala 2.7.x and 2.8.

Modified:
    buildr/trunk/CHANGELOG
    buildr/trunk/lib/buildr/scala/shell.rb

Modified: buildr/trunk/CHANGELOG
URL: 
http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=892605&r1=892604&r2=892605&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Sun Dec 20 16:31:19 2009
@@ -35,6 +35,7 @@
 * Fixed:  Fail-fast if package.with() or include() called with nil values
 * Fixed:  Failures not reported correctly for ScalaTest (Alex Eagle)
 * Fixed:  Test dependencies should include test compile dependencies
+* Fixed:  Classpath correctly passed to Scala shell
 
 1.3.5 (2009-10-05)
 * Added:  Interactive shell (REPL) support

Modified: buildr/trunk/lib/buildr/scala/shell.rb
URL: 
http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/scala/shell.rb?rev=892605&r1=892604&r2=892605&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/scala/shell.rb (original)
+++ buildr/trunk/lib/buildr/scala/shell.rb Sun Dec 20 16:31:19 2009
@@ -21,30 +21,31 @@
   module Scala
     class ScalaShell < Buildr::Shell::Base
       include Buildr::Shell::JavaRebel
-      
+
       class << self
         def lang
           :scala
         end
-        
+
         def to_sym
           :scala
         end
       end
-      
+
       def launch
-        cp = project.compile.dependencies + 
+        cp = project.compile.dependencies +
           Scalac.dependencies +
           [project.path_to(:target, :classes)]
-        
+
         props = {
-          'env.classpath' => cp.join(File::PATH_SEPARATOR),
           'scala.home' => Scalac.scala_home
         }
-        
-        Java::Commands.java 'scala.tools.nsc.MainGenericRunner', {
+
+        Java::Commands.java 'scala.tools.nsc.MainGenericRunner',
+                            '-cp', cp.join(File::PATH_SEPARATOR),
+        {
           :properties => props.merge(rebel_props(project)),
-          :classpath => cp,
+          :classpath => Scalac.dependencies,
           :java_args => rebel_args
         }
       end


Reply via email to