sbt publish to a local nexus repo

413 views
Skip to first unread message

deni

unread,
Jul 18, 2011, 8:58:56 AM7/18/11
to simple-build-tool
I am unable to get sbt to publish artifacts to a local nexus repo with
authentication.
Mind you, if i turn off the security setting in nexus the publishing
goes fine but no authentication is used.

I think this problem has something to do with Nexus authentication
realms because sbt does not even send any credentials to the nexus
server so the whole publish procedure fails.
I all out of ideas as to what to do to fix this so I'd appreciate any
help.

Tnx.

-Deni

Jason Zaugg

unread,
Jul 18, 2011, 9:29:28 AM7/18/11
to simple-b...@googlegroups.com
What have you tried? What version of SBT are you using?

-jason 

deni

unread,
Jul 18, 2011, 9:31:56 AM7/18/11
to simple-build-tool
I am using sbt version 0.7.7.
and i have tried following the instructions listed here:
http://code.google.com/p/simple-build-tool/wiki/Publishing

deni

unread,
Jul 19, 2011, 5:21:53 AM7/19/11
to simple-build-tool
Okay so I figured out what the problem was. If I followed the
instructions more closely on http://code.google.com/p/simple-build-tool/wiki/Publishing
everything would have worked out fine.
Although, a little more explanation on the wiki wouldn't hurt.

Either you are using the Credentials.add function:

Credentials.add("Sonatype Nexus Repository Manager", "nexus.scala-
tools.org", "admin", "admin123")

or reading a .credentials file:

Credentials(Path.userHome / ".ivy2" / ".credentials", log)


".credentials" content:

realm=Sonatype Nexus Repository Manager
host=nexus.scala-tools.org
user=admin
password=admin123

the REALM parameter NEEDS to be EXACTLY "Sonatype Nexus Repository
Manager". Or the authentication process will NOT work. More precisely,
the nexus server will get confused and will not receive the
authentication information and will therefore try to authenticate you
as the anonymous user, which has no deployment permissions.

You can configure the realm parameter in the Nexus web.xml
configuration file (contentAuthcBasic.applicationName).


Regards,

Deni Bertovic



On Jul 18, 3:31 pm, deni <bertovic.d...@gmail.com> wrote:
> I  am usingsbtversion 0.7.7.
> and i have tried following the instructions listed here:http://code.google.com/p/simple-build-tool/wiki/Publishing
>
> On Jul 18, 3:29 pm, Jason Zaugg <jza...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Am Montag, 18. Juli 2011 14:58:56 UTC+2 schrieb deni:
>
> > > I am unable to getsbttopublishartifacts to alocalnexusrepo with
> > > authentication.
> > > Mind you, if i turn off the security setting innexusthe publishing
> > > goes fine but no authentication is used.
>
> > > I think this problem  has something to do withNexusauthentication
> > > realms becausesbtdoes not even send any credentials to thenexus
> > > server so the wholepublishprocedure fails.
Reply all
Reply to author
Forward
0 new messages