Class: Avmtrf1::Trf1DspaceBase0::Deploy

Inherits:
Avm::EacWebappBase0::Deploy
  • Object
show all
Defined in:
lib/avmtrf1/trf1_dspace_base0/deploy.rb

Instance Method Summary collapse

Instance Method Details

#ant_updateObject


21
22
23
24
25
26
# File 'lib/avmtrf1/trf1_dspace_base0/deploy.rb', line 21

def ant_update
  infom 'Executando "ant update"...'
  command('ant', 'update').chdir(
    fs_path.join('dspace', 'target', 'dspace-installer')
  ).system!
end

28
29
30
31
32
# File 'lib/avmtrf1/trf1_dspace_base0/deploy.rb', line 28

def link_apps_to_tomcat
  { 'jspui' => 'dspace', 'solr' => 'solr', 'xmlui' => 'xmlui' }.each do |app, context|
    link_app_to_tomcat(app, context)
  end
end

#mvn_packageObject


16
17
18
19
# File 'lib/avmtrf1/trf1_dspace_base0/deploy.rb', line 16

def mvn_package
  infom 'Executando "mvn package"...'
  command('mvn', '-Ddb.name=oracle', '-U', 'package').system!
end

#restart_tomcatObject


34
35
36
37
38
39
40
41
42
# File 'lib/avmtrf1/trf1_dspace_base0/deploy.rb', line 34

def restart_tomcat
  infom 'Parando Tomcat...'
  %w[shutdown startup].each do |script|
    infom "Executando Tomcat:\"#{script}\".."
    command(tomcat_fs_path.join('bin', "#{script}.sh")).system!
  end
  infom 'Esperando 15 segundos pelo Tomcat...'
  sleep(15.seconds)
end