• RT: np


    np - new sbt project generation made simple(r)

    As pointed out in the comments by @0__ below, there's another project that aims at simplifying how new projects in sbt are created - np. That seems exactly what you needed.

    In https://github.com/softprops/np#for-sbt-013 there's a complete description of what's needed to set it up and create new sbt projects using the utility that boils down to:

    1. Registering the sbt plugin. Add the following to ~/.sbt/0.13/plugins/np.sbt.

      addSbtPlugin("me.lessis" % "np" % "0.2.0")
      
    2. Define a custom global overrides in ~/.sbt/0.13/np.sbt. Add the following to the file.

      seq(npSettings:_*)
      
      (NpKeys.defaults in (Compile, NpKeys.np)) ~= {
        _.copy(org="me.lessis", version="0.1.0-SNAPSHOT")
      }
      
    3. Use the np plugin's command - np. Create an empty directory for the sbt project and run sbt np.

      jacek:~/sandbox/stackoverflow
      $ mkdir np-sandbox/
      jacek:~/sandbox/stackoverflow
      $ cd np-sandbox/
      jacek:~/sandbox/stackoverflow/np-sandbox
      $ sbt np
      [info] Loading global plugins from /Users/jacek/.sbt/0.13/plugins
      [info] Set current project to np-sandbox (in build file:/Users/jacek/sandbox/stackoverflow/np-sandbox/)
      [info] Generated build file
      [info] Generated source directories
      [success] Total time: 0 s, completed Dec 7, 2013 12:51:42 PM
      jacek:~/sandbox/stackoverflow/np-sandbox
      $ tree
      .
      ├── build.sbt
      ├── src
      │   ├── main
      │   │   ├── resources
      │   │   └── scala
      │   └── test
      │       ├── resources
      │       └── scala
      └── target
          └── streams
              └── compile
                  └── np
                      └── $global
                          └── out
      
      12 directories, 2 files
      jacek:~/sandbox/stackoverflow/np-sandbox
      $ cat build.sbt
      organization := "me.lessis"
      
      name := "default"
      
      version := "0.1.0-SN
  • 相关阅读:
    磁盘分区异常占用满了
    平滑升级nginx
    supervisor进程异常挂掉
    datetime值毫秒四舍五入
    docker+tomcat 启动时非常慢原因之JRE /dev/random阻塞
    Tomcat最大连接数问题
    Docker:设置代理proxy
    easy_install和pip安装python库修改默认的源
    zabbix监控mysql之Warning: Using a password on the command line interface can be insecure.
    Mysql忘记密码解决方法
  • 原文地址:https://www.cnblogs.com/qiangxia/p/4953091.html
Copyright © 2020-2023  润新知