You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Khristian Alexander Schönrock <de...@gmail.com> on 2010/08/24 18:57:43 UTC

Authenticated access to maven repo

  Hello,
I'm trying out Buildr for some of my company's projects, and I'm already 
speeding up some previously tedious tasks (at least packaging, so far).
For these tasks, I need to access our maven repo to download artifacts, 
but I didn't have much success so far. Our repository manager (archiva) 
only listens to secure connections(https), but, from what I see printed 
in the output, Buildr converts them to regular HTTP.
The output contains this: "Failed to download 
http://repo-url/archiva/repository/snapshots/[path-to-artifact].jar: 
Unauthorized
Buildr aborted!"

How do I specify these settings? Also, how can I import these settings 
from my maven settings.xml file?

Thanks in advance,
Khristian Schönrock

Re: Authenticated access to maven repo

Posted by Antoine Toulme <an...@lunar-ocean.com>.
I think that's the normal way to specify user and password for basic auth.
I'll open a bug for this.

On Fri, Aug 27, 2010 at 00:48, Kristof Jozsa <kr...@gmail.com>wrote:

> should be added to the docs imho by someone who has access.. that's
> quite useful :)
>
> K
>
> 2010/8/27 Khristian Alexander Schönrock <de...@gmail.com>:
> > Update:
> > I found some messages about patches enabling basic auth in http access
> with
> > Buildr, but I couldn't find how to do it anywhere.
> > I did, however, stumble upon this line in a changelog:
> > "request.should_receive(:basic_auth).with('john', 'secret')
> > URI("http://john:secret@#{@host_domain}").read end"
> > So I tried, in my repositories line, the following:
> > repositories.remote << URI.parse("http://user:pass@repo.url..."). And it
> > worked!
> > I hope this helps someone else, because I feel pretty dumb here :)
> >
> > -----Original Message----- From: Khristian Alexander Schönrock
> > Sent: Tuesday, August 24, 2010 1:57 PM
> > To: users@buildr.apache.org
> > Subject: Authenticated access to maven repo
> >
> >  Hello,
> > I'm trying out Buildr for some of my company's projects, and I'm already
> > speeding up some previously tedious tasks (at least packaging, so far).
> > For these tasks, I need to access our maven repo to download artifacts,
> > but I didn't have much success so far. Our repository manager (archiva)
> > only listens to secure connections(https), but, from what I see printed
> > in the output, Buildr converts them to regular HTTP.
> > The output contains this: "Failed to download
> > http://repo-url/archiva/repository/snapshots/[path-to-artifact].jar:
> > Unauthorized
> > Buildr aborted!"
> >
> > How do I specify these settings? Also, how can I import these settings
> > from my maven settings.xml file?
> >
> > Thanks in advance,
> > Khristian Schönrock
> >
>

Re: Authenticated access to maven repo

Posted by Kristof Jozsa <kr...@gmail.com>.
should be added to the docs imho by someone who has access.. that's
quite useful :)

K

2010/8/27 Khristian Alexander Schönrock <de...@gmail.com>:
> Update:
> I found some messages about patches enabling basic auth in http access with
> Buildr, but I couldn't find how to do it anywhere.
> I did, however, stumble upon this line in a changelog:
> "request.should_receive(:basic_auth).with('john', 'secret')
> URI("http://john:secret@#{@host_domain}").read end"
> So I tried, in my repositories line, the following:
> repositories.remote << URI.parse("http://user:pass@repo.url..."). And it
> worked!
> I hope this helps someone else, because I feel pretty dumb here :)
>
> -----Original Message----- From: Khristian Alexander Schönrock
> Sent: Tuesday, August 24, 2010 1:57 PM
> To: users@buildr.apache.org
> Subject: Authenticated access to maven repo
>
>  Hello,
> I'm trying out Buildr for some of my company's projects, and I'm already
> speeding up some previously tedious tasks (at least packaging, so far).
> For these tasks, I need to access our maven repo to download artifacts,
> but I didn't have much success so far. Our repository manager (archiva)
> only listens to secure connections(https), but, from what I see printed
> in the output, Buildr converts them to regular HTTP.
> The output contains this: "Failed to download
> http://repo-url/archiva/repository/snapshots/[path-to-artifact].jar:
> Unauthorized
> Buildr aborted!"
>
> How do I specify these settings? Also, how can I import these settings
> from my maven settings.xml file?
>
> Thanks in advance,
> Khristian Schönrock
>

Re: Authenticated access to maven repo

Posted by Ed Smiley <es...@ebrary.com>.
If you want to use sftp, there's a fix in the next release that makes it
work correctly.  (It's documented, but doesn't yet work.)

2010/8/26 Khristian Alexander Schönrock <de...@gmail.com>

> Update:
> I found some messages about patches enabling basic auth in http access with
> Buildr, but I couldn't find how to do it anywhere.
> I did, however, stumble upon this line in a changelog:
> "request.should_receive(:basic_auth).with('john', 'secret')
> URI("http://john:secret@#{@host_domain}").read end"
> So I tried, in my repositories line, the following:
> repositories.remote << URI.parse("http://user:pass@repo.url..."). And it
> worked!
> I hope this helps someone else, because I feel pretty dumb here :)
>
> -----Original Message----- From: Khristian Alexander Schönrock
> Sent: Tuesday, August 24, 2010 1:57 PM
> To: users@buildr.apache.org
> Subject: Authenticated access to maven repo
>
>
>  Hello,
> I'm trying out Buildr for some of my company's projects, and I'm already
> speeding up some previously tedious tasks (at least packaging, so far).
> For these tasks, I need to access our maven repo to download artifacts,
> but I didn't have much success so far. Our repository manager (archiva)
> only listens to secure connections(https), but, from what I see printed
> in the output, Buildr converts them to regular HTTP.
> The output contains this: "Failed to download
> http://repo-url/archiva/repository/snapshots/[path-to-artifact].jar<http://repo-url/archiva/repository/snapshots/%5Bpath-to-artifact%5D.jar>
> :
> Unauthorized
> Buildr aborted!"
>
> How do I specify these settings? Also, how can I import these settings
> from my maven settings.xml file?
>
> Thanks in advance,
> Khristian Schönrock
>

Re: Authenticated access to maven repo

Posted by Khristian Alexander Schönrock <de...@gmail.com>.
Update:
I found some messages about patches enabling basic auth in http access with 
Buildr, but I couldn't find how to do it anywhere.
I did, however, stumble upon this line in a changelog:
"request.should_receive(:basic_auth).with('john', 'secret') 
URI("http://john:secret@#{@host_domain}").read end"
So I tried, in my repositories line, the following:
repositories.remote << URI.parse("http://user:pass@repo.url..."). And it 
worked!
I hope this helps someone else, because I feel pretty dumb here :)

-----Original Message----- 
From: Khristian Alexander Schönrock
Sent: Tuesday, August 24, 2010 1:57 PM
To: users@buildr.apache.org
Subject: Authenticated access to maven repo

  Hello,
I'm trying out Buildr for some of my company's projects, and I'm already
speeding up some previously tedious tasks (at least packaging, so far).
For these tasks, I need to access our maven repo to download artifacts,
but I didn't have much success so far. Our repository manager (archiva)
only listens to secure connections(https), but, from what I see printed
in the output, Buildr converts them to regular HTTP.
The output contains this: "Failed to download
http://repo-url/archiva/repository/snapshots/[path-to-artifact].jar:
Unauthorized
Buildr aborted!"

How do I specify these settings? Also, how can I import these settings
from my maven settings.xml file?

Thanks in advance,
Khristian Schönrock