Skip to content

Commit

Permalink
Fixed marklogic-community#280: fixed path lookup for corb.jar
Browse files Browse the repository at this point in the history
  • Loading branch information
grtjn committed Feb 23, 2015
1 parent 930b3a8 commit 06ea639
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions deploy/lib/server_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 06ea639

Please sign in to comment.