简体   繁体   中英

How to create a rebar module that is not an Erlang OTP app?

Is it possible to use rebar to create a simple project module skeleton that is not based on an OTP application ? Overall I want to use that project structure to become a library for other rebar generated applications.

The structure should be as follows:

/myprojectlib 
     /src
     /ebin
     /deps

The idea is to use it on the deps section of a rebar.config file:

{ deps, [myprojectlib] }.

At the moment, because myprojectlib is not a rebar project (and an OTP app) the rebar compilation fails with the message that it cannot identify myprojectlib, even if it is in the /deps directory of the target folder. I checked further and it appears that the deps of the rebar.config file only accepts other rebar projects, hence my need to create a simple rebar project which is not an OTP application.

Erlang libraries are apps. They are however called library apps.

You can create a sample library app with rebar create-lib libid=myprojectlib .

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