Retrieving dependencies from maven nexus repo which requires authentication

787 views
Skip to first unread message

chilang

unread,
Oct 19, 2010, 12:57:40 PM10/19/10
to simple-build-tool
Hi,

I have an internal Maven/Nexus repo which requires authentication
(basic http username/password) to retrieve dependencies from.
Is there a way to specify this with SBT ?

Thanks in advance,
Chi Lang

Mark Harrah

unread,
Oct 21, 2010, 9:39:32 AM10/21/10
to simple-b...@googlegroups.com
On Tuesday, October 19, 2010 12:57:40 pm chilang wrote:
> Hi,
>
> I have an internal Maven/Nexus repo which requires authentication
> (basic http username/password) to retrieve dependencies from.
> Is there a way to specify this with SBT ?

I don't remember trying this specifically, but I think it should be the same as
specifying credentials for publishing [1].

-Mark

[1] http://code.google.com/p/simple-build-tool/wiki/Publishing

bryanjswift

unread,
Dec 2, 2010, 6:09:52 PM12/2/10
to simple-build-tool
chilang,

Did this work for you? I'm running into a similar issue but I'm not
sure if it's because I require a non standard (not 80) port number.

- Bryan

chilang

unread,
Dec 3, 2010, 6:28:17 AM12/3/10
to simple-build-tool
Hi,

I have something like the following in my Project class and it works:

Credentials.add("My Nexus", "nexus-server", "username", "password")
override def repositories = Set("my-nexus" at "http://nexus-server:
8081/nexus/content/groups/public")

Chi Lang

Daniel Cox

unread,
Sep 12, 2013, 6:32:58 PM9/12/13
to simple-b...@googlegroups.com, chi...@gmail.com
What if your password is encrypted using Maven's password encryption and tucked away in ~/.m2/settings.xml, and you want sbt to reuse that? It would be a non-starter at my company to have to store credentials in the build.sbt of each of our projects.

-Daniel
Reply all
Reply to author
Forward
0 new messages