2020-07-08 08:09:33 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
module Packages
|
|
|
|
module Maven
|
2020-09-03 08:08:47 -04:00
|
|
|
class CreatePackageService < ::Packages::CreatePackageService
|
2020-07-08 08:09:33 -04:00
|
|
|
def execute
|
|
|
|
app_group, _, app_name = params[:name].rpartition('/')
|
|
|
|
app_group.tr!('/', '.')
|
|
|
|
|
2020-11-16 19:09:16 -05:00
|
|
|
create_package!(:maven,
|
2020-07-08 08:09:33 -04:00
|
|
|
maven_metadatum_attributes: {
|
|
|
|
path: params[:path],
|
|
|
|
app_group: app_group,
|
|
|
|
app_name: app_name,
|
|
|
|
app_version: params[:version]
|
|
|
|
}
|
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|