Setting up a new Erlang/OTP application project

Instead of an archetype for erlang-otp/erlang-std projects, the setup goal can be used to create some common default resources for your project.

When starting a new project, define a minimal POM with the following properties:

  • NAME

    It would look something like this:

      <packaging>erlang-otp</packaging>     <!-- either erlang-otp or erlang-std -->

    Now executing mvn erlang:setup will run the setup goal and check for default resources and create those that are missing.

    At the end of the check, there will be an advice on plugins or dependencies that you manually have to add.

    Example output from the setup goal.

    Note that you can, at any time, run the goal again. Only missing files will be created an never replaced or overwritten.

    After default project setup customizing of the created .app and .appup files has to be done. Allthough the default files already contain some common packaging variables ${...} the plug-in can do more. In case the project has other erlang-otp/erlang-std dependencies the ${APPLICATIONS} variable could be useful because it expands to a comma separated listing of all erlang-otp/erlang-std dependencies specified in the pom.xml.

    Assuming the following dependencies


    in the application resource file the term

      {applications, [kernel, stdlib, ${APPLICATIONS}]},

    would expand to

      {applications, [kernel, stdlib, dependency1, dependency2]},