Scala + Activator + Sbt 搭建Play framework框架

1.下载Typesafe Activator ,我下载的是1.3.7, 地址:typesafe 官网

2.  配置Path: activator(E:\develop\activator-1.3.7)和sbt(E:\develop\sbt\bin)

3.使用typesafe 创建应用。2种方式:

  (1)CMD:    activator new my-first-app  play-java 

  (2)activator ui  

 

4.  新建repository配置文件(任意位置)

我的位置 E:\develop\sbt\conf\repository.properties
内容 [repositories]
local
activator: file:///E:/develop/activator-1.3.7/repository/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
osc: http://maven.oschina.net/content/groups/public/
typesafe: http://dl.bintray.com/typesafe/maven-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
ivy-releases: http://dl.bintray.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
sbt-plugin: http://dl.bintray.com/sbt/sbt-plugin-releases/
sonatype-oss-releases
maven-central
sonatype-oss-snapshots

5.(1)修改E:\develop\activator-1.3.7\activator-launch-1.3.7.jar 

7Zip -> sbt -> 修改sbt.boot.properties
[repositories]
local
activator-launcher-local: file:///E:/develop/activator-1.3.7/repository/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
maven-central
typesafe-releases: http://dl.bintray.com/typesafe/maven-releases/
typesafe-ivy-releasez: http://dl.bintray.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]

[boot]
directory: E:\develop\sbt\.sbt\boot
properties: ${activator.boot.properties-${user.home}/.activator/version-${activator.launcher.generation-1}.properties}

[ivy]
ivy-home: E:\develop\sbt\.ivy2
checksums: ${sbt.checksums-sha1,md5}
override-build-repos: true
repository-config: E:\develop\sbt\conf\repository.properties

6.addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.4")   2.4.6->2.4.6  (原因:sbt-plugin.jar 2.4.6 下载不了)

 

若是基于代理:在用户目录下 .activator下创建文件activatorconfig.txt

# Proxy settings
-Dhttp.proxyHost=116.228.220.198
-Dhttp.proxyPort=2222
-Dhttps.proxyHost=116.228.220.198
-Dhttps.proxyPort=2222
# Here we configure the hosts which should not go through the proxy. You should include your private network, if applicable.
-Dhttp.nonProxyHosts="localhost|127.0.0.1"
-Dhttps.nonProxyHosts="localhost|127.0.0.1"
# These are commented out, but if you need to use authentication for your proxy, please fill these out.
-Dhttp.proxyUser=johnson.yang
-Dhttps.proxyUser=johnson.yang123

-Dhttps.proxyPassword=johnson.yang
-Dhttp.proxyPassword=johnson.yang123

 

转载于:https://www.cnblogs.com/fight-tao/p/5001394.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值