I am working on an application that has multiple parts. Therefore, it was split in an Umbrella application. However, I am having trouble figuring out what should be put in which mix.exs
file. Starting the project normally works fine, but when attempting to compile the application for production-use, (using edeliver), I get strange errors.
One application (payment_dispatcher
) is a client that consumes an external API.
One application (heads
) is a Phoenix server.
heads
needs payment_dispatcher
as dependency, as the server needs access to parts of the API.
Basically:
appname
--heads
----phoenix
----payment_dispatcher
----(... some other things)
--payment_dispatcher
----httpoison
----(... some other things)
When edeliver
uses the following command to compile the files:
APP="appname" MIX_ENV="prod" AUTO_VERSION="" SKIP_RELUP_MODIFICATIONS="" RELUP_MODIFICATION_MODULE="" mix do clean, deps.compile, compile
I get an error that HTTPoison.Base, one of the modules inside the :httpoison
dependency of payment_dispatcher
cannot be found.
I have listed :httpoison
inside apps/payment_dispatcher/mix.exs
's deps and applications lists. But the error keeps happening.
I am unsure as to:
- Why above error happens. Is compilation in the wrong order? How can I change that?
- Where to put
payment_dispatcher
as dependency: Inmix.exs
orapps/heads/mix.exs
? (as the Phoenix app depends on it)
Any help would be appreciated.