加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

scala – 如何运行没有sbt的sbt管理的应用程序项目?

发布时间:2020-12-16 09:12:25 所属栏目:安全 来源:网络整理
导读:我的问题是关于运行由sbt 0.10.1管理的项目中的应用程序,因此依赖于其自动依赖关系管理(下载并设置适当的类路径来运行). 当使用自动依赖关系管理时,似乎运行应用程序的唯一方法是使用sbt本身,因为它知道如何设置类路径(在Ivy2的帮助下). 如何运行没有sbt的应
我的问题是关于运行由sbt 0.10.1管理的项目中的应用程序,因此依赖于其自动依赖关系管理(下载并设置适当的类路径来运行).

当使用自动依赖关系管理时,似乎运行应用程序的唯一方法是使用sbt本身,因为它知道如何设置类路径(在Ivy2的帮助下).

如何运行没有sbt的应用程序?

解决方法

您还可以使用Typesafe的xsbt-start-script-plugin(编辑:now sbt-start-script)生成具有正确类路径的shell脚本:

This plugin allows you to generate a script target/start for a
project. The script will run the project “in-place” (without having
to build a package first).

The target/start script is similar to sbt run but it doesn’t rely
on SBT. sbt run is not recommended for production use because it
keeps SBT itself in-memory. target/start is intended to run an
app in production.

The plugin adds a task start-script which generates target/start.
It also adds a stage task,aliased to the start-script task.

这是Heroku uses运行Scala应用程序.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读