erlang:setup

Full name:

eu.lindenbaum:maven-erlang-plugin:2.1.0:setup

Description:

Utility goal that will setup a new Erlang/OTP Maven project, creating the basic resources and folders required, from a best practice point of view.

This will typically replace the functionality given by a Maven archetype, checking and creating any missing resource. Regarding Erlang/OTP applications this could be:

  • source folder
  • application resource file [artifactId].app
  • application upgrade file [artifactId].appup
  • include folder
  • priv folder
  • test source folder
  • test include folder
  • test priv folder

Regarding Erlang/OTP releases this could be:

  • release file [artifactId].rel
  • system configuration sys.config

By default some extras for project management are also generated:

  • site folder with site.xml
  • apt source folder with index.apt[.vm]
  • changelog folder with changes.xml

The default application resource file will look like (this would be sufficient for library applications):

{application, ${ARTIFACT},
 [{description, ${DESCRIPTION}},
  {id, ${ID}},
   {vsn, ${VERSION}},
   {modules, ${MODULES}},
   {maxT, infinity},
   {registered, ${REGISTERED}},
   {included_applications, []},
   {applications, [kernel, stdlib]},
   {env, []}, 
   {start_phases, []}]}.


The default application upgrade file will look like:

{${VERSION}, [EDIT HERE], [EDIT HERE]}.


The default release file will look like:

{release,
 {${ARTIFACT}, ${VERSION}},
 ${ERTS},
 ${AUTODEPS}}.


The default release upgrade file will look like:

{${VERSION}, [EDIT HERE], [EDIT HERE]}.


The default system configuration file will look like:

[].


Attributes:

  • Requires a Maven project to be executed.

Optional Parameters

Name Type Since Description
cookie String - The cookie to use for the java and the backend node.
erlCommand String - The erlang command used to start an erlang backend node. The path must exist and the destination must be executable. If the given command does not fullfill these requirements erl is used (assuming the command is part of the hosts PATH). The path must not contain any arguments.
withExtras boolean 2.0.0 Setting this to false will skip generation of the project resources considered best-practice extras - such as Maven site definition XML document, an index APT page and a changes XML document for the maven-changes-plugin. It is of course encouraged to leave this as defined by default.
Default value is: true.

Parameter Details

cookie:

The cookie to use for the java and the backend node.
  • Type: java.lang.String
  • Required: No
  • Expression: ${cookie}

erlCommand:

The erlang command used to start an erlang backend node. The path must exist and the destination must be executable. If the given command does not fullfill these requirements erl is used (assuming the command is part of the hosts PATH). The path must not contain any arguments.
  • Type: java.lang.String
  • Required: No
  • Expression: ${erlCommand}

withExtras:

Setting this to false will skip generation of the project resources considered best-practice extras - such as Maven site definition XML document, an index APT page and a changes XML document for the maven-changes-plugin. It is of course encouraged to leave this as defined by default.
  • Type: boolean
  • Since: 2.0.0
  • Required: No
  • Expression: ${withExtras}
  • Default: true