question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"No scala version specified" when upgrading from 0.13.0 to 0.13.1

See original GitHub issue

I tried to upgrade from sbt 0.13.0 to 0.13.1. I’m using Windows 7 64bit. I tried the following in cygwin and in the normal windows command prompt.

I have a similar problem as mentioned here on stackoverflow: http://stackoverflow.com/questions/21658279/error-during-sbt-execution-no-scala-version-specified-or-detected-with-sbt-fr

$ tools/sbt-0.13.1/bin/sbt
Error during sbt execution: No Scala version specified or detected

In my sbt.boot.properties I set scala version to ${sbt.scala.version-auto} (like for 0.13.0).

When I set the scala version to a fixed version (2.10.3) I get another error:

$ tools/sbt-0.13.1/bin/sbt
Getting org.scala-sbt sbt 0.13.1 ...
:: retrieving :: org.scala-sbt#boot-app
        confs: [default]
        0 artifacts copied, 1 already retrieved (0kB/14ms)
Error: Could not retrieve sbt 0.13.1: missing sbt.xMain

The behaviour is the same when I start sbt in directories with and without an sbt project in it.

So the question is: Did something change regarding scala version handling between the two versions?

Cheers, Christian

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:101 (44 by maintainers)

github_iconTop GitHub Comments

1reaction
cowboy129commented, Apr 17, 2014

I found this problem is related to ~/.sbt/repositories.

If I put this in ~/.sbt/repositories

[repositories]
  local
  type-safe-ivy-releases: http://repo.typesafe.com/typesafe/ivy-releases/

sbt will try to retrive sbt.jar from http//repo.typesafe.com/typesafe/ivy-releases/org/scala-sbt/sbt/0.13.2-RC2/sbt-0.13.2-RC2.jar:

➜  akka git:(master) sbt
Getting org.scala-sbt sbt 0.13.2-RC2 ...
downloading http://repo.typesafe.com/typesafe/ivy-releases/org/scala-sbt/sbt/0.13.2-RC2/sbt-0.13.2-RC2.jar ...
    [SUCCESSFUL ] org.scala-sbt#sbt;0.13.2-RC2!sbt.jar (1567ms)
:: retrieving :: org.scala-sbt#boot-app
    confs: [default]
    1 artifacts copied, 0 already retrieved (20kB/27ms)
Error during sbt execution: No Scala version specified or detected

and the directory structure of ~/.sbt/boot may be incorrect:

➜  boot  ll
total 24
drwxr-xr-x  3 xingrun  staff   102B  4 17 13:02 other
-rw-r--r--  1 xingrun  staff     0B  4 17 13:01 sbt.boot.lock
-rw-r--r--  1 xingrun  staff    12K  4 17 13:02 update.log

After I remove ~/.sbt/repositories sbt will try to retrive sbt.jar from http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.2-RC2/jars/sbt.jar:

➜  akka git:(master) sbt
Getting org.scala-sbt sbt 0.13.2-RC2 ...
downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.2-RC2/jars/sbt.jar ...
    [SUCCESSFUL ] org.scala-sbt#sbt;0.13.2-RC2!sbt.jar (1966ms)
:: retrieving :: org.scala-sbt#boot-app
    confs: [default]
    43 artifacts copied, 0 already retrieved (13080kB/48ms)
Getting Scala 2.10.3 (for sbt)...
:: retrieving :: org.scala-sbt#boot-scala
    confs: [default]
    5 artifacts copied, 0 already retrieved (24447kB/33ms)
[info] Loading global plugins from /Users/xingrun/.sbt/0.13/plugins
[info] Loading project definition from /Users/xingrun/Development/akka/project
[info] Set current project to akka (in build file:/Users/xingrun/Development/akka/)
akka >

and the directory structure of ~/.sbt/boot is correct now:

➜  boot  ll
total 48
-rw-r--r--  1 xingrun  staff     0B  4 17 13:05 sbt.boot.lock
drwxr-xr-x  4 xingrun  staff   136B  4 17 13:05 scala-2.10.3
-rw-r--r--  1 xingrun  staff    21K  4 17 13:05 update.log

Hope it helps.

1reaction
a1k0ncommented, Feb 27, 2014

I’m seeing exactly the same thing, except under Linux. sbt works fine under normal circumstances, but if I try to set up an isolated environment with a custom repo, ivy home, and boot directory, it does exactly the same as above – won’t detect a scala version, and if I specify one, can’t find xMain. My custom boot properties file is basically the same as the above except with a different custom repo.

Downgrading to 0.13.0 fixed everything, so that’s what I did for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Error during sbt execution: No Scala version specified or ...
Its not an issue with the upgrade of 0.13.* version. Its the repository cache thats causing the issue. There are possibilities where you...
Read more >
sbt Reference Manual — Migrating from sbt 0.13.x
Now subMissingOk(...) function can be implemented in sbt version specific way. Migrating to slash syntax. In sbt 0.13 keys were scoped with 2...
Read more >
Migrating SBT Plugins from 0.13.x to 1.x
Feel free to change the Scala version to the latest 2.12.x version and SBT to the latest 1.x version when applying these settings....
Read more >
sbt Reference Manual — sbt 0.13.0 - 0.13.2
Alters how scala dependencies are tracked, reducing number of recompiles necessary. ... sbt 0.13.1. The Scala version for sbt and sbt plugins is...
Read more >
Play 2.8 Migration Guide - Documentation
Update the Play version number in project/plugins.sbt : ... Play 2.8 support Scala 2.12 and 2.13, but not 2.11, which has reached its...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found