Class: KPM::BaseArtifact

Inherits:
Object
  • Object
show all
Defined in:
lib/kpm/base_artifact.rb

Constant Summary collapse

KILLBILL_GROUP_ID =
'org.kill-bill.billing'
KILLBILL_ARTIFACT_ID =
'killbill-profiles-killbill'
KILLBILL_PACKAGING =
'war'
KILLBILL_CLASSIFIER =
nil
KILLPAY_ARTIFACT_ID =
'killbill-profiles-killpay'
KILLPAY_PACKAGING =
'war'
KILLPAY_CLASSIFIER =
nil
KILLBILL_JAVA_PLUGIN_GROUP_ID =
'org.kill-bill.billing.plugin.java'
KILLBILL_JAVA_PLUGIN_PACKAGING =
'jar'
KILLBILL_JAVA_PLUGIN_CLASSIFIER =
nil
KILLBILL_RUBY_PLUGIN_GROUP_ID =
'org.kill-bill.billing.plugin.ruby'
KILLBILL_RUBY_PLUGIN_PACKAGING =
'tar.gz'
KILLBILL_RUBY_PLUGIN_CLASSIFIER =
nil
KAUI_GROUP_ID =
'org.kill-bill.billing.kaui'
KAUI_ARTIFACT_ID =
'kaui-standalone'
KAUI_PACKAGING =
'war'
KAUI_CLASSIFIER =
nil

Class Method Summary collapse

Class Method Details

.nexus_defaultsObject



53
54
55
56
57
58
# File 'lib/kpm/base_artifact.rb', line 53

def nexus_defaults
  {
      url:        'https://oss.sonatype.org',
      repository: 'releases'
  }
end

.nexus_remote(overrides = {}, ssl_verify = true, logger = nil) ⇒ Object



46
47
48
49
50
51
# File 'lib/kpm/base_artifact.rb', line 46

def nexus_remote(overrides={}, ssl_verify=true, logger=nil)
  # overrides typically comes from the kpm.yml where we expect keys as String
  overrides_sym = (overrides || {}).each_with_object({}) {|(k,v), h| h[k.to_sym] = v}
  nexus_config = nexus_defaults.merge(overrides_sym)
  nexus_remote ||= KPM::NexusFacade::RemoteFactory.create(nexus_config, ssl_verify, logger)
end

.pull(logger, group_id, artifact_id, packaging = 'jar', classifier = nil, version = 'LATEST', destination_path = nil, sha1_file = nil, force_download = false, verify_sha1 = true, overrides = {}, ssl_verify = true) ⇒ Object



37
38
39
40
# File 'lib/kpm/base_artifact.rb', line 37

def pull(logger, group_id, artifact_id, packaging='jar', classifier=nil, version='LATEST', destination_path=nil, sha1_file=nil, force_download=false, verify_sha1=true, overrides={}, ssl_verify=true)
  coordinate_map = {:group_id => group_id, :artifact_id => artifact_id, :packaging => packaging, :classifier => classifier, :version => version}
  pull_and_put_in_place(logger, coordinate_map, nil, destination_path, false, sha1_file, force_download, verify_sha1, overrides, ssl_verify)
end

.pull_from_fs(logger, file_path, destination_path = nil) ⇒ Object



42
43
44
# File 'lib/kpm/base_artifact.rb', line 42

def pull_from_fs(logger, file_path, destination_path=nil)
  pull_from_fs_and_put_in_place(logger, file_path, destination_path)
end