user697911
user697911

Reputation: 10531

How to depend on multiple projects in a maven library?

My project depends on an external library, which consists of a number of maven projects.

My project directly depends on only one project in the library, but that project depends on other projects in the library.

Upvotes: 0

Views: 121

Answers (2)

bmargulies
bmargulies

Reputation: 100050

You need a composite pom -- a pom which just declares a bunch of dependencies. You depend on it, and transitively, you get its dependencies.

See this discussion for more information.

Upvotes: 1

Surya
Surya

Reputation: 350

Ideally, in parent pom you define modules i.e, external libraries which you want to build. When you build the parent pom, it will build all modules which are defined in parent pom. And further, modules will build other dependencies/modules.

Upvotes: 1

Related Questions