sophie
sophie

Reputation: 33

Why need to get org.scalasbt sbt when I run activator run cmd?

Downloaded and installed activator-1.2.12 without a problem in Windows OS. when I create a new paly framework project, and run the "activator run" cmd in the cmd line, it need get org.scalasbt sbt, and download a lot of jars like download all the world, very slowly; Is there something wrong? Need I just wait the download complete if I want to continue run the project? Thanks~!

Upvotes: 2

Views: 810

Answers (2)

Salem
Salem

Reputation: 12986

If you downloaded the minimal version of activator it is normal for it to take a lot of time to download all the dependencies. This will only happen the first time you start your project. From there it will use a cached version.

If you are using the full version then that's not normal. I remember Activator had a bug that made it download everything again even when the deps where available in the Activator package. Despite it being marked as fixed some people still complain this happens in Windows. If this is your case you may comment on that issue.

Unless you are on a very very slow connection the best solution is to just wait.

EDIT:

You can also try to copy the files from activator to your ivy cache. In Linux machines ivy cache is store in ~/.ivy2/cache, in Windows I dont know but search for a folder with this name in your home folder. Then you just have to copy all the folders from activator-1.2.12/repository to .ivy2/cache/. It will still need to download some files...

Upvotes: 1

punkdata
punkdata

Reputation: 885

actually you don't really need the play/activator bloat to create and compile play apps.

  • Install sbt
  • Create a new folder for your app & a sub folder called project $ mkdir -p newapp/project
  • Create a sbt build script in the newapp/project folder $ vi newapp/project/plugins.sbt
  • Add the play framework repos (shown below) to your plugins.sbt file be sure to update the x in the addSbtPlugin version number to your desired version. Example: "2.2.3"
// The Typesafe repository  

resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

// Use the Play sbt plugin for Play projects

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.x")
  • Create a new file called build.sbt in the root of yournewapp folder $ vi build.sbt
  • Add the following build information to your build.sbt file but remember to update some of the parameter values to match your app's values:

import play.Project._

name := "My first application"

version := "1.0"

playScalaSettings

Launch your new play app

$ cd newapp
$ sbt

After the project is loaded & dependencies are fetched you will have a fully functional play app with out having to download the bloated Activator packages.

Upvotes: 0

Related Questions