Class: Buildr::Run::JavaRunner

Inherits:
Base show all
Includes:
JRebel
Defined in:
lib/buildr/core/run.rb

Instance Attribute Summary

Attributes inherited from Base

#project

Instance Method Summary collapse

Methods included from JRebel

#jrebel_args, #jrebel_home, #jrebel_props, #rebel_jar

Methods inherited from Base

#build?, #initialize, #launch, specify, to_sym

Constructor Details

This class inherits a constructor from Buildr::Run::Base

Instance Method Details

#run(task) ⇒ Object



28
29
30
31
32
33
34
35
36
# File 'lib/buildr/core/run.rb', line 28

def run(task)
  fail "Missing :main option" unless task.options[:main]
  cp = project.compile.dependencies + [project.path_to(:target, :classes)] + task.classpath
  Java::Commands.java(task.options[:main], {
    :properties => jrebel_props(project).merge(task.options[:properties] || {}),
    :classpath => cp,
    :java_args => jrebel_args + (task.options[:java_args] || [])
  })
end