Multiple applications paths

Hi folks,

I would like to reorganise my umbrella project a little by splitting applications into two directories. Currently, I have a lot of applications in apps directory but they can be logically divided into two categories: apps and solutions. So the final hierarchy could look like this:

$ tree -L 2 .
.
├── apps
│   ├── app1
│   └── app2
├── config
│   └── config.exs
├── mix.exs
└── solutions
    ├── solution1
    └── solution2

Unfortunately, :apps_path doesn’t support multiple directories. I tried to edit mix application locally to support this (by adding :apps_paths in Mix.Project module) but I don’t think that keeping my own version of mix is a good idea. Do you have any other idea how I can achieve the desired result?

While that is not what you are looking for, maybe you will want to consider some other ways to add some of your apps instead of adding them as umbrella children. For example you could add them as local or Git dependencies…

Or maybe you could just add a category name as prefix and keep them as umbrella dependencies. For example something like solutions_solution1: this way you get a semblance of an organized structure.

1 Like

Thanks for your feedback. The thing that I don’t like in the first approach is that I have to add solutions explicitly. I like umbrella projects because “top-level dependencies” are resolved automatically.

Probably I will go with the second option as I don’t see any other solutions so far.

1 Like