HelloWorld example (sbt new sbt / scala -seed.g8) does not work

After installing sbt version 0.13.13 (with brew) on Mac 10.12.2 with scala 2.12.0, I tried the first example in the documentation (according to the topic sbt new sbt/scala-seed.g8 ).

Result:

 ... [info] Set current project to hello (in build file:/scratch/hello/) SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. org.eclipse.jgit.api.errors.TransportException: http://github.com/sbt/scala-seed.g8.git: 301 Moved Permanently at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139) ... 

I am brand new on sbt, just wondering if this is a problem due to my inexperience ...

+7
scala sbt
source share
3 answers

Run it as a git url parameter:

 sbt new https://github.com/sbt/scala-seed.g8 

No need to change git configuration.

+11
source share

I had the same problem. Even if you can access http://github.com/sbt/scala-seed.g8.git , your git 9418 port may still be blocked when using sbt or g8. Try running the line below on the command line. It will switch the port that git uses for https: //, which is usually not blocked.

 git config --global url."https://".insteadOf git:// 

It just adds the following lines to your .gitconfig

 [url "https://"] insteadOf = git:// 

so you can easily remove it if that is not a problem.

+23
source share

Try using

 sbt new scala/scala-seed.g8 

A predefined template is required in git, but when using one of the sample templates from git, it will create an sbt project with a minimal scala string. And to name a project, predefined templates usually provide you with the ability to do this.

+1
source share

All Articles