This page is no longer maintained — Please continue to the home page at www.scala-lang.org

How do I make SBT use scala snapshot from my own repo?

3 replies
Eugene Burmako
Joined: 2011-09-17,
User offline. Last seen 42 years 45 weeks ago.

A few hours ago I put up my personal Maven repo at
https://bitbucket.org/xeno.by/mavenrepo/raw/master/, uploaded a custom
snapshot of Scala and tried to build scalacheck against it.

After some googling I found out how to make SBT ignore the standard
scala-tools repo and load Scala from a custom repo, and adjusted
build.sbt accordingly: https://bitbucket.org/xeno.by/mavenrepo/src/d651aa74420e/build.sbt.

However, to my surprise, when presented with scalaVersion := "2.10.0-
SNAPSHOT", SBT still went to scala-tools and ignored the custom repo.
To be 100% sure I destroyed all relevant caches (~/.sbt, ~.ivy2) and
tried again - with no luck.

I think that my repository is fine, since: a) it replicates the
structure of scala-tools.org, b) maven-ant is okay with it and happily
downloads custom Scala snapshot from there:
https://bitbucket.org/xeno.by/mavenrepo/src/d651aa74420e/build.xml.

What could be the problem?

vlad.ureche
Joined: 2011-03-17,
User offline. Last seen 1 year 26 weeks ago.
Re: How do I make SBT use scala snapshot from my own repo?

On Wed, Feb 8, 2012 at 1:18 PM, Eugene Burmako <eugene [dot] burmako [at] epfl [dot] ch> wrote:
A few hours ago I put up my personal Maven repo at
https://bitbucket.org/xeno.by/mavenrepo/raw/master/, uploaded a custom
snapshot of Scala and tried to build scalacheck against it.

After some googling I found out how to make SBT ignore the standard
scala-tools repo and load Scala from a custom repo, and adjusted
build.sbt accordingly: https://bitbucket.org/xeno.by/mavenrepo/src/d651aa74420e/build.sbt.

However, to my surprise, when presented with scalaVersion := "2.10.0-
SNAPSHOT", SBT still went to scala-tools and ignored the custom repo.
To be 100% sure I destroyed all relevant caches (~/.sbt, ~.ivy2) and
tried again - with no luck.

I think that my repository is fine, since: a) it replicates the
structure of scala-tools.org, b) maven-ant is okay with it and happily
downloads custom Scala snapshot from there:
https://bitbucket.org/xeno.by/mavenrepo/src/d651aa74420e/build.xml.

What could be the problem?

What if you do
resolvers := Seq("My Snapshots Maven Repository" at "https://bitbucket.org/xeno.by/mavenrepo/raw/master/snapshots/",
                 "My Releases Maven Repository" at "https://bitbucket.org/xeno.by/mavenrepo/raw/master/releases/")
?

(notice the := instead of +=, so your repo will be the only one)

HTH
Vlad
Eugene Burmako
Joined: 2011-09-17,
User offline. Last seen 42 years 45 weeks ago.
Re: How do I make SBT use scala snapshot from my own repo?

Nah, doesn't work.

On Feb 8, 3:15 pm, Vlad Ureche wrote:
> On Wed, Feb 8, 2012 at 1:18 PM, Eugene Burmako wrote:
>
>
>
>
>
> > A few hours ago I put up my personal Maven repo at
> >https://bitbucket.org/xeno.by/mavenrepo/raw/master/, uploaded a custom
> > snapshot of Scala and tried to build scalacheck against it.
>
> > After some googling I found out how to make SBT ignore the standard
> > scala-tools repo and load Scala from a custom repo, and adjusted
> > build.sbt accordingly:
> >https://bitbucket.org/xeno.by/mavenrepo/src/d651aa74420e/build.sbt.
>
> > However, to my surprise, when presented with scalaVersion := "2.10.0-
> > SNAPSHOT", SBT still went to scala-tools and ignored the custom repo.
> > To be 100% sure I destroyed all relevant caches (~/.sbt, ~.ivy2) and
> > tried again - with no luck.
>
> > I think that my repository is fine, since: a) it replicates the
> > structure of scala-tools.org, b) maven-ant is okay with it and happily
> > downloads custom Scala snapshot from there:
> >https://bitbucket.org/xeno.by/mavenrepo/src/d651aa74420e/build.xml.
>
> > What could be the problem?
>
> What if you do
>
> resolvers := Seq("My Snapshots Maven Repository" at
> "https://bitbucket.org/xeno.by/mavenrepo/raw/master/snapshots/",
>                  "My Releases Maven Repository" at
> "https://bitbucket.org/xeno.by/mavenrepo/raw/master/releases/")
>
> ?
>
> (notice the := instead of +=, so your repo will be the only one)
>
> HTH
> Vlad

extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: How do I make SBT use scala snapshot from my own repo?


On Wed, Feb 8, 2012 at 4:18 AM, Eugene Burmako <eugene [dot] burmako [at] epfl [dot] ch> wrote:
A few hours ago I put up my personal Maven repo at
https://bitbucket.org/xeno.by/mavenrepo/raw/master/, uploaded a custom
snapshot of Scala and tried to build scalacheck against it.

Is the "maven repo" part of this a requirement? Because the easy way to use a custom version of scala is
scalaHome := Some(file("/path/to/scala"))
I think to put it in a repository you will have to unpack the launcher, edit sbt/sbt.boot.properties, and repack the launcher.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland