首页 > 代码库 > Play!:SBT代理设置

Play!:SBT代理设置

Play2.3.x,新建一个工程就比较头疼,sbt解析一大堆,很多都被墙了。使用GAE代理:

set HTTP_PROXY=http://localhost:8087activator

还有sbt的包老找不到,估计是官方源出了问题:

sbt.ResolveException: unresolved dependency: com.typesafe.sbt#sbt-native-packager;0.7.4: not found

需要在project/plugins.sbt文件中增加一行:

resolvers += Resolver.url("bintray-sbt-plugins", url("https://dl.bintray.com/sbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns) 

注意前后都要用空行隔开,否则会报格式错误。搞完之后,终于是把sbt的几个包给下下来了:

[info] downloading http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-native-packager/scala_2.10/sbt_0.13/0.7.4/jars/sbt-native-packager.jar ...[info]  [SUCCESSFUL ] com.typesafe.sbt#sbt-native-packager;0.7.4!sbt-native-packager.jar (6472ms)[info] downloading http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-js-engine/scala_2.10/sbt_0.13/1.0.1/jars/sbt-js-engine.jar ...[info]  [SUCCESSFUL ] com.typesafe.sbt#sbt-js-engine;1.0.1!sbt-js-engine.jar (4464ms)[info] downloading http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-webdriver/scala_2.10/sbt_0.13/1.0.0/jars/sbt-webdriver.jar ...[info]  [SUCCESSFUL ] com.typesafe.sbt#sbt-webdriver;1.0.0!sbt-webdriver.jar (4957ms)[info] downloading http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-web/scala_2.10/sbt_0.13/1.0.2/jars/sbt-web.jar ...[info]  [SUCCESSFUL ] com.typesafe.sbt#sbt-web;1.0.2!sbt-web.jar (8086ms)[info] Done updating.

 

Play!:SBT代理设置