Use the uri:classloader:/ custom path for setting up JARS_HOME and $LOAD_PATH
This will help the submitted topology operate much more like an embedded JRuby use-case thanks to the recent improvements that @mkristian has made in JRuby core Fixes #12
This commit is contained in:
parent
0734acdcb0
commit
23b6fdd4e3
|
@ -19,7 +19,7 @@ apply plugin: 'java'
|
|||
apply plugin: 'com.github.jruby-gradle.jar'
|
||||
apply plugin: 'com.jfrog.bintray'
|
||||
|
||||
version = '0.8.1'
|
||||
version = '0.9.0'
|
||||
group = 'com.github.jruby-gradle'
|
||||
description = "RedStorm integrates Ruby code via JRuby into the Storm distributed computation system"
|
||||
defaultTasks 'check', 'assemble'
|
||||
|
|
|
@ -37,6 +37,15 @@ class TopologyLauncher
|
|||
end
|
||||
|
||||
env = args[0].to_sym
|
||||
|
||||
# If we're in the "cluster" mode that means we're running in an embedded JRuby
|
||||
# and we should modify our environment to suit that, see:
|
||||
# <https://github.com/jruby-gradle/redstorm/issues/12>
|
||||
if env == :cluster
|
||||
Dir.chdir('uri:classloader:/')
|
||||
ENV['JARS_HOME'] = 'uri:classloader:/jars'
|
||||
$LOAD_PATH.unshift('uri:classloader://')
|
||||
end
|
||||
class_path = args[1]
|
||||
|
||||
launch_path = Dir.pwd
|
||||
|
|
Loading…
Reference in New Issue