Charles
Charles

Reputation: 620

Import bom based on property/profile

I have a situation where in environment A I want to use maven BOM-A in a service for its dependencies and in environment B for the same service I want to use maven BOM-B for its dependencies. How can I make a distinction between which BOM-* I want to import depending on a property/profile?

Upvotes: 0

Views: 252

Answers (1)

J Fabian Meier
J Fabian Meier

Reputation: 35795

You can put dependencyManagement entries into profiles, but if you always want to build similar projects for two platforms, you can also think about creating a multi-module project.

Then you would have module-A, module-B and common, so that most of the code and configuration is in common and the environment specific POM entries are in the other modules

Upvotes: 1

Related Questions