6

I got lost trying to start with a scala toy example, when running sbt new scala/hello-world.g8 or even sbt new, the program crashes with the following error. Any ideas what might be wrong? Thanks in advance!

(In fact, I am running sbt -java-home /usr/lib/jvm/jdk-8-oracle-x64 new since my system uses older version of jdk by defualt)

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.antlr#ST4;4.0.8: org.sonatype.oss#oss-parent;9!oss-parent.pom(pom.original) origin location must be absolute: file:/home/michal/.m2/repository/org/sonatype/oss/oss-parent/9/oss-parent-9.pom
[warn]  :: com.googlecode.javaewah#JavaEWAH;0.7.9: org.sonatype.oss#oss-parent;5!oss-parent.pom(pom.original) origin location must be absolute: file:/home/michal/.m2/repository/org/sonatype/oss/oss-parent/5/oss-parent-5.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[error] java.lang.RuntimeException: Retrieval of org.scala-sbt.sbt-giter8-resolver:sbt-giter8-resolver:0.1.3 failed.
[error]     at scala.sys.package$.error(package.scala:27)
[error]     at sbt.TemplateCommandUtil$.classpathForInfo(TemplateCommand.scala:119)
[error]     at sbt.TemplateCommandUtil$.infoLoader(TemplateCommand.scala:81)
[error]     at sbt.TemplateCommandUtil$.$anonfun$run$1(TemplateCommand.scala:48)
[error]     at sbt.TemplateCommandUtil$.$anonfun$run$1$adapted(TemplateCommand.scala:47)
[error]     at sbt.TemplateCommandUtil$$$Lambda$1762/658781536.apply(Unknown Source)
...
[error]     at xsbt.boot.Boot$.runImpl(Boot.scala:41)
[error]     at xsbt.boot.Boot$.main(Boot.scala:17)
[error]     at xsbt.boot.Boot.main(Boot.scala)
[error] Retrieval of org.scala-sbt.sbt-giter8-resolver:sbt-giter8-resolver:0.1.3 failed.
[error] Use 'last' for the full log.
SheepPerplexed
  • 1,132
  • 8
  • 20

3 Answers3

7

I had this problem too. I fixed it by blowing away my ~/.ivy2 directory

Joseph Shraibman
  • 462
  • 4
  • 11
0

I had this problem too, had an out-of-date ~/.sbt/repositories file.

Either:

Stefan L
  • 1,529
  • 13
  • 20
  • Eventually the missing sbt-giter8-resolver jar was downloaded from here: `https://repo1.maven.org/maven2/org/scala-sbt/sbt-giter8-resolver/sbt-giter8-resolver_2.12/0.1.3/sbt-giter8-resolver_2.12-0.1.3.jar` – Stefan L Sep 28 '17 at 12:25
0

Create a new user, to have a clean configuration, make sure that it is available for this user JDK and SBT with a "-version". I executed it and everything worked perfectly. Sometimes you have both installed or configured for your user that the programs conflict with each other. P.S. I do not recommend using openjdk in this case.

estergema
  • 11
  • 1