zoukankan      html  css  js  c++  java
  • Scala + Activator + Sbt 搭建Play framework框架

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

    2.  配置Path: activator(E:developactivator-1.3.7)和sbt(E:developsbtin)

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

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

      (2)activator ui  

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

    我的位置 E:developsbtconf epository.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:developactivator-1.3.7activator-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:developsbt.sbtoot
    properties: ${activator.boot.properties-${user.home}/.activator/version-${activator.launcher.generation-1}.properties}

    [ivy]
    ivy-home: E:developsbt.ivy2
    checksums: ${sbt.checksums-sha1,md5}
    override-build-repos: true
    repository-config: E:developsbtconf epository.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

  • 相关阅读:
    [转] 接触C# 反射 2
    [转] C#操作Excel文件
    【Leetcode】Path Sum II
    java通用抹去魔,在边界行动,擦除补偿
    python抓取网络内容
    一个合格的程序猿编程
    Android的相关的源代码的方法
    随笔
    使用方便git命令检查记录的版本号
    opengl 扳回一球
  • 原文地址:https://www.cnblogs.com/fight-tao/p/5001394.html
Copyright © 2011-2022 走看看