Author: djspiewak
Date: Tue Jun 23 00:03:29 2009
New Revision: 787469
URL: http://svn.apache.org/viewvc?rev=787469&view=rev
Log:
Slightly improved Groovy shell support
Modified:
buildr/trunk/lib/buildr/groovy/shell.rb
Modified: buildr/trunk/lib/buildr/groovy/shell.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/groovy/shell.rb?rev=787469&r1=787468&r2=787469&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/groovy/shell.rb (original)
+++ buildr/trunk/lib/buildr/groovy/shell.rb Tue Jun 23 00:03:29 2009
@@ -10,14 +10,19 @@
end
def launch
- # TODO make this more generic!!
+ fail 'Are we forgetting something? GROOVY_HOME not set.' unless
groovy_home
cp = project.compile.dependencies.join(File::PATH_SEPARATOR) +
File::PATH_SEPARATOR + project.path_to(:target, :classes)
cmd_args = " -classpath '#{cp}'"
-
- system('groovysh' + cmd_args)
+ trace "groovysh #{cmd_args}"
+ system(File.expand_path('bin/groovysh', groovy_home) + cmd_args)
+ end
+
+ private
+ def groovy_home
+ @home ||= ENV['GROOVY_HOME']
end
end
end