Class: Buildr::Shell::BeanShell

Inherits:
Base show all
Includes:
JavaRebel
Defined in:
lib/buildr/core/shell.rb

Constant Summary collapse

VERSION =
'2.0b4'

Instance Attribute Summary

Attributes inherited from Base

#project

Class Method Summary collapse

Instance Method Summary collapse

Methods included from JavaRebel

#rebel_args, #rebel_home, #rebel_props

Methods inherited from Base

#build?, #initialize

Constructor Details

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

Class Method Details

.artifactObject



35
36
37
# File 'lib/buildr/core/shell.rb', line 35

def artifact
  "org.beanshell:bsh:jar:#{version}"
end

.langObject



39
40
41
# File 'lib/buildr/core/shell.rb', line 39

def lang
  :java
end

.to_symObject



43
44
45
# File 'lib/buildr/core/shell.rb', line 43

def to_sym
  :bsh
end

.versionObject



31
32
33
# File 'lib/buildr/core/shell.rb', line 31

def version
  Buildr.settings.build['bsh'] || VERSION
end

Instance Method Details

#launchObject



48
49
50
51
52
53
54
55
# File 'lib/buildr/core/shell.rb', line 48

def launch
  cp = project.compile.dependencies + [project.path_to(:target, :classes), Buildr.artifact(BeanShell.artifact)]
  Java::Commands.java 'bsh.Console', {
    :properties => rebel_props(project),
    :classpath => cp,
    :java_args => rebel_args
  }
end