class Buildr::Shell::ShellTask
Attributes
classpath[RW]
Classpath dependencies.
options[R]
Returns the run options.
provider[R]
Underlying shell provider
Public Instance Methods
java_args()
click to toggle source
# File lib/buildr/shell.rb, line 154 def java_args @options[:java_args] || (ENV['JAVA_OPTS'] || ENV['JAVA_OPTIONS']).to_s.split end
properties()
click to toggle source
# File lib/buildr/shell.rb, line 158 def properties @options[:properties] || {} end
run()
click to toggle source
# File lib/buildr/shell.rb, line 145 def run fail "No shell provider defined in project '#{project.name}' for language '#{project.compile.language.inspect}'" unless provider provider.launch(self) end
using(options) → self
click to toggle source
Sets the run options from a hash and returns self.
For example:
shell.using :properties => {'foo' => 'bar'} shell.using :bsh
# File lib/buildr/shell.rb, line 132 def using(*args) if Hash === args.last args.pop.each { |key, value| @options[key.to_sym] = value } end until args.empty? new_shell = Shell.select_by_name(args.pop) @provider = new_shell.new(project) unless new_shell.nil? end self end
with(*artifacts) → self
click to toggle source
Adds files and artifacts as classpath dependencies, and returns self.
# File lib/buildr/shell.rb, line 119 def with(*specs) @classpath |= Buildr.artifacts(specs.flatten).uniq self end