Class: Rays::Worker::Generator::Maven
- Inherits:
-
BaseWorker
- Object
- BaseWorker
- Rays::Worker::Generator::Maven
- Includes:
- Singleton
- Defined in:
- lib/rays/workers/generator.rb
Overview
Liferay Maven generator
Instance Method Summary collapse
Methods inherited from BaseWorker
Instance Method Details
#create(app_module) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/rays/workers/generator.rb', line 33 def create(app_module) raise RaysException.new("Don't know how to create #{app_module.type}/#{app_module.name}.") if app_module.archetype_name.nil? create_cmd = "#{$rays_config.mvn} archetype:generate" << " -DarchetypeGroupId=com.liferay.maven.archetypes" << " -DarchetypeArtifactId=#{app_module.archetype_name}" << " -DarchetypeVersion=#{Project.instance.liferay}" << " -DgroupId=#{Project.instance.package}.#{app_module.type}" << " -DartifactId=#{app_module.name}" << " -Dversion=#{Project.instance.version}" << " -Dpackaging=war -B" rays_exec(create_cmd) Utils::FileUtils.find_down(app_module.path, 'pom\.xml').each do |pom_file| MavenUtil.process_pom pom_file end end |