rink.attendant.6
rink.attendant.6

Reputation: 46258

Run play without network connection

How can I develop a Play Framework application without a network connection? Every time I run play it tries to connect to some repository to download things:

[info] Loading project definition from C:\Users\Vincent\Documents\GitHub\TestApplication\play\project
[error] Server access Error: Connection reset url=http://repo.typesafe.com/typesafe/ivy-releases/commons-io/commons-io/2.0.1/ivys/ivy.xml
[error] Server access Error: Connection reset url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/commons-io/commons-io/2.0.1/ivys/ivy.xml
[error] Server access Error: Connection reset url=http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-native-packager/scala_2.10/sbt_0.13/0.6.4/ivys/ivy.xml
[error] Server access Error: Connection reset url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-native-packager/scala_2.10/sbt_0.13/0.6.4/ivys/ivy.xml
[error] Server access Error: Connection reset url=http://repo.typesafe.com/typesafe/ivy-releases/org.apache.commons/commons-compress/1.4.1/ivys/ivy.xml
[error] Server access Error: Connection reset url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.apache.commons/commons-compress/1.4.1/ivys/ivy.xml
[error] Server access Error: Connection reset url=http://repo.typesafe.com/typesafe/ivy-releases/org.tukaani/xz/1.0/ivys/ivy.xml
[error] Server access Error: Connection reset url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.tukaani/xz/1.0/ivys/ivy.xml
[error] Server access Error: Connection reset url=http://repo.typesafe.com/typesafe/ivy-releases/org.specs2/specs2_2.10/2.1.1/ivys/ivy.xml
[error] Server access Error: Connection reset url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.specs2/specs2_2.10/2.1.1/ivys/ivy.xml
[error] Server access Error: Connection reset url=http://repo.typesafe.com/typesafe/ivy-releases/org.scalaz/scalaz-concurrent_2.10/7.0.2/ivys/ivy.xml
[error] Server access Error: Connection reset url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scalaz/scalaz-concurrent_2.10/7.0.2/ivys/ivy.xml
[error] Server access Error: Connection reset url=http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/sbt-plugin/scala_2.10/sbt_0.13/2.2.5/jars/sbt-plugin.jar
[error] Server access Error: Connection reset url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/sbt-plugin/scala_2.10/sbt_0.13/2.2.5/jars/sbt-plugin.jar
Terminate batch job (Y/N)? Y

These are the contents of my sbt files:

plugins.sbt

// Comment to get more information during initialization
logLevel := Level.Warn

// 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.0")

build.sbt

name := "TestApplication"

version := "{VERSION}"

libraryDependencies ++= Seq(
  javaJdbc,
  javaEbean,
  cache
)     

play.Project.playJavaSettings

The answer in Play working offline only talks about deploying/distributing a Play application, not developing.

Upvotes: 0

Views: 711

Answers (1)

Marius Soutier
Marius Soutier

Reputation: 11274

You can try setting offline := true in your build.sbt. Most of the time it works.

Upvotes: 1

Related Questions