MaatDeamon
MaatDeamon

Reputation: 9771

How does dependency management work?

I would like to clarify something about dependency management in sbt.

  1. Let say I have a project A that depends on a project B. Does every library on which project B depends on, automatically added to the project A when it comes to runtime execution?

    Usually in Eclipse to deal with that problem one had to export the dependency of project B, so they could be visible to any importing project.

    I would like to understand how does that work when working with sbt. I believe this is called multi-module project dependency in sbt vocabulary.

  2. I would like to understand how does that work, for a library artifact generated as well. Is there an equivalent of the of Maven Pom? That is if I depend on a library how sbt (or Ivy) knows the other libraries that library depend on.

Finally, if someone can point me to some good doc about this I would appreciate.

Upvotes: 0

Views: 295

Answers (1)

Jacek Laskowski
Jacek Laskowski

Reputation: 74709

Ad 1. Yes. It's called a transitive dependency (graph). Eclipse uses OSGi and the module/plugin system is more sophisticated (and could've been the reason why not many people found it useful for their use cases).

Ad 2. Yes. It's ivy.xml file.

It's all well described in the official documentation of sbt.

Upvotes: 0

Related Questions