You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by dj...@apache.org on 2009/06/23 02:05:24 UTC

svn commit: r787478 - /buildr/trunk/lib/buildr/core/shell.rb

Author: djspiewak
Date: Tue Jun 23 00:05:23 2009
New Revision: 787478

URL: http://svn.apache.org/viewvc?rev=787478&view=rev
Log:
Use Commands.java instead of system 'java'

Modified:
    buildr/trunk/lib/buildr/core/shell.rb

Modified: buildr/trunk/lib/buildr/core/shell.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/shell.rb?rev=787478&r1=787477&r2=787478&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/shell.rb (original)
+++ buildr/trunk/lib/buildr/core/shell.rb Tue Jun 23 00:05:23 2009
@@ -1,4 +1,5 @@
 require 'buildr/shell'
+require 'buildr/java/commands'
 
 module Buildr
   module Shell
@@ -50,25 +51,20 @@
       def launch
         fail 'Are we forgetting something? CLOJURE_HOME not set.' unless clojure_home
         
-        cp = project.compile.dependencies.join(File::PATH_SEPARATOR) + 
-          File::PATH_SEPARATOR + project.path_to(:target, :classes) +
-          File::PATH_SEPARATOR + File.expand_path('clojure.jar', clojure_home) +
-          File::PATH_SEPARATOR + jline_jar
+        cp = project.compile.dependencies + 
+          [
+            project.path_to(:target, :classes),
+            File.expand_path('clojure.jar', clojure_home),
+            'jline:jline:jar:0.9.94'
+          ]
         
-        system("java -classpath '#{cp}' jline.ConsoleRunner clojure.lang.Repl")
+        Java::Commands.java 'jline.ConsoleRunner', 'clojure.lang.Repl', :classpath => cp
       end
       
     private
       def clojure_home
         @home ||= ENV['CLOJURE_HOME']
       end
-      
-      def jline_jar
-        jline = Buildr.artifact 'jline:jline:jar:0.9.94'
-        jline.install
-        
-        Buildr.repositories.locate jline
-      end
     end
   end
 end