Scala + Activator + Sbt 搭建Play framework框架

1.下載Typesafe Activator ,我下載的是1.3.7, 地址:typesafe 官網java

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

3.使用typesafe 建立應用。2種方式:maven

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

  (2)activator ui  ui

 

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

個人位置 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-snapshotsscala

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]
ip

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

[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

相關文章
相關標籤/搜索