Skip to content

Commit

Permalink
Use jetty from a download
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Feb 28, 2013
1 parent aed6dde commit 35dace8
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 53 deletions.
45 changes: 2 additions & 43 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,60 +1,18 @@
/Gemfile.lock

## MAC OS
.DS_Store

## TEXTMATE
*.tmproj
tmtags

## EMACS
*~
\#*
.\#*

## VIM
*.swp
*.swo

## OSX
.DS_Store
nohup.out

## Cucumber

rerun.txt

## rcov
coverage.data
coverage/*

## TEST APP
pkg/
spec/dummy/db/*.sqlite3
spec/dummy/log/*.log
spec/dummy/tmp/


## PROJECT::GENERAL
coverage
rdoc
pkg
/.bundle
/.rvmrc
db/*.sqlite3
log/*.log
tmp/*.log
tmp/pids/
tmp/test_app/
tmp/
console

*.sqlite3
*.log
*~
*.swp

vendor/plugins/haml/init.rb
vendor/plugins/blacklight/.git
log/*

public/plugin_assets
Expand All @@ -73,3 +31,4 @@ db/schema.rb
/.yardoc
/doc
## PROJECT::SPECIFIC
jetty
48 changes: 38 additions & 10 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ namespace :jetty do
FEDORA_DIR = "#{TEMPLATE_DIR}/fedora_conf/conf"

desc "Config Jetty"
task :config do
Rake::Task["jetty:reset"].reenable
Rake::Task["jetty:reset"].invoke
task :config => :clean do
Rake::Task["jetty:config_fedora"].reenable
Rake::Task["jetty:config_fedora"].invoke
Rake::Task["jetty:config_solr"].reenable
Expand Down Expand Up @@ -54,18 +52,48 @@ namespace :jetty do
end
end

desc "Copies the default SOLR config files and starts up the fedora instance."
task :load => [:config, 'jetty:start']
# desc "Copies the default SOLR config files and starts up the fedora instance."
# task :load => [:config, 'jetty:start']

# desc "return development jetty to its pristine state, as pulled from git"
# task :reset => ['jetty:stop'] do
# system("cd jetty && git reset --hard HEAD && git clean -dfx && cd ..")
# sleep 2
# end
#
JETTY_URL = 'https://github.com/projecthydra/hydra-jetty/archive/new-solr-schema.zip'
JETTY_ZIP = File.join 'tmp', JETTY_URL.split('/').last
JETTY_DIR = 'jetty'

desc "download the jetty zip file"
task :download do
system 'mkdir tmp' unless File.directory? 'tmp'
puts "Downloading jetty..."
system "curl -L #{JETTY_URL} -o #{JETTY_ZIP}"
abort "Unable to download jetty from #{JETTY_URL}" unless $?.success?
end

task :unzip do
Rake::Task["jetty:download"].invoke unless File.exists? JETTY_ZIP
puts "Unpacking jetty..."
tmp_save_dir = File.join 'tmp', 'jetty_generator'
system "unzip -d #{tmp_save_dir} -qo #{JETTY_ZIP}"
abort "Unable to unzip #{JETTY_ZIP} into tmp_save_dir/" unless $?.success?

expanded_dir = Dir[File.join(tmp_save_dir, "hydra-jetty-*")].first

system "mv #{expanded_dir} #{JETTY_DIR}"
abort "Unable to move #{expanded_dir} into #{JETTY_DIR}/" unless $?.success?
end

desc "return development jetty to its pristine state, as pulled from git"
task :reset => ['jetty:stop'] do
system("cd jetty && git reset --hard HEAD && git clean -dfx && cd ..")
sleep 2
task :clean do
system "rm -rf #{JETTY_DIR}"
Rake::Task["jetty:unzip"].invoke
end
end

desc "Run Continuous Integration"
task :ci => ['jetty:reset', 'jetty:config'] do
task :ci => ['jetty:config'] do
jetty_params = Jettywrapper.load_config
error = nil
error = Jettywrapper.wrap(jetty_params) do
Expand Down

0 comments on commit 35dace8

Please sign in to comment.