简体   繁体   中英

How do you include an erlang app in a release, but have rebar not start it?

I'm using rebar to compile & generate a release.

Under my /apps folder, i have app1, app2. Currently the rel/reltool.config had app1, app2 configured. The console works as expected without errors.

I want only app1 to start on node startup, and manually start app2 via app1's supervisor.

Various Attempts at commenting/different values of incl_cond, etc have led to rebar generate errors like "must include app2 in release, cannot be excluded"

Suggestions appreciated. ~B

You can either make app2 an included application of app1 , by adding this to app1.app.src :

{included_applications, [app2]}

Or in your reltool.config , mark app2 as load-only, like this:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM