lib/kpm/base_artifact.rb in kpm-0.1.5 vs lib/kpm/base_artifact.rb in kpm-0.1.6
- old
+ new
@@ -69,11 +69,11 @@
# Return early if there's nothing to do
if !force_download && skip_if_exists(artifact_info, coordinates, sha1_file)
logger.info " Skipping installation of #{coordinates} to #{artifact_info[:file_path]}, file already exists"
# We need to do a bit of magic to make sure that artifact_info[:bundle_dir] is correctly populated when we bail early
- if artifact_info[:is_tgz]
+ if artifact_info[:is_tgz] && coordinate_map[:artifact_id] != 'killbill-platform-osgi-bundles-defaultbundles'
plugin_dir = File.split(artifact_info[:dir_name])[0]
plugins_manager = PluginsManager.new(plugin_dir, logger)
artifact_id = coordinates.split(':')[1]
plugin_name = plugins_manager.guess_plugin_name(artifact_id)
if plugin_name.nil?
@@ -88,12 +88,10 @@
artifact_info[:skipped] = true
return artifact_info
end
-
-
# Create the destination directory
FileUtils.mkdir_p(artifact_info[:dir_name])
# Download the artifact in a temporary directory in case of failures
Dir.mktmpdir do |tmp_destination_dir|
@@ -136,22 +134,21 @@
artifact_info
end
def skip_if_exists(artifact_info, coordinates, sha1_file)
-
# Unclear if this is even possible
return false if artifact_info[:sha1].nil?
# Check entry in sha1_file if exists
if sha1_file && File.exists?(sha1_file)
sha1_checker = Sha1Checker.from_file(sha1_file)
local_sha1 = sha1_checker.sha1(coordinates)
return true if local_sha1 == artifact_info[:sha1]
end
- # If not using sha1_file mechanism, exit early if file_path odes not exist or is a directory
+ # If not using sha1_file mechanism, exit early if file_path does not exist or is a directory
if !File.exists?(artifact_info[:file_path]) ||
File.directory?(artifact_info[:file_path])
return false
end
@@ -238,10 +235,9 @@
end
res
end
def build_coordinates(coordinate_map)
-
group_id = coordinate_map[:group_id]
artifact_id = coordinate_map[:artifact_id]
packaging = coordinate_map[:packaging]
classifier = coordinate_map[:classifier]
version = coordinate_map[:version]