lib/java/artifact.rb in buildr-1.2.0 vs lib/java/artifact.rb in buildr-1.2.1
- old
+ new
@@ -98,11 +98,11 @@
# Uploads the artifact, its POM and digital signatures to remote server.
#
# In the first form, uses the upload options specified by repositories.release_to.
# In the second form, uses a URL that includes all the relevant information.
# In the third form, uses a hash with the options :url, :username, :password,
- # :proxy and :permissions. All but :url are optional.
+ # and :permissions. All but :url are optional.
def upload(upload_to = nil)
# Where do we release to?
upload_to ||= Buildr.repositories.release_to
upload_to = { :url=>upload_to } unless Hash === upload_to
raise ArgumentError, "Don't know where to upload, perhaps you forgot to set repositories.release_to" if upload_to[:url].blank?
@@ -115,11 +115,11 @@
uri.password = upload_to[:password] if upload_to[:password]
# Upload artifact relative to base URL, need to create path before uploading.
puts "Deploying #{to_spec}" if verbose
path = group.gsub(".", "/") + "/#{id}/#{version}/#{File.basename(name)}"
- URI.upload uri + path, name, :proxy=>Buildr.options.proxy, :permissions=>upload_to[:permissions]
+ URI.upload uri + path, name, :permissions=>upload_to[:permissions]
end
protected
# Apply specification to this artifact.
@@ -273,11 +273,11 @@
repo_url = URI.parse(repo_url) unless URI === repo_url
repo_url.path += "/" unless repo_url.path[-1] == "/"
begin
path = group.gsub(".", "/") + "/#{id}/#{version}/#{File.basename(name)}"
mkpath File.dirname(name), :verbose=>false
- URI.download repo_url + path, name, :proxy=>Buildr.options.proxy
+ URI.download repo_url + path, name
true
rescue URI::NotFoundError
false
rescue Exception=>error
puts error if verbose
@@ -394,12 +394,12 @@
path = spec[:group].gsub(".", "/") +
"/#{spec[:id]}/#{spec[:version]}/#{Artifact.hash_to_file_name(spec)}"
mkpath File.dirname(filename), :verbose=>false
# We absolutely need the POM, so make sure we download it before the artifact
# (unless the artifact is a POM).
- URI.download repo_url + path.ext("pom"), name.ext("pom"), :proxy=>Buildr.options.proxy unless type == :pom
- URI.download repo_url + path, filename, :proxy=>Buildr.options.proxy
+ URI.download repo_url + path.ext("pom"), filename.ext("pom") unless type == :pom
+ URI.download repo_url + path, filename
true
rescue URI::NotFoundError
false
rescue Exception=>error
puts error if verbose
@@ -582,16 +582,16 @@
if arg.respond_to?(:to_spec)
# Upload artifact relative to base URL, need to create path before uploading.
puts "Deploying #{arg.to_spec}" if verbose
spec = arg.to_spec_hash
path = spec[:group].gsub(".", "/") + "/#{spec[:id]}/#{spec[:version]}/" + Artifact.hash_to_file_name(spec)
- URI.upload uri + path, arg.to_s, :proxy=>Buildr.options.proxy, :permissions=>deploy_to[:permissions]
+ URI.upload uri + path, arg.to_s, :permissions=>deploy_to[:permissions]
else
# Upload file to URL.
puts "Deploying #{arg}" if verbose
path = File.basename(args.to_s)
path = File.join(options[:path], path) if options[:path]
- URI.upload uri + path, arg.to_s, :proxy=>Buildr.options.proxy, :permissions=>deploy_to[:permissions]
+ URI.upload uri + path, arg.to_s, :permissions=>deploy_to[:permissions]
end
end
end
end