From 06ea6393a3c5b1d38f908498a8cae3a91c747420 Mon Sep 17 00:00:00 2001 From: Geert Josten Date: Mon, 23 Feb 2015 21:07:03 +0100 Subject: [PATCH] Fixed #280: fixed path lookup for corb.jar --- deploy/lib/server_config.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/deploy/lib/server_config.rb b/deploy/lib/server_config.rb index 9060defc..99794652 100644 --- a/deploy/lib/server_config.rb +++ b/deploy/lib/server_config.rb @@ -816,17 +816,22 @@ def corb raise "Missing XCC Jar." if matches.length == 0 xcc_file = matches[0] + # Find the CORB jar + matches = Dir.glob(ServerConfig.expand_path("../java/*corb*.jar")) + raise "Missing CORB Jar." if matches.length == 0 + corb_file = matches[0] + if install # If we're installing, we need to change directories to the source # directory, so that the xquery_modules will be visible with the # same path that will be used to see it in the modules database. Dir.chdir(@properties['ml.xquery.dir']) do - runme = %Q{java -cp #{ServerConfig.expand_path("../java/corb.jar")}#{path_separator}#{xcc_file} com.marklogic.developer.corb.Manager #{connection_string} #{collection_name} #{xquery_module} #{thread_count} #{uris_module} #{module_root} #{modules_database} #{install}} + runme = %Q{java -cp #{corb_file}#{path_separator}#{xcc_file} com.marklogic.developer.corb.Manager #{connection_string} #{collection_name} #{xquery_module} #{thread_count} #{uris_module} #{module_root} #{modules_database} #{install}} logger.info runme `#{runme}` end else - runme = %Q{java -cp #{ServerConfig.expand_path("../java/corb.jar")}#{path_separator}#{xcc_file} com.marklogic.developer.corb.Manager #{connection_string} #{collection_name} #{xquery_module} #{thread_count} #{uris_module} #{module_root} #{modules_database} #{install}} + runme = %Q{java -cp #{corb_file}#{path_separator}#{xcc_file} com.marklogic.developer.corb.Manager #{connection_string} #{collection_name} #{xquery_module} #{thread_count} #{uris_module} #{module_root} #{modules_database} #{install}} logger.info runme `#{runme}` end