erlang - 如何在版本中包含 erlang 应用程序,但让 rebar 不启动它?

标签 erlang rebar

我正在使用 rebar 来编译和生成版本。

在我的/apps 文件夹下,我有 app1、app2。目前 rel/reltool.config 已配置 app1、app2。控制台按预期工作,没有错误。

我只希望 app1 在节点启动时启动,并通过 app1 的主管手动启动 app2。

各种尝试注释/不同的 incl_cond 值等导致 rebar 生成错误,例如“发布中必须包含 app2,不能排除”

建议表示赞赏。 〜B

最佳答案

您可以将 app2 设为 included application app1,将其添加到 app1.app.src:

{included_applications, [app2]}

或者在您的 reltool.config 中,将 app2 标记为仅加载,如下所示:

{rel, "myrelease", "1",
   [
     kernel,
     stdlib,
     sasl,
     app1,
     {app2, load}
   ]},

关于erlang - 如何在版本中包含 erlang 应用程序,但让 rebar 不启动它?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14890699/

相关文章:

erlang - 如何从 erlang JSON 获取特定值

erlang - Windows 中的 .erlang 文件

erlang - 将元组转换为 proplists

erlang - 在 Erlang 应用程序中加载依赖项的代码路径的正确方法是什么?

erlang - 如何让钢筋为依赖项运行 'make'?

windows - 如何在 Windows 8 中安装、编译和使用 Rebar

database - 关于mnesia分布的问题

performance - Erlang : match on two different lines, 和元组匹配哪个效率更高?

erlang - 如何创建不是 Erlang OTP 应用程序的钢筋模块?