sbt with internal maven repository

175 views
Skip to first unread message

Cristi

unread,
May 16, 2011, 10:06:40 PM5/16/11
to simple-build-tool
Hi, I have the following usecase: I maintain a maven repository
(Apache Archiva is the implementation) on my intranet that mirrors a
lot of other public repos (including the scala one). I have managed to
get the 3rd party dependencies via that repository but there is one
question: how can I configure sbt to download everything by default
from that repo (first time it runs it gets everything from the
Internet).

I think the case I presented is pretty common in for a company
intranet - can a quick solution be presented on the wiki?

PS: I am very familiar with apache maven, but somehow I find ivy
pretty confusing.

Mark Harrah

unread,
May 17, 2011, 2:25:21 PM5/17/11
to simple-b...@googlegroups.com
On Mon, 16 May 2011 19:06:40 -0700 (PDT)
Cristi <mcvco...@gmail.com> wrote:

> Hi, I have the following usecase: I maintain a maven repository
> (Apache Archiva is the implementation) on my intranet that mirrors a
> lot of other public repos (including the scala one). I have managed to
> get the 3rd party dependencies via that repository but there is one
> question: how can I configure sbt to download everything by default
> from that repo (first time it runs it gets everything from the
> Internet).

Edit the [repositories] section of the /sbt/sbt.boot.properties file in the launcher jar. Remove repositories you don't want and add ones you do.

Full details are here:
http://code.google.com/p/simple-build-tool/wiki/GeneralizedLauncher

In a project definition, override the default repositories by directly overriding ivyRepositories:
http://code.google.com/p/simple-build-tool/wiki/LibraryManagement#Direct_Override

-Mark

cristi

unread,
May 17, 2011, 8:39:13 PM5/17/11
to simple-b...@googlegroups.com
Thanks a lot! The link presented whatever I needed to know, but some
other issue came up: the standardization of certain repositories.
Again, I come from a maven world, and usually I use a repository manager
(I use apache archiva). The central and the scala* repositories are
"standard" maven 2 repositories, but http://databinder.net/repo/ doesn't
follow the maven convention.

The question that I have here is if somebody has knowledge of a
repository manager that can support the level of configurability you use
for databinder.net. I know that somehow it would be possible to have a
share drive where all the artifacts, but having them indexed and managed
by a tool that sits on top of a flat share is really useful (security,
for example is an important concern).

Thanks!
Cristi

Mark Harrah

unread,
May 17, 2011, 10:21:33 PM5/17/11
to simple-b...@googlegroups.com
Hi Cristi,

On Tue, 17 May 2011 20:39:13 -0400
cristi <mcvco...@gmail.com> wrote:

> Thanks a lot! The link presented whatever I needed to know, but some
> other issue came up: the standardization of certain repositories.
> Again, I come from a maven world, and usually I use a repository manager
> (I use apache archiva). The central and the scala* repositories are
> "standard" maven 2 repositories, but http://databinder.net/repo/ doesn't
> follow the maven convention.

Right, at least not for sbt artifacts. sbt uses an Ivy layout and doesn't publish poms.

> The question that I have here is if somebody has knowledge of a
> repository manager that can support the level of configurability you use
> for databinder.net. I know that somehow it would be possible to have a
> share drive where all the artifacts, but having them indexed and managed
> by a tool that sits on top of a flat share is really useful (security,
> for example is an important concern).

We are using Artifactory through their cloud offering (http://repo.typesafe.com) and we are rather happy with it so far. I couldn't tell you how it compares to other repository managers, though.

This will be the location for future sbt binaries, but it will still be an Ivy layout.

-Mark

Reply all
Reply to author
Forward
0 new messages