class KPM::BaseArtifact
def artifact_info(logger, coordinate_map, overrides={}, ssl_verify=true)
def artifact_info(logger, coordinate_map, overrides={}, ssl_verify=true) info = { :skipped => false } coordinates = KPM::Coordinates.build_coordinates(coordinate_map) begin nexus_info = nexus_remote(overrides, ssl_verify).get_artifact_info(coordinates) rescue NexusCli::ArtifactMalformedException => e raise NexusCli::NexusCliError.new("Invalid coordinates #{coordinate_map}") rescue NexusCli::NexusCliError => e logger.warn("Unable to retrieve coordinates #{coordinate_map}") raise e end xml = REXML::Document.new(nexus_info) info[:sha1] = xml.elements['//sha1'].text unless xml.elements['//sha1'].nil? info[:version] = xml.elements['//version'].text unless xml.elements['//version'].nil? info[:repository_path] = xml.elements['//repositoryPath'].text unless xml.elements['//repositoryPath'].nil? info[:is_tgz] = info[:repository_path].end_with?('.tar.gz') || info[:repository_path].end_with?('.tgz') info end