Re: Auth for Buildr repositories.remote

2011-03-17 Thread Michael Guymon


I created a patch so that

repositories.remote  { :url = 'https://a.secure.repo/maven2', 
:username = 'blah', :password = 'blah' }


will work for http basic auth. When an artifact is downloaded, the auth 
information is passed to the HTTP transport.


https://issues.apache.org/jira/browse/BUILDR-577

There might be an issue with the patch, since it changes the format of 
repositories.remote. Instead of just being a String, it is stored as a 
hash {:url = URI} or with optional auth {:url = URI, :username = 
String, :password = String}. How horrible is this for backwards 
compatibility?


thanks,
Michael

On 03/10/2011 12:43 PM, Alex Boisvert wrote:

Hi Michael,

I think it's a good idea and I don't think it would be that much work. 
 Use of repositories.remote for actual downloading seems to be fairly 
localized in buildr/packaging/artifact.rb.


alex


On Thu, Mar 10, 2011 at 8:56 AM, Michael Guymon 
michael.guy...@gmail.com mailto:michael.guy...@gmail.com wrote:



So I am interested in getting repositories.remote to support auth.
The goal is to have buildr deploy to private maven repo's I have a
work. What I would like to do is have the following be valid:

   repositories.remote  'https://a.secure.repo/maven2'
   repositories.remote  { :url = 'https://a.secure.repo/maven2' }
   repositories.remote  { :url =
'https://a.secure.repo/maven2', :username = 'blah', :password =
'blah' }

and possibly

   repositories.remote  { :url =
'https://a.secure.repo/maven2', :priv_key = 'file' }


I have sourced dived a little to see how repositories.remote is
used, but I am not sure if this change would be a colossal PITA.
If someone has a better/easier solution I would love to hear it.

thanks,
Michael







Re: Auth for Buildr repositories.remote

2011-03-10 Thread Alex Boisvert
Hi Michael,

I think it's a good idea and I don't think it would be that much work.  Use
of repositories.remote for actual downloading seems to be fairly localized
in buildr/packaging/artifact.rb.

alex


On Thu, Mar 10, 2011 at 8:56 AM, Michael Guymon michael.guy...@gmail.comwrote:


 So I am interested in getting repositories.remote to support auth. The goal
 is to have buildr deploy to private maven repo's I have a work. What I would
 like to do is have the following be valid:

repositories.remote  'https://a.secure.repo/maven2'
repositories.remote  { :url = 'https://a.secure.repo/maven2' }
repositories.remote  { :url = 'https://a.secure.repo/maven2',
 :username = 'blah', :password = 'blah' }

 and possibly

repositories.remote  { :url = 'https://a.secure.repo/maven2',
 :priv_key = 'file' }


 I have sourced dived a little to see how repositories.remote is used, but I
 am not sure if this change would be a colossal PITA. If someone has a
 better/easier solution I would love to hear it.

 thanks,
 Michael