The application resource file specifies the resources an
application uses, and how the application is started. There must
always be one application resource file called
The file is read by the application controller when an
application is loaded/started. It is also used by the functions in
The application resource file is to be called
The file must contain a single Erlang term, which is called an application specification:
{application, Application,
[{description, Description},
{id, Id},
{vsn, Vsn},
{modules, Modules},
{maxP, MaxP},
{maxT, MaxT},
{registered, Names},
{included_applications, Apps},
{applications, Apps},
{env, Env},
{mod, Start},
{start_phases, Phases},
{runtime_dependencies, RTDeps}]}.
Value Default
----- -------
Application atom() -
Description string() ""
Id string() ""
Vsn string() ""
Modules [Module] []
MaxP int() infinity
MaxT int() infinity
Names [Name] []
Apps [App] []
Env [{Par,Val}] []
Start {Module,StartArgs} []
Phases [{Phase,PhaseArgs}] undefined
RTDeps [ApplicationVersion] []
Module = Name = App = Par = Phase = atom()
Val = StartArgs = PhaseArgs = term()
ApplicationVersion = string()
For the application controller, all keys are optional. The respective default values are used for any omitted keys.
The functions in
The other keys are ignored by
A one-line description of the application.
Product identification, or similar.
Version of the application.
All modules introduced by this application.
Deprecated - is ignored
Maximum number of processes allowed in the application.
Maximum time, in milliseconds, that the application is allowed to run. After the specified time, the application terminates automatically.
All names of registered processes started in this
application.
All applications included by this application. When this application is started, all included applications are loaded automatically, but not started, by the application controller. It is assumed that the top-most supervisor of the included application is started by a supervisor of this application.
All applications that must be started before this
application is allowed to be started.
Configuration parameters used by the application. The value
of a configuration parameter is retrieved by calling
Specifies the application callback module and a start argument, see
Key
A list of start phases and corresponding start arguments for
the application. If this key is present, the application
master, in addition to the usual call to
Start phases can be used to synchronize startup of an
application and its included applications. In this case,
key
{mod, {application_starter,[Module,StartArgs]}}
The application master then calls
This implies that for an included application, the set of
start phases must be a subset of the set of phases defined
for the primary application. For more information, see
A list of application versions that the application
depends on. An example of such an application version is
Notice that the application version specifies a source code version. One more, indirect, requirement is that the installed binary application of the specified version is built so that it is compatible with the rest of the system.
Some dependencies can only be required in specific runtime scenarios. When such optional dependencies exist, these are specified and documented in the corresponding "App" documentation of the specific application.
The
All runtime dependencies specified in OTP applications during the OTP 17 release may not be completely correct. This is actively being worked on. Declared runtime dependencies in OTP applications are expected to be correct in OTP 18.