Class: Rays::Worker::Deployer::EJBDeploy

Inherits:
BaseWorker
  • Object
show all
Includes:
Singleton
Defined in:
lib/rays/workers/deployer.rb

Overview

EJB deployer

Instance Method Summary collapse

Methods inherited from BaseWorker

#execute, register

Instance Method Details

#deploy(app_module) ⇒ Object



75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/rays/workers/deployer.rb', line 75

def deploy(app_module)
  execute('deploy', app_module) do
    env = $rays_config.environment
    file_to_deploy = File.expand_path("./target/#{app_module.name}-#{Project.instance.version}.jar")
    file_to_deploy = File.expand_path("./target/#{app_module.name}.jar") unless File.exists? file_to_deploy
    if env.liferay.remote?
      env.liferay.remote.copy_to(file_to_deploy, env.liferay.service.deploy)
    else
      FileUtils.cp(file_to_deploy, env.liferay.service.deploy)
    end
  end
end