lib/kpm/killbill_server_artifact.rb in kpm-0.0.3 vs lib/kpm/killbill_server_artifact.rb in kpm-0.0.4
- old
+ new
@@ -1,22 +1,29 @@
require 'rexml/document'
require 'set'
module KPM
class KillbillServerArtifact < BaseArtifact
- class << self
- KILLBILL_SERVER_ARTIFACT_ID = 'killbill-server'
- KILLBILL_SERVER_WAR = "#{KILLBILL_GROUP_ID}:#{KILLBILL_SERVER_ARTIFACT_ID}:war:jar-with-dependencies"
+ KILLBILL_ARTIFACT_ID = 'killbill-profiles-killbill'
+ KILLBILL_PACKAGING = 'war'
+ KILLBILL_CLASSIFIER = 'jar-with-dependencies'
- def pull(version='LATEST', destination=nil, overrides={}, ssl_verify=true)
- nexus_remote(overrides, ssl_verify).pull_artifact("#{KILLBILL_SERVER_WAR}:#{version}", destination)
+ KILLPAY_ARTIFACT_ID = 'killbill-profiles-killpay'
+ KILLPAY_PACKAGING = 'war'
+ KILLPAY_CLASSIFIER = 'jar-with-dependencies'
+
+ class << self
+ def pull(group_id, artifact_id, packaging=BaseArtifact::KILLBILL_PACKAGING, classifier=BaseArtifact::KILLBILL_CLASSIFIER, version='LATEST', destination=nil, overrides={}, ssl_verify=true)
+ coordinates = build_coordinates(group_id, artifact_id, packaging, classifier, version)
+ nexus_remote(overrides, ssl_verify).pull_artifact(coordinates, destination)
end
- def versions(overrides={}, ssl_verify=true)
- response = REXML::Document.new nexus_remote(overrides, ssl_verify).search_for_artifacts(KILLBILL_SERVER_WAR)
+ def versions(group_id, artifact_id, packaging=BaseArtifact::KILLBILL_PACKAGING, classifier=BaseArtifact::KILLBILL_CLASSIFIER, overrides={}, ssl_verify=true)
+ coordinates = build_coordinates(group_id, artifact_id, packaging, classifier)
+ response = REXML::Document.new nexus_remote(overrides, ssl_verify).search_for_artifacts(coordinates)
versions = SortedSet.new
response.elements.each("search-results/data/artifact/version") { |element| versions << element.text }
versions
end
end
end
-end
\ No newline at end of file
+end