Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Commit

Permalink
#124 Fixed bug corb integration. Running on a collection now works.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmcassel committed Aug 19, 2013
1 parent 7ccc578 commit 5a6a3c1
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions deploy/lib/server_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -602,15 +602,27 @@ def corb
thread_count = thread_count.to_i
module_root = find_arg(['--root']) || '"/"'
modules_database = @properties['ml.modules-db']
install = find_arg(['--install']) == "true"
install = find_arg(['--install']) == "true" || uris_module == '""'

# Find the XCC jar
matches = Dir.glob(File.expand_path("../java/*xcc*.jar", __FILE__))
raise "Missing XCC Jar." if matches.length == 0

xcc_file = matches[0]
runme = %Q{java -cp #{File.expand_path("../java/corb.jar", __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}`

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 #{File.expand_path("../java/corb.jar", __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 #{File.expand_path("../java/corb.jar", __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
end

def credentials
Expand Down

0 comments on commit 5a6a3c1

Please sign in to comment.