Class: Rays::Worker::Builder::Content

Inherits:
Rays::Worker::BaseWorker show all
Includes:
Singleton
Defined in:
lib/rays/workers/builder.rb

Overview

Content builder

Instance Method Summary collapse

Methods inherited from Rays::Worker::BaseWorker

#execute, register

Instance Method Details

#build(app_module, skip_test = false) ⇒ Object



47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/rays/workers/builder.rb', line 47

def build(app_module, skip_test = false)
  execute('build', app_module) do
    # replace liferay server port
    properties_file = Rays::Utils::FileUtils::PropertiesFile.new "#{app_module.path}/src/main/resources/configuration.properties"
    properties_file.properties['server.port'] = $rays_config.environment.liferay.port
    properties_file.write

    test_args = ''
    test_args = '-Dmaven.skip.tests=true' if skip_test

    rays_exec("cd #{app_module.path} && #{$rays_config.mvn} clean assembly:single package #{test_args}")
  end
end